Skip to content

Commit

Permalink
fix: await networkidle in navtoheader
Browse files Browse the repository at this point in the history
  • Loading branch information
innerdvations committed Apr 28, 2024
1 parent 9044fdc commit cf2e764
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/e2e/utils/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const navToHeader = async (page: Page, navItems: string[], headerText: st
// As a workaround, we implement our own startsWith with page.locator
const item = page.locator(`role=link[name^="${navItem}"]`);
await expect(item).toBeVisible();
await item.click();
await Promise.all([item.click(), page.waitForLoadState('networkidle')]);
}

const header = page.getByRole('heading', { name: headerText, exact: true });
Expand Down

0 comments on commit cf2e764

Please sign in to comment.