Skip to content

Commit

Permalink
increase initial load timeouts and on ci
Browse files Browse the repository at this point in the history
  • Loading branch information
jiridanek committed Oct 28, 2024
1 parent 4fa4e20 commit 7f787aa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions codeserver/e2e/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down
2 changes: 1 addition & 1 deletion codeserver/e2e/tests/example.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
})

Expand Down
2 changes: 1 addition & 1 deletion codeserver/e2e/tests/models/codeserver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import * as path from "node:path";
export async function isEditorVisible(page): Promise<boolean> {
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"}!`)
Expand Down

0 comments on commit 7f787aa

Please sign in to comment.