From 2f7c93dbd4d3e370a2b232dbf72d27d93633a44d Mon Sep 17 00:00:00 2001 From: Favour Ohans Date: Thu, 5 Sep 2024 12:47:49 +0100 Subject: [PATCH] Fix tests --- test/end-to-end/emailverification.test.js | 5 ++++- test/helpers.js | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/test/end-to-end/emailverification.test.js b/test/end-to-end/emailverification.test.js index 585d9d08e..468a80ea5 100644 --- a/test/end-to-end/emailverification.test.js +++ b/test/end-to-end/emailverification.test.js @@ -371,7 +371,10 @@ describe("SuperTokens Email Verification", function () { assert.deepStrictEqual(generalSuccess, "Email resent"); // Click on Logout should remove session and redirect to login page - await Promise.all([clickLinkWithRightArrow(page), page.waitForNavigation({ waitUntil: "networkidle0" })]); + await Promise.all([ + logoutFromEmailVerification(page), + page.waitForNavigation({ waitUntil: "networkidle0" }), + ]); await waitForUrl(page, "/auth/"); assert.deepStrictEqual(consoleLogs, [ "ST_LOGS SESSION OVERRIDE ADD_FETCH_INTERCEPTORS_AND_RETURN_MODIFIED_FETCH", diff --git a/test/helpers.js b/test/helpers.js index bb8b123e3..4cbaf99d3 100644 --- a/test/helpers.js +++ b/test/helpers.js @@ -368,7 +368,7 @@ export async function logoutFromEmailVerification(page) { ({ ST_ROOT_SELECTOR }) => document .querySelector(ST_ROOT_SELECTOR) - .shadowRoot.querySelector("[data-supertokens~='secondaryLinkWithArrow']") + .shadowRoot.querySelector("[data-supertokens~='buttonWithArrow']") .click(), { ST_ROOT_SELECTOR } );