Deflake revolve some revolve tests

This commit is contained in:
lee-at-zoo-corp
2025-03-26 21:56:11 -04:00
parent d03343d97d
commit 74f9afb2ca
3 changed files with 60 additions and 20 deletions

View File

@ -317,9 +317,13 @@ test.describe('Command bar tests', { tag: ['@skipWin'] }, () => {
test('Can switch between sketch tools via command bar', async ({ test('Can switch between sketch tools via command bar', async ({
page, page,
homePage, homePage,
scene,
cmdBar,
toolbar,
}) => { }) => {
await page.setBodyDimensions({ width: 1200, height: 500 }) await page.setBodyDimensions({ width: 1200, height: 500 })
await homePage.goToModelingScene() await homePage.goToModelingScene()
await scene.settled(cmdBar)
const sketchButton = page.getByRole('button', { name: 'Start Sketch' }) const sketchButton = page.getByRole('button', { name: 'Start Sketch' })
const cmdBarButton = page.getByRole('button', { name: 'Commands' }) const cmdBarButton = page.getByRole('button', { name: 'Commands' })
@ -343,7 +347,9 @@ test.describe('Command bar tests', { tag: ['@skipWin'] }, () => {
// Start a sketch // Start a sketch
await sketchButton.click() await sketchButton.click()
await page.mouse.click(700, 200) await page.mouse.click(700, 200)
await toolbar.waitUntilSketchingReady()
// Switch between sketch tools via the command bar // Switch between sketch tools via the command bar
await expect(lineToolButton).toHaveAttribute('aria-pressed', 'true') await expect(lineToolButton).toHaveAttribute('aria-pressed', 'true')

View File

@ -101,7 +101,7 @@ sketch001 = startSketchOn(XY)
// Make sure we didn't clear the scene. // Make sure we didn't clear the scene.
await expect( await expect(
page.locator('[data-message-type="execution-done"]') page.locator('[data-message-type="execution-done"]')
).toHaveCount(3) ).toHaveCount(2)
await expect( await expect(
page.locator('[data-receive-command-type="scene_clear_all"]') page.locator('[data-receive-command-type="scene_clear_all"]')
).toHaveCount(1) ).toHaveCount(1)

View File

@ -12,6 +12,7 @@ import { expect, test } from '@e2e/playwright/zoo-test'
test.describe('Point-and-click tests', () => { test.describe('Point-and-click tests', () => {
test('verify extruding circle works', async ({ test('verify extruding circle works', async ({
page,
context, context,
homePage, homePage,
cmdBar, cmdBar,
@ -30,8 +31,9 @@ test.describe('Point-and-click tests', () => {
await context.addInitScript((file) => { await context.addInitScript((file) => {
localStorage.setItem('persistCode', file) localStorage.setItem('persistCode', file)
}, file) }, file)
await homePage.goToModelingScene() await homePage.goToModelingScene()
await scene.settled(cmdBar) await scene.connectionEstablished()
const [clickCircle, moveToCircle] = scene.makeMouseHelpers(582, 217) const [clickCircle, moveToCircle] = scene.makeMouseHelpers(582, 217)
@ -72,6 +74,7 @@ test.describe('Point-and-click tests', () => {
await test.step('do extrude flow and check extrude code is added to editor', async () => { await test.step('do extrude flow and check extrude code is added to editor', async () => {
await toolbar.extrudeButton.click() await toolbar.extrudeButton.click()
await page.getByText('Please select one')
await cmdBar.expectState({ await cmdBar.expectState({
stage: 'arguments', stage: 'arguments',
@ -479,6 +482,7 @@ profile001 = startProfileAt([205.96, 254.59], sketch002)
await page.setBodyDimensions(viewPortSize) await page.setBodyDimensions(viewPortSize)
await homePage.goToModelingScene() await homePage.goToModelingScene()
await scene.connectionEstablished()
// Constants and locators // Constants and locators
// These are mappings from screenspace to KCL coordinates, // These are mappings from screenspace to KCL coordinates,
@ -537,8 +541,7 @@ profile001 = startProfileAt([205.96, 254.59], sketch002)
await toolbar.startSketchPlaneSelection() await toolbar.startSketchPlaneSelection()
await moveToXzPlane() await moveToXzPlane()
await clickOnXzPlane() await clickOnXzPlane()
// timeout wait for engine animation is unavoidable await toolbar.waitUntilSketchingReady()
await page.waitForTimeout(600)
await editor.expectEditor.toContain(expectedCodeSnippets.sketchOnXzPlane) await editor.expectEditor.toContain(expectedCodeSnippets.sketchOnXzPlane)
}) })
await test.step(`Place a point a few pixels off the middle, verify it still snaps to 0,0`, async () => { await test.step(`Place a point a few pixels off the middle, verify it still snaps to 0,0`, async () => {
@ -625,7 +628,6 @@ openSketch = startSketchOn(XY)
const exitSketch = async () => { const exitSketch = async () => {
await test.step(`Exit sketch mode`, async () => { await test.step(`Exit sketch mode`, async () => {
await toolbar.exitSketchBtn.click() await toolbar.exitSketchBtn.click()
await expect(toolbar.exitSketchBtn).not.toBeVisible()
await expect(toolbar.startSketchBtn).toBeEnabled() await expect(toolbar.startSketchBtn).toBeEnabled()
}) })
} }
@ -633,7 +635,6 @@ openSketch = startSketchOn(XY)
await test.step(`Double-click on the closed sketch`, async () => { await test.step(`Double-click on the closed sketch`, async () => {
await moveToCircle() await moveToCircle()
await dblClickCircle() await dblClickCircle()
await expect(toolbar.startSketchBtn).not.toBeVisible()
await expect(toolbar.exitSketchBtn).toBeVisible() await expect(toolbar.exitSketchBtn).toBeVisible()
await editor.expectState({ await editor.expectState({
activeLines: [`|>circle(center=[8,5],radius=2)`], activeLines: [`|>circle(center=[8,5],radius=2)`],
@ -670,7 +671,6 @@ openSketch = startSketchOn(XY)
// There is a full execution after exiting sketch that clears the scene. // There is a full execution after exiting sketch that clears the scene.
await page.waitForTimeout(500) await page.waitForTimeout(500)
await dblClickOpenPath() await dblClickOpenPath()
await expect(toolbar.startSketchBtn).not.toBeVisible()
await expect(toolbar.exitSketchBtn).toBeVisible() await expect(toolbar.exitSketchBtn).toBeVisible()
// Wait for enter sketch mode to complete // Wait for enter sketch mode to complete
await page.waitForTimeout(500) await page.waitForTimeout(500)
@ -1031,6 +1031,7 @@ openSketch = startSketchOn(XY)
}) })
await test.step(`Go through the command bar flow`, async () => { await test.step(`Go through the command bar flow`, async () => {
await toolbar.offsetPlaneButton.click() await toolbar.offsetPlaneButton.click()
await page.getByText('Please select one')
await cmdBar.expectState({ await cmdBar.expectState({
stage: 'arguments', stage: 'arguments',
currentArgKey: 'plane', currentArgKey: 'plane',
@ -1088,9 +1089,11 @@ openSketch = startSketchOn(XY)
const expectedLine = `axis=X,` const expectedLine = `axis=X,`
await homePage.goToModelingScene() await homePage.goToModelingScene()
await scene.connectionEstablished()
await test.step(`Go through the command bar flow`, async () => { await test.step(`Go through the command bar flow`, async () => {
await toolbar.helixButton.click() await toolbar.helixButton.click()
await page.getByText('AxisOrEdge')
await cmdBar.expectState({ await cmdBar.expectState({
stage: 'arguments', stage: 'arguments',
currentArgKey: 'mode', currentArgKey: 'mode',
@ -1106,6 +1109,7 @@ openSketch = startSketchOn(XY)
commandName: 'Helix', commandName: 'Helix',
}) })
await cmdBar.progressCmdBar() await cmdBar.progressCmdBar()
await page.getByText('Axis')
await cmdBar.progressCmdBar() await cmdBar.progressCmdBar()
await cmdBar.progressCmdBar() await cmdBar.progressCmdBar()
await cmdBar.progressCmdBar() await cmdBar.progressCmdBar()
@ -1233,10 +1237,12 @@ openSketch = startSketchOn(XY)
}, initialCode) }, initialCode)
await page.setBodyDimensions({ width: 1000, height: 500 }) await page.setBodyDimensions({ width: 1000, height: 500 })
await homePage.goToModelingScene() await homePage.goToModelingScene()
await scene.settled(cmdBar)
await test.step(`Go through the command bar flow`, async () => { await test.step(`Go through the command bar flow`, async () => {
await toolbar.closePane('code') await toolbar.closePane('code')
await toolbar.helixButton.click() await toolbar.helixButton.click()
await page.getByText('AxisOrEdge')
await cmdBar.expectState({ await cmdBar.expectState({
stage: 'arguments', stage: 'arguments',
currentArgKey: 'mode', currentArgKey: 'mode',
@ -1252,6 +1258,7 @@ openSketch = startSketchOn(XY)
commandName: 'Helix', commandName: 'Helix',
}) })
await cmdBar.selectOption({ name: 'Edge' }).click() await cmdBar.selectOption({ name: 'Edge' }).click()
await page.getByText('Please select one')
await clickOnEdge() await clickOnEdge()
await cmdBar.progressCmdBar() await cmdBar.progressCmdBar()
await cmdBar.argumentInput.focus() await cmdBar.argumentInput.focus()
@ -1530,6 +1537,7 @@ extrude001 = extrude(profile001, length = 100)
if (!shouldPreselect) { if (!shouldPreselect) {
await test.step(`Go through the command bar flow without preselected sketches`, async () => { await test.step(`Go through the command bar flow without preselected sketches`, async () => {
await toolbar.loftButton.click() await toolbar.loftButton.click()
await page.getByText('Please select one')
await cmdBar.expectState({ await cmdBar.expectState({
stage: 'arguments', stage: 'arguments',
currentArgKey: 'selection', currentArgKey: 'selection',
@ -1548,6 +1556,7 @@ extrude001 = extrude(profile001, length = 100)
await test.step(`Go through the command bar flow with preselected sketches`, async () => { await test.step(`Go through the command bar flow with preselected sketches`, async () => {
await toolbar.loftButton.click() await toolbar.loftButton.click()
await page.getByText('Please select one')
await cmdBar.progressCmdBar() await cmdBar.progressCmdBar()
}) })
} }
@ -1708,6 +1717,7 @@ sketch002 = startSketchOn(XZ)
await test.step(`Go through the command bar flow`, async () => { await test.step(`Go through the command bar flow`, async () => {
await toolbar.sweepButton.click() await toolbar.sweepButton.click()
await page.getByText('Please select one')
await cmdBar.expectState({ await cmdBar.expectState({
commandName: 'Sweep', commandName: 'Sweep',
currentArgKey: 'target', currentArgKey: 'target',
@ -1844,6 +1854,7 @@ sketch002 = startSketchOn(XZ)
await test.step(`Go through the command bar flow and fail validation with a toast`, async () => { await test.step(`Go through the command bar flow and fail validation with a toast`, async () => {
await toolbar.sweepButton.click() await toolbar.sweepButton.click()
await page.getByText('Please select one')
await cmdBar.expectState({ await cmdBar.expectState({
commandName: 'Sweep', commandName: 'Sweep',
currentArgKey: 'target', currentArgKey: 'target',
@ -1960,6 +1971,7 @@ extrude001 = extrude(sketch001, length = -12)
await test.step(`Apply fillet to the preselected edge`, async () => { await test.step(`Apply fillet to the preselected edge`, async () => {
await page.waitForTimeout(100) await page.waitForTimeout(100)
await toolbar.filletButton.click() await toolbar.filletButton.click()
await page.getByText('Please select one')
await cmdBar.expectState({ await cmdBar.expectState({
commandName: 'Fillet', commandName: 'Fillet',
highlightedHeaderArg: 'selection', highlightedHeaderArg: 'selection',
@ -2060,6 +2072,7 @@ extrude001 = extrude(sketch001, length = -12)
await test.step(`Open fillet UI without selecting edges`, async () => { await test.step(`Open fillet UI without selecting edges`, async () => {
await page.waitForTimeout(100) await page.waitForTimeout(100)
await toolbar.filletButton.click() await toolbar.filletButton.click()
await page.getByText('Please select one')
await cmdBar.expectState({ await cmdBar.expectState({
stage: 'arguments', stage: 'arguments',
currentArgKey: 'selection', currentArgKey: 'selection',
@ -2426,6 +2439,7 @@ extrude001 = extrude(profile001, length = 5)
await test.step(`Apply fillet`, async () => { await test.step(`Apply fillet`, async () => {
await page.waitForTimeout(100) await page.waitForTimeout(100)
await toolbar.filletButton.click() await toolbar.filletButton.click()
await page.getByText('Please select one')
await cmdBar.expectState({ await cmdBar.expectState({
commandName: 'Fillet', commandName: 'Fillet',
highlightedHeaderArg: 'selection', highlightedHeaderArg: 'selection',
@ -2543,6 +2557,7 @@ extrude001 = extrude(sketch001, length = -12)
await test.step(`Apply chamfer to the preselected edge`, async () => { await test.step(`Apply chamfer to the preselected edge`, async () => {
await page.waitForTimeout(100) await page.waitForTimeout(100)
await toolbar.chamferButton.click() await toolbar.chamferButton.click()
await page.getByText('Please select one')
await cmdBar.expectState({ await cmdBar.expectState({
commandName: 'Chamfer', commandName: 'Chamfer',
highlightedHeaderArg: 'selection', highlightedHeaderArg: 'selection',
@ -2650,6 +2665,7 @@ extrude001 = extrude(sketch001, length = -12)
await test.step(`Open chamfer UI without selecting edges`, async () => { await test.step(`Open chamfer UI without selecting edges`, async () => {
await page.waitForTimeout(100) await page.waitForTimeout(100)
await toolbar.chamferButton.click() await toolbar.chamferButton.click()
await page.getByText('Please select one')
await cmdBar.expectState({ await cmdBar.expectState({
stage: 'arguments', stage: 'arguments',
currentArgKey: 'selection', currentArgKey: 'selection',
@ -2938,9 +2954,11 @@ extrude001 = extrude(sketch001, length = 30)
await context.addInitScript((initialCode) => { await context.addInitScript((initialCode) => {
localStorage.setItem('persistCode', initialCode) localStorage.setItem('persistCode', initialCode)
}, initialCode) }, initialCode)
await page.setBodyDimensions({ width: 1000, height: 500 }) await page.setBodyDimensions({ width: 1000, height: 500 })
await homePage.goToModelingScene() await homePage.goToModelingScene()
await scene.settled(cmdBar) await scene.connectionEstablished()
// One dumb hardcoded screen pixel value // One dumb hardcoded screen pixel value
const testPoint = { x: 575, y: 200 } const testPoint = { x: 575, y: 200 }
@ -2957,6 +2975,7 @@ extrude001 = extrude(sketch001, length = 30)
if (!shouldPreselect) { if (!shouldPreselect) {
await test.step(`Go through the command bar flow without preselected faces`, async () => { await test.step(`Go through the command bar flow without preselected faces`, async () => {
await toolbar.shellButton.click() await toolbar.shellButton.click()
await page.getByText('Please select one')
await cmdBar.expectState({ await cmdBar.expectState({
stage: 'arguments', stage: 'arguments',
currentArgKey: 'selection', currentArgKey: 'selection',
@ -2991,6 +3010,7 @@ extrude001 = extrude(sketch001, length = 30)
await test.step(`Go through the command bar flow with a preselected face (cap)`, async () => { await test.step(`Go through the command bar flow with a preselected face (cap)`, async () => {
await toolbar.shellButton.click() await toolbar.shellButton.click()
await page.getByText('Please select one')
await cmdBar.progressCmdBar() await cmdBar.progressCmdBar()
await page.waitForTimeout(500) await page.waitForTimeout(500)
await cmdBar.progressCmdBar() await cmdBar.progressCmdBar()
@ -3017,7 +3037,6 @@ extrude001 = extrude(sketch001, length = 30)
}) })
await test.step('Edit shell via feature tree selection works', async () => { await test.step('Edit shell via feature tree selection works', async () => {
await toolbar.closePane('code')
await toolbar.openPane('feature-tree') await toolbar.openPane('feature-tree')
const operationButton = await toolbar.getFeatureTreeOperation( const operationButton = await toolbar.getFeatureTreeOperation(
'Shell', 'Shell',
@ -3046,7 +3065,6 @@ extrude001 = extrude(sketch001, length = 30)
await cmdBar.progressCmdBar() await cmdBar.progressCmdBar()
await toolbar.closePane('feature-tree') await toolbar.closePane('feature-tree')
await scene.expectPixelColor([150, 150, 150], testPoint, 15) await scene.expectPixelColor([150, 150, 150], testPoint, 15)
await toolbar.openPane('code')
await editor.expectEditor.toContain(editedShellDeclaration) await editor.expectEditor.toContain(editedShellDeclaration)
await editor.expectState({ await editor.expectState({
diagnostics: [], diagnostics: [],
@ -3099,6 +3117,7 @@ extrude001 = extrude(sketch001, length = 40)
await test.step(`Go through the command bar flow, selecting a wall and keeping default thickness`, async () => { await test.step(`Go through the command bar flow, selecting a wall and keeping default thickness`, async () => {
await toolbar.shellButton.click() await toolbar.shellButton.click()
await page.getByText('Please select one')
await cmdBar.expectState({ await cmdBar.expectState({
stage: 'arguments', stage: 'arguments',
currentArgKey: 'selection', currentArgKey: 'selection',
@ -3110,6 +3129,7 @@ extrude001 = extrude(sketch001, length = 40)
highlightedHeaderArg: 'selection', highlightedHeaderArg: 'selection',
commandName: 'Shell', commandName: 'Shell',
}) })
await page.getByText('Please select one or more face')
await clickOnCap() await clickOnCap()
await page.keyboard.down('Shift') await page.keyboard.down('Shift')
await clickOnWall() await clickOnWall()
@ -3118,6 +3138,7 @@ extrude001 = extrude(sketch001, length = 40)
await cmdBar.progressCmdBar() await cmdBar.progressCmdBar()
await page.waitForTimeout(500) await page.waitForTimeout(500)
await cmdBar.progressCmdBar() await cmdBar.progressCmdBar()
await page.waitForTimeout(500)
await cmdBar.expectState({ await cmdBar.expectState({
stage: 'review', stage: 'review',
headerArguments: { headerArguments: {
@ -3126,7 +3147,9 @@ extrude001 = extrude(sketch001, length = 40)
}, },
commandName: 'Shell', commandName: 'Shell',
}) })
await page.waitForTimeout(500)
await cmdBar.progressCmdBar() await cmdBar.progressCmdBar()
await page.waitForTimeout(500)
}) })
await test.step(`Confirm code is added to the editor, scene has changed`, async () => { await test.step(`Confirm code is added to the editor, scene has changed`, async () => {
@ -3141,7 +3164,6 @@ extrude001 = extrude(sketch001, length = 40)
}) })
await test.step('Edit shell via feature tree selection works', async () => { await test.step('Edit shell via feature tree selection works', async () => {
await editor.closePane()
const operationButton = await toolbar.getFeatureTreeOperation('Shell', 0) const operationButton = await toolbar.getFeatureTreeOperation('Shell', 0)
await operationButton.dblclick({ button: 'left' }) await operationButton.dblclick({ button: 'left' })
await cmdBar.expectState({ await cmdBar.expectState({
@ -3156,6 +3178,7 @@ extrude001 = extrude(sketch001, length = 40)
}) })
await page.keyboard.insertText('1') await page.keyboard.insertText('1')
await cmdBar.progressCmdBar() await cmdBar.progressCmdBar()
await page.waitForTimeout(500)
await cmdBar.expectState({ await cmdBar.expectState({
stage: 'review', stage: 'review',
headerArguments: { headerArguments: {
@ -3166,7 +3189,6 @@ extrude001 = extrude(sketch001, length = 40)
await cmdBar.progressCmdBar() await cmdBar.progressCmdBar()
await toolbar.closePane('feature-tree') await toolbar.closePane('feature-tree')
await scene.expectPixelColor([150, 150, 150], testPoint, 15) await scene.expectPixelColor([150, 150, 150], testPoint, 15)
await toolbar.openPane('code')
await editor.expectEditor.toContain(editedShellDeclaration) await editor.expectEditor.toContain(editedShellDeclaration)
await editor.expectState({ await editor.expectState({
diagnostics: [], diagnostics: [],
@ -3234,6 +3256,7 @@ extrude002 = extrude(sketch002, length = 50)
await test.step(`Go through the command bar flow, selecting a cap and keeping default thickness`, async () => { await test.step(`Go through the command bar flow, selecting a cap and keeping default thickness`, async () => {
await toolbar.shellButton.click() await toolbar.shellButton.click()
await page.getByText('Please select one')
await cmdBar.expectState({ await cmdBar.expectState({
stage: 'arguments', stage: 'arguments',
currentArgKey: 'selection', currentArgKey: 'selection',
@ -3245,6 +3268,7 @@ extrude002 = extrude(sketch002, length = 50)
highlightedHeaderArg: 'selection', highlightedHeaderArg: 'selection',
commandName: 'Shell', commandName: 'Shell',
}) })
await page.getByText('Please select one or more face')
await clickOnCap() await clickOnCap()
await page.waitForTimeout(500) await page.waitForTimeout(500)
await cmdBar.progressCmdBar() await cmdBar.progressCmdBar()
@ -3401,6 +3425,7 @@ sweep001 = sweep(sketch001, path = sketch002)
await test.step(`Go through the Shell flow and fail validation with a toast`, async () => { await test.step(`Go through the Shell flow and fail validation with a toast`, async () => {
await toolbar.shellButton.click() await toolbar.shellButton.click()
await page.getByText('Please select one')
await cmdBar.expectState({ await cmdBar.expectState({
stage: 'arguments', stage: 'arguments',
currentArgKey: 'selection', currentArgKey: 'selection',
@ -3467,10 +3492,11 @@ segAng(rectangleSegmentA002),
await scene.settled(cmdBar) await scene.settled(cmdBar)
// select line of code // select line of code
const codeToSelecton = `segAng(rectangleSegmentA002) - 90,` const codeToSelection = `segAng(rectangleSegmentA002) - 90,`
// revolve // revolve
await page.getByText(codeToSelecton).click() await page.getByText(codeToSelection).click()
await toolbar.revolveButton.click() await toolbar.revolveButton.click()
await page.getByText('Please select one')
await cmdBar.progressCmdBar() await cmdBar.progressCmdBar()
await cmdBar.progressCmdBar() await cmdBar.progressCmdBar()
await cmdBar.progressCmdBar() await cmdBar.progressCmdBar()
@ -3543,15 +3569,17 @@ sketch002 = startSketchOn(extrude001, rectangleSegmentA001)
}, initialCode) }, initialCode)
await page.setBodyDimensions({ width: 1000, height: 500 }) await page.setBodyDimensions({ width: 1000, height: 500 })
await homePage.goToModelingScene() await homePage.goToModelingScene()
await scene.connectionEstablished()
await scene.settled(cmdBar) await scene.settled(cmdBar)
// select line of code // select line of code
const codeToSelecton = `center = [-11.34, 10.0]` const codeToSelection = `center = [-11.34, 10.0]`
// revolve // revolve
await page.getByText(codeToSelecton).click() await editor.scrollToText(codeToSelection)
await page.getByText(codeToSelection).click()
await toolbar.revolveButton.click() await toolbar.revolveButton.click()
await page.getByText('Edge', { exact: true }).click() await page.getByText('Edge', { exact: true }).click()
const lineCodeToSelection = `|> angledLine([0, 202.6], %, $rectangleSegmentA001)` const lineCodeToSelection = `angledLine([0, 202.6], %, $rectangleSegmentA001)`
await page.getByText(lineCodeToSelection).click() await page.getByText(lineCodeToSelection).click()
await cmdBar.progressCmdBar() await cmdBar.progressCmdBar()
await cmdBar.progressCmdBar() await cmdBar.progressCmdBar()
@ -3597,6 +3625,7 @@ sketch002 = startSketchOn(extrude001, rectangleSegmentA001)
await editor.expectEditor.toContain( await editor.expectEditor.toContain(
newCodeToFind.replace('angle = 360', 'angle = angle001') newCodeToFind.replace('angle = 360', 'angle = angle001')
) )
expect(editor.expectEditor.toContain(newCodeToFind)).toBeTruthy()
}) })
test('revolve sketch circle around line segment from startProfileAt sketch', async ({ test('revolve sketch circle around line segment from startProfileAt sketch', async ({
context, context,
@ -3630,15 +3659,20 @@ sketch003 = startSketchOn(extrude001, 'START')
}, initialCode) }, initialCode)
await page.setBodyDimensions({ width: 1000, height: 500 }) await page.setBodyDimensions({ width: 1000, height: 500 })
await homePage.goToModelingScene() await homePage.goToModelingScene()
await scene.connectionEstablished()
await scene.settled(cmdBar) await scene.settled(cmdBar)
// select line of code // select line of code
const codeToSelecton = `center = [-0.69, 0.56]` const codeToSelection = `center = [-0.69, 0.56]`
// revolve // revolve
await page.getByText(codeToSelecton).click()
await toolbar.revolveButton.click() await toolbar.revolveButton.click()
await page.waitForTimeout(1000)
await editor.scrollToText(codeToSelection)
await page.getByText(codeToSelection).click()
await page.getByText('AxisOrEdge', { exact: true })
await page.getByText('Edge', { exact: true }).click() await page.getByText('Edge', { exact: true }).click()
const lineCodeToSelection = `|> xLine(length = 2.6)` const lineCodeToSelection = `length = 2.6`
await editor.scrollToText(lineCodeToSelection)
await page.getByText(lineCodeToSelection).click() await page.getByText(lineCodeToSelection).click()
await cmdBar.progressCmdBar() await cmdBar.progressCmdBar()
await cmdBar.progressCmdBar() await cmdBar.progressCmdBar()