From 3f491ffea8c7b8434c49bc6cdbc051253a159a76 Mon Sep 17 00:00:00 2001 From: Harry Le Date: Wed, 4 Sep 2024 09:58:14 +0700 Subject: [PATCH] test: update new mfa flow --- .../login-with-passwordless/DashboardPage.ts | 2 +- .../auth-case-3.test.ts | 20 ++++--------------- authservice/utils/index.ts | 2 +- 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/authservice/login-with-passwordless/DashboardPage.ts b/authservice/login-with-passwordless/DashboardPage.ts index 3b2096e..42f626a 100644 --- a/authservice/login-with-passwordless/DashboardPage.ts +++ b/authservice/login-with-passwordless/DashboardPage.ts @@ -13,7 +13,7 @@ export class DashboardPage { } async getOpenLoginPrivateKey() { - return (await this.page.locator("text=Openlogin Private key").textContent()).split(" : ")[1]; + return (await this.page.locator("text=Web3Auth Private key").textContent()).split(" : ")[1]; } async getUserInfoObject() { diff --git a/authservice/login-with-passwordless/auth-case-3.test.ts b/authservice/login-with-passwordless/auth-case-3.test.ts index ee47a28..0a6a5d3 100644 --- a/authservice/login-with-passwordless/auth-case-3.test.ts +++ b/authservice/login-with-passwordless/auth-case-3.test.ts @@ -18,7 +18,7 @@ test.describe.serial("Passwordless Login scenarios", () => { await loginPage.gotoLoginPage(authServiceURL); await loginPage.selectBuildEnv("staging"); - await loginPage.selectAllMFAFactor(); + await loginPage.selectMFAFactor(["PASSWORD", "AUTHENTICATOR"]); await loginPage.selectMFALevel("mandatory"); await loginPage.selectMFAMandantory(["PASSWORD", "AUTHENTICATOR"]); await loginPage.selectOpenloginNetwork("mainnet"); @@ -45,29 +45,17 @@ test.describe.serial("Passwordless Login scenarios", () => { await authServicePage.clickSetup2FA(); - // SKIP DEVICE FACTOR - - await authServicePage.skipTheFactorSetup(); - - // SKIP SOCIAL FACTOR - - await authServicePage.skipTheFactorSetup(); - // SETUP AUTHENTICATOR FACTOR - const secret = await authServicePage.setupAuthenticator(); - - // SKIP RECOVERY FACTOR - - await authServicePage.skipTheFactorSetup(); + const secret = await authServicePage.setupAuthenticatorNewMFAFlow(); // SETUP PASSWORD - await authServicePage.inputPasswordFactor(passwordTestingFactor); + await authServicePage.inputPasswordFactorNewMFAFlow(passwordTestingFactor); // SKIP PASSKEY - await authServicePage.skipPasskeySetup(); + await authServicePage.finishSetupNewMFAList(); await authServicePage.confirmDone2FASetup(); const privateKey = await dashboardPage.getOpenLoginPrivateKey(); diff --git a/authservice/utils/index.ts b/authservice/utils/index.ts index 97459ef..a58cd30 100644 --- a/authservice/utils/index.ts +++ b/authservice/utils/index.ts @@ -22,7 +22,7 @@ const env_map: { [key: string]: string } = { demoV4: "https://demo-openlogin-v4.web3auth.io/", demoV6: "https://demo-openlogin-v6.web3auth.io/", }; -export const authServiceURL = "https://demo-openlogin-v8.web3auth.io/"; +export const authServiceURL = "https://demo-openlogin.web3auth.io/"; function delay(time: number | undefined) { return new Promise(function (resolve) {