@bigbinary/neeto-playwright-commons 2.2.1 → 2.2.2
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 +7 -0
- package/index.cjs.js.map +1 -1
- package/index.d.ts +2 -0
- package/index.js +7 -0
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -5433,6 +5433,7 @@ const LOGIN_SELECTORS = {
|
|
|
5433
5433
|
twitterAuthenticationButton: "twitter-authentication-button",
|
|
5434
5434
|
authenticatorAppOtpInput: "authenticator-app-otp-login-code-input",
|
|
5435
5435
|
enterOtpInputError: "enter-otp-input-error",
|
|
5436
|
+
authenticatorAppLaterButton: "authenticator-app-promo-later-button",
|
|
5436
5437
|
};
|
|
5437
5438
|
|
|
5438
5439
|
const MEMBER_SELECTORS = {
|
|
@@ -8561,6 +8562,10 @@ class OrganizationPage {
|
|
|
8561
8562
|
await submitButton.click();
|
|
8562
8563
|
await test.expect(submitButton).toBeHidden({ timeout: 35_000 });
|
|
8563
8564
|
};
|
|
8565
|
+
dismissAuthenticatorSetupPromptIfPresent = async () => {
|
|
8566
|
+
const maybeLaterButton = this.page.getByTestId(LOGIN_SELECTORS.authenticatorAppLaterButton);
|
|
8567
|
+
(await maybeLaterButton.isVisible()) && (await maybeLaterButton.click());
|
|
8568
|
+
};
|
|
8564
8569
|
createOrganization = async ({ email, businessName, subdomainName, firstName, lastName, appName, }) => {
|
|
8565
8570
|
if (shouldSkipSetupAndTeardown())
|
|
8566
8571
|
return;
|
|
@@ -8704,11 +8709,13 @@ class OrganizationPage {
|
|
|
8704
8709
|
}
|
|
8705
8710
|
await this.fillEmailAndSubmit(email, loginTimeout);
|
|
8706
8711
|
await this.fillOTP();
|
|
8712
|
+
await this.dismissAuthenticatorSetupPromptIfPresent();
|
|
8707
8713
|
};
|
|
8708
8714
|
loginWithFastmailEmail = async ({ email, loginTimeout = 2 * 60 * 1000, fetchOtpFromEmail, }) => {
|
|
8709
8715
|
await this.fillEmailAndSubmit(email, loginTimeout);
|
|
8710
8716
|
const otp = await fetchOtpFromEmail({ email, timeout: 4 * 60 * 1000 });
|
|
8711
8717
|
await this.fillOTP(otp);
|
|
8718
|
+
await this.dismissAuthenticatorSetupPromptIfPresent();
|
|
8712
8719
|
};
|
|
8713
8720
|
setupProfile = async ({ firstName = faker.faker.person.firstName(), lastName = faker.faker.person.lastName(), country, } = {}) => {
|
|
8714
8721
|
if (IS_DEV_ENV)
|