diff --git a/codeserver/e2e/playwright.config.ts b/codeserver/e2e/playwright.config.ts index b5b380235..9e6bb892d 100644 --- a/codeserver/e2e/playwright.config.ts +++ b/codeserver/e2e/playwright.config.ts @@ -22,6 +22,8 @@ export default defineConfig({ retries: process.env.CI ? 2 : 0, /* Opt out of parallel tests on CI. */ workers: process.env.CI ? 1 : 1, + // Give CI longer default per-test timeout + timeout: process.env.CI ? 60 * 1000 : 30 * 1000, /* Reporter to use. See https://playwright.dev/docs/test-reporters */ reporter: [ ['html', { open: 'never' }], ['line'] ], /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ diff --git a/codeserver/e2e/tests/example.spec.ts b/codeserver/e2e/tests/example.spec.ts index 0217847a6..d15e202cd 100644 --- a/codeserver/e2e/tests/example.spec.ts +++ b/codeserver/e2e/tests/example.spec.ts @@ -82,7 +82,7 @@ test('use the terminal', async ({codeServer, page}, testInfo) => { }) await test.step("should accept the workspace trust dialog", async () => { - await expect(page.getByText("Do you trust the authors of the files in this folder?")).toBeVisible() + await expect(page.getByText("Do you trust the authors of the files in this folder?")).toBeVisible({timeout: 10000}) await page.getByRole('button', { name: 'Yes, I trust the authors' }).click(); }) diff --git a/codeserver/e2e/tests/models/codeserver.ts b/codeserver/e2e/tests/models/codeserver.ts index 7e64b83ce..e0f5f9176 100644 --- a/codeserver/e2e/tests/models/codeserver.ts +++ b/codeserver/e2e/tests/models/codeserver.ts @@ -10,7 +10,7 @@ import * as path from "node:path"; export async function isEditorVisible(page): Promise { let editorSelector = "div.monaco-workbench" - await page.waitForSelector(editorSelector) + await page.waitForSelector(editorSelector, {timeout: 10000}) // this waits for initial load, let's wait longer const visible = await page.isVisible(editorSelector) // this.codeServer.logger.debug(`Editor is ${visible ? "not visible" : "visible"}!`)