Skip to content

Commit

Permalink
Alternative waiting mechanism
Browse files Browse the repository at this point in the history
  • Loading branch information
rob-gordon committed Jul 21, 2024
1 parent b13e582 commit 7df8666
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions app/e2e/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,12 @@ export const BASE_URL = process.env.E2E_START_URL ?? "http://localhost:3000";
const EMAIL_DOMAINS_LIST: string[] = [];

export async function goToPath(page: Page, path = "") {
await page.goto(`${BASE_URL}${path ? `/${path}` : ""}?skipAnimation=true`, {
waitUntil: "networkidle",
});
await page.goto(`${BASE_URL}${path ? `/${path}` : ""}?skipAnimation=true`);

// If we're on the root route, also wait until the .monaco-editor is present
if (path === "") {
await page.waitForSelector(".monaco-editor");
}
}

export async function goToTab(page: Page, tabName: string) {
Expand Down

0 comments on commit 7df8666

Please sign in to comment.