@bigbinary/neeto-playwright-commons 3.3.6 → 3.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs.js +11 -8
- package/index.cjs.js.map +1 -1
- package/index.js +11 -8
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -119697,20 +119697,23 @@ class MicrosoftPage extends IntegrationBase {
|
|
|
119697
119697
|
isNil(process.env.MICROSOFT_2FA_SECRET_KEY)) {
|
|
119698
119698
|
throw new Error("ENV variable MICROSOFT_LOGIN_EMAIL or MICROSOFT_LOGIN_PASSWORD or MICROSOFT_2FA_SECRET_KEY is not properly configured");
|
|
119699
119699
|
}
|
|
119700
|
+
const useVerificationCodeButton = this.page.getByRole("button", {
|
|
119701
|
+
name: MICROSOFT_LOGIN_TEXTS.useVerificationCode,
|
|
119702
|
+
});
|
|
119700
119703
|
await this.page.goto(THIRD_PARTY_ROUTES.microsoft.login);
|
|
119701
119704
|
await this.enterEmail();
|
|
119702
119705
|
await this.page
|
|
119703
119706
|
.getByRole("button", { name: MICROSOFT_LOGIN_TEXTS.next })
|
|
119704
119707
|
.click();
|
|
119705
119708
|
await this.enterPassword();
|
|
119706
|
-
|
|
119707
|
-
|
|
119708
|
-
|
|
119709
|
-
await
|
|
119710
|
-
|
|
119711
|
-
|
|
119712
|
-
})
|
|
119713
|
-
.click();
|
|
119709
|
+
const signInButton = this.page.getByRole("button", {
|
|
119710
|
+
name: MICROSOFT_LOGIN_TEXTS.signIn,
|
|
119711
|
+
});
|
|
119712
|
+
await signInButton.click();
|
|
119713
|
+
await expect(signInButton).toBeHidden({ timeout: 10_000 });
|
|
119714
|
+
await this.page.waitForLoadState("load", { timeout: 25_000 });
|
|
119715
|
+
(await useVerificationCodeButton.isVisible({ timeout: 20_000 })) &&
|
|
119716
|
+
(await useVerificationCodeButton.click());
|
|
119714
119717
|
await this.enterTotpCode();
|
|
119715
119718
|
await this.staySignedIn();
|
|
119716
119719
|
}, ["microsoft.com", "live.com", "microsoftonline.com"]);
|