Skip to content

Commit

Permalink
adds a delay to make testing more reliable
Browse files Browse the repository at this point in the history
  • Loading branch information
rishabhpoddar committed Oct 1, 2024
1 parent 0df1b50 commit f3b46d1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/end-to-end/mfa.helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ export async function setupUserWithAllFactors(page) {
await tryEmailPasswordSignUp(page, email);

await waitForSTElement(page, "[data-supertokens~='sendVerifyEmailIcon']");
// we wait for sometime so that the api to generate the token is called
await new Promise((res) => setTimeout(res, 500));
const latestURLWithToken = await getLatestURLWithToken();
await Promise.all([page.waitForNavigation({ waitUntil: "networkidle0" }), page.goto(latestURLWithToken)]);

Expand Down

0 comments on commit f3b46d1

Please sign in to comment.