diff --git a/e2e/playwright/can-create-sketches-on-all-planes-and-their-back-sides.spec.ts b/e2e/playwright/can-create-sketches-on-all-planes-and-their-back-sides.spec.ts index 1857946de..47a8b2330 100644 --- a/e2e/playwright/can-create-sketches-on-all-planes-and-their-back-sides.spec.ts +++ b/e2e/playwright/can-create-sketches-on-all-planes-and-their-back-sides.spec.ts @@ -19,6 +19,8 @@ test.describe( await page.setBodyDimensions({ width: 1200, height: 500 }) await homePage.goToModelingScene() + // FIXME: Cannot use scene.waitForExecutionDone() since there is no KCL code + await page.waitForTimeout(10000) await u.openDebugPanel() const coord = diff --git a/e2e/playwright/code-pane-and-errors.spec.ts b/e2e/playwright/code-pane-and-errors.spec.ts index d4e20caa2..2b62ea0d6 100644 --- a/e2e/playwright/code-pane-and-errors.spec.ts +++ b/e2e/playwright/code-pane-and-errors.spec.ts @@ -186,7 +186,7 @@ test.describe('Code pane and errors', { tag: ['@skipWin'] }, () => { // click in the editor to focus it await page.locator('.cm-content').click() - await page.waitForTimeout(500) + await page.waitForTimeout(2000) // go to the start of the editor and enter more text which will trigger // a lint error. @@ -203,8 +203,9 @@ test.describe('Code pane and errors', { tag: ['@skipWin'] }, () => { await page.keyboard.press('ArrowUp') await page.keyboard.press('Home') await page.keyboard.type('foo_bar = 1') - await page.waitForTimeout(500) + await page.waitForTimeout(2000) await page.keyboard.press('Enter') + await page.waitForTimeout(2000) // ensure we have a lint error await expect(page.locator('.cm-lint-marker-info').first()).toBeVisible() diff --git a/e2e/playwright/command-bar-tests.spec.ts b/e2e/playwright/command-bar-tests.spec.ts index 536ed6c1f..c096bd47f 100644 --- a/e2e/playwright/command-bar-tests.spec.ts +++ b/e2e/playwright/command-bar-tests.spec.ts @@ -174,6 +174,9 @@ test.describe('Command bar tests', { tag: ['@skipWin'] }, () => { await page.setBodyDimensions({ width: 1200, height: 500 }) await homePage.goToModelingScene() + // FIXME: No KCL code, unable to wait for engine execution + await page.waitForTimeout(10000) + await expect( page.getByRole('button', { name: 'Start Sketch' }) ).not.toBeDisabled() diff --git a/e2e/playwright/point-click.spec.ts b/e2e/playwright/point-click.spec.ts index a66e8f063..5664874b4 100644 --- a/e2e/playwright/point-click.spec.ts +++ b/e2e/playwright/point-click.spec.ts @@ -731,6 +731,9 @@ openSketch = startSketchOn('XY') const expectedOutput = `plane001 = offsetPlane('XZ', 5)` await homePage.goToModelingScene() + // FIXME: Since there is no KCL code loaded. We need to wait for the scene to load before we continue. + // The engine may not be connected + await page.waitForTimeout(15000) await test.step(`Look for the blue of the XZ plane`, async () => { await scene.expectPixelColor([50, 51, 96], testPoint, 15) diff --git a/e2e/playwright/sketch-tests.spec.ts b/e2e/playwright/sketch-tests.spec.ts index dcc452834..273fc68ed 100644 --- a/e2e/playwright/sketch-tests.spec.ts +++ b/e2e/playwright/sketch-tests.spec.ts @@ -9,6 +9,7 @@ import { PERSIST_MODELING_CONTEXT, } from './test-utils' import { uuidv4, roundOff } from 'lib/utils' +import { SceneFixture } from './fixtures/sceneFixture' test.describe('Sketch tests', { tag: ['@skipWin'] }, () => { test('multi-sketch file shows multiple Edit Sketch buttons', async ({ @@ -184,7 +185,8 @@ test.describe('Sketch tests', { tag: ['@skipWin'] }, () => { const doEditSegmentsByDraggingHandle = async ( page: Page, homePage: HomePageFixture, - openPanes: string[] + openPanes: string[], + scene: SceneFixture ) => { // Load the app with the code panes await page.addInitScript(async () => { @@ -200,6 +202,7 @@ test.describe('Sketch tests', { tag: ['@skipWin'] }, () => { const u = await getUtils(page) await homePage.goToModelingScene() + await scene.waitForExecutionDone() await expect( page.getByRole('button', { name: 'Start Sketch' }) @@ -317,7 +320,7 @@ test.describe('Sketch tests', { tag: ['@skipWin'] }, () => { test( 'code pane open at start-handles', { tag: ['@skipWin'] }, - async ({ page, homePage }) => { + async ({ page, homePage, scene }) => { // Load the app with the code panes await page.addInitScript(async () => { localStorage.setItem( @@ -330,14 +333,14 @@ test.describe('Sketch tests', { tag: ['@skipWin'] }, () => { }) ) }) - await doEditSegmentsByDraggingHandle(page, homePage, ['code']) + await doEditSegmentsByDraggingHandle(page, homePage, ['code'], scene) } ) test( 'code pane closed at start-handles', { tag: ['@skipWin'] }, - async ({ page, homePage }) => { + async ({ page, homePage, scene }) => { // Load the app with the code panes await page.addInitScript(async (persistModelingContext) => { localStorage.setItem( @@ -345,7 +348,7 @@ test.describe('Sketch tests', { tag: ['@skipWin'] }, () => { JSON.stringify({ openPanes: [] }) ) }, PERSIST_MODELING_CONTEXT) - await doEditSegmentsByDraggingHandle(page, homePage, []) + await doEditSegmentsByDraggingHandle(page, homePage, [], scene) } ) }) @@ -547,6 +550,7 @@ test.describe('Sketch tests', { tag: ['@skipWin'] }, () => { test('Can edit a sketch that has been revolved in the same pipe', async ({ page, homePage, + scene, }) => { const u = await getUtils(page) await page.addInitScript(async () => { @@ -562,6 +566,7 @@ test.describe('Sketch tests', { tag: ['@skipWin'] }, () => { }) await homePage.goToModelingScene() + await scene.waitForExecutionDone() await expect( page.getByRole('button', { name: 'Start Sketch' })