Skip to content

Commit

Permalink
Reduce e2e flake (#2113)
Browse files Browse the repository at this point in the history
* try waiting for tab query param to show up

* retain more traces
  • Loading branch information
david-crespo authored Mar 30, 2024
1 parent 1954709 commit d5d70bd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default {
timeout: 2 * 60 * 1000, // 2 minutes, surely overkill
fullyParallel: true,
use: {
trace: 'retain-on-failure',
trace: 'on-first-retry',
baseURL: 'http://localhost:4009',
},
projects: [
Expand Down
6 changes: 3 additions & 3 deletions test/e2e/ip-pools.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ test('IP pool silo list', async ({ page }) => {
await expect(page).toHaveTitle('ip-pool-1 / IP pools / Oxide Console')

await page.getByRole('tab', { name: 'Linked silos' }).click()
// this is here because waiting for the `tab` query param to show up avoids
// flake after the goBack bit below
await expect(page).toHaveURL('/system/networking/ip-pools/ip-pool-1?tab=silos')

const table = page.getByRole('table')
await expectRowVisible(table, { Silo: 'maze-war', 'Pool is silo default?': 'default' })
Expand All @@ -49,9 +52,6 @@ test('IP pool silo list', async ({ page }) => {
const siloLink = page.getByRole('link', { name: 'maze-war' })
await siloLink.click()
await expect(page).toHaveURL('/system/silos/maze-war?tab=ip-pools')
// these asserts are mostly here to kill some time before goBack
await expectRowVisible(table, { name: 'ip-pool-1', Default: 'default' })
await expectRowVisible(table, { name: 'ip-pool-2' })
await page.goBack()

// unlink silo and the row is gone
Expand Down

0 comments on commit d5d70bd

Please sign in to comment.