Skip to content

Commit

Permalink
chore: Only wait until an external domain started loading its document
Browse files Browse the repository at this point in the history
  • Loading branch information
flozia committed Sep 27, 2024
1 parent 844caf2 commit 71a0336
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/e2e/global-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ async function globalSetup(config: FullConfig) {

// commenting out as this its not needed for now
// // go to sign up page
await page.goto(process.env.E2E_TEST_BASE_URL as string);
await page.waitForLoadState("domcontentloaded");
await page.goto(process.env.E2E_TEST_BASE_URL as string, {
waitUntil: "domcontentloaded",
});
const landingPage = new LandingPage(page);
await landingPage.goToSignIn();

Expand Down
4 changes: 3 additions & 1 deletion src/e2e/utils/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,9 @@ export const clickOnATagCheckDomain = async (
const href = await aTag.getAttribute("href");
if (href === null) return false;

await page.goto(href);
await page.goto(href, {
waitUntil: "commit",
});
const currentUrl = new URL(page.url());
const perceivedHost = currentUrl.hostname;
const perceivedPath = currentUrl.pathname;
Expand Down

0 comments on commit 71a0336

Please sign in to comment.