Skip to content

Commit f3b46d1

Browse files
committed
adds a delay to make testing more reliable
1 parent 0df1b50 commit f3b46d1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/end-to-end/mfa.helpers.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ export async function setupUserWithAllFactors(page) {
3030
await tryEmailPasswordSignUp(page, email);
3131

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

0 commit comments

Comments
 (0)