Skip to content

Commit 46f14c2

Browse files
authored
test flake: double default expect timeout to 10s (#2729)
* double default expect timeout to 10s * remove 10s overrides now that it's default
1 parent a64dbb8 commit 46f14c2

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

playwright.config.ts

+3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ export default {
2121
workers: process.env.CI ? '100%' : undefined,
2222
timeout: 60 * 1000, // 1 minute
2323
fullyParallel: true,
24+
// default is 5 seconds. somehow playwright really hates async route modules,
25+
// takes a long time to load them. https://playwright.dev/docs/test-timeouts
26+
expect: { timeout: 10_000 },
2427
use: {
2528
trace: process.env.CI ? 'on-first-retry' : 'retain-on-failure',
2629
baseURL: 'http://localhost:4009',

test/e2e/breadcrumbs.e2e.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ async function getCrumbs(page: Page) {
2121
type Pair = [string, string]
2222

2323
async function expectCrumbs(page: Page, crumbs: Pair[]) {
24-
await expect.poll(() => getCrumbs(page), { timeout: 10000 }).toEqual(crumbs)
24+
await expect.poll(() => getCrumbs(page)).toEqual(crumbs)
2525
}
2626

2727
const projectCrumbs: Pair[] = [

test/e2e/image-upload.e2e.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ test.describe('Image upload', () => {
141141

142142
// wait to be in the middle of the specified step
143143
const uploadStep = page.getByTestId(`upload-step: ${state}`)
144-
await expect(uploadStep).toHaveAttribute('data-status', 'running', { timeout: 10000 })
144+
await expect(uploadStep).toHaveAttribute('data-status', 'running')
145145

146146
// form is disabled and semi-hidden
147147
// await expectNotVisible(page, ['role=textbox[name="Name"]'])
@@ -159,8 +159,7 @@ test.describe('Image upload', () => {
159159
await page.getByRole('button', { name: 'Cancel' }).click()
160160
await page.getByRole('link', { name: 'Disks' }).click()
161161
await expect(page.getByRole('cell', { name: 'disk-1', exact: true })).toBeVisible()
162-
// needs a little extra time for delete to go through
163-
await expect(page.getByRole('cell', { name: 'tmp' })).toBeHidden({ timeout: 10000 })
162+
await expect(page.getByRole('cell', { name: 'tmp' })).toBeHidden()
164163
})
165164
}
166165

0 commit comments

Comments
 (0)