Skip to content

Commit

Permalink
test: update new mfa flow
Browse files Browse the repository at this point in the history
  • Loading branch information
LeVinhGithub committed Sep 4, 2024
1 parent dac7216 commit 3f491ff
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 18 deletions.
2 changes: 1 addition & 1 deletion authservice/login-with-passwordless/DashboardPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
20 changes: 4 additions & 16 deletions authservice/login-with-passwordless/auth-case-3.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion authservice/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 3f491ff

Please sign in to comment.