Skip to content

Commit

Permalink
Fix flaky e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
JammingBen committed Mar 8, 2023
1 parent b3f0a6c commit 4fce834
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions tests/e2e/support/objects/app-admin-settings/users/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,14 @@ export const filterUsers = async (args: {
const { page, filter, values } = args
await page.locator(util.format(userFilter, filter)).click()
for (const value of values) {
await page.locator(util.format(userFilterOption, value)).click()
await page.waitForResponse(
(resp) =>
resp.url().includes('/users') && resp.status() === 200 && resp.request().method() === 'GET'
)
await Promise.all([
page.waitForResponse(
(resp) =>
resp.url().includes('/users') &&
resp.status() === 200 &&
resp.request().method() === 'GET'
),
page.locator(util.format(userFilterOption, value)).click()
])
}
}

0 comments on commit 4fce834

Please sign in to comment.