diff --git a/e2e/playwright/flow-tests.spec.ts b/e2e/playwright/flow-tests.spec.ts index 3b93e9b66..1a0790267 100644 --- a/e2e/playwright/flow-tests.spec.ts +++ b/e2e/playwright/flow-tests.spec.ts @@ -860,7 +860,6 @@ test.describe('Editor tests', () => { await page.keyboard.press('Enter') await page.keyboard.type('const topAng = 42') await page.keyboard.press('ArrowLeft') - await page.keyboard.press('ArrowRight') await expect(page.locator('.cm-lint-marker-error')).toBeVisible() await expect( @@ -975,22 +974,16 @@ test.describe('Editor tests', () => { await page.setViewportSize({ width: 1000, height: 500 }) - await u.waitForAuthSkipAppStart() + await page.goto('/') + await u.waitForPageLoad() - await u.openDebugPanel() - await u.expectCmdLog('[data-message-type="execution-done"]') - await u.closeDebugPanel() - - // error in guter await expect(page.locator('.cm-lint-marker-error')).toBeVisible() // error text on hover await page.hover('.cm-lint-marker-error') - await expect( - page.getByText( - 'sketch profile must lie entirely on one side of the revolution axis' - ) - ).toBeVisible() + const searchText = + 'sketch profile must lie entirely on one side of the revolution axis' + await expect(page.getByText(searchText).first()).toBeVisible() }) test.describe('Autocomplete works', () => { test('with enter/click to accept the completion', async ({ page }) => { @@ -3732,10 +3725,16 @@ test.describe('Regression tests', () => { ) }) - await u.waitForAuthSkipAppStart() + await page.goto('/') + await u.waitForPageLoad() // error in guter await expect(page.locator('.cm-lint-marker-error')).toBeVisible() + await page.waitForTimeout(200) + // expect it still to be there (sometimes it just clears for a bit?) + await expect(page.locator('.cm-lint-marker-error')).toBeVisible({ + timeout: 10_000, + }) // error text on hover await page.hover('.cm-lint-marker-error') @@ -3754,6 +3753,7 @@ test.describe('Regression tests', () => { await page.keyboard.press('ArrowUp') await page.keyboard.press('ArrowUp') await page.keyboard.press('ArrowUp') + await page.keyboard.press('End') await page.keyboard.up('Shift') await page.keyboard.press('Backspace') await expect(page.locator('.cm-lint-marker-error')).not.toBeVisible() @@ -3762,13 +3762,14 @@ test.describe('Regression tests', () => { await page.keyboard.press('Enter') await page.keyboard.type('thing: "blah"', { delay: 100 }) await page.keyboard.press('Enter') + await page.keyboard.press('ArrowLeft') await expect(page.locator('.cm-content')) .toContainText(`const exampleSketch = startSketchOn("XZ") |> startProfileAt([0, 0], %) |> angledLine({ angle: 50, length: 45 }, %) |> yLineTo(0, %) - |> close(% + |> close(%) thing: "blah"`) diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Sketch-on-face-with-none-z-up-1-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Sketch-on-face-with-none-z-up-1-Google-Chrome-linux.png index 1958d7112..46c0a2b52 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Sketch-on-face-with-none-z-up-1-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Sketch-on-face-with-none-z-up-1-Google-Chrome-linux.png differ diff --git a/e2e/playwright/test-utils.ts b/e2e/playwright/test-utils.ts index 8ec590396..daaea2adf 100644 --- a/e2e/playwright/test-utils.ts +++ b/e2e/playwright/test-utils.ts @@ -232,6 +232,7 @@ export async function getUtils(page: Page) { return { waitForAuthSkipAppStart: () => waitForAuthAndLsp(page), + waitForPageLoad: () => waitForPageLoad(page), removeCurrentCode: () => removeCurrentCode(page), sendCustomCmd: (cmd: EngineCommand) => sendCustomCmd(page, cmd), updateCamPosition: async (xyz: [number, number, number]) => {