From f3b46d1933ff80607f26fbde5f9892894e42cf87 Mon Sep 17 00:00:00 2001 From: rishabhpoddar Date: Tue, 1 Oct 2024 16:52:06 +0530 Subject: [PATCH] adds a delay to make testing more reliable --- test/end-to-end/mfa.helpers.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/end-to-end/mfa.helpers.js b/test/end-to-end/mfa.helpers.js index 12b6cd938..51a2f7dc8 100644 --- a/test/end-to-end/mfa.helpers.js +++ b/test/end-to-end/mfa.helpers.js @@ -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)]);