@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.d.ts CHANGED
@@ -4450,6 +4450,7 @@ declare class OrganizationPage {
4450
4450
  constructor(page: Page, neetoPlaywrightUtilities: CustomCommands);
4451
4451
  private fillOTP;
4452
4452
  private submitEmail;
4453
+ private dismissAuthenticatorSetupPromptIfPresent;
4453
4454
  /**
4454
4455
  *
4455
4456
  * Used to create a new organization. It takes the following parameters:
@@ -6931,6 +6932,7 @@ declare const LOGIN_SELECTORS: {
6931
6932
  twitterAuthenticationButton: string;
6932
6933
  authenticatorAppOtpInput: string;
6933
6934
  enterOtpInputError: string;
6935
+ authenticatorAppLaterButton: string;
6934
6936
  };
6935
6937
  /**
6936
6938
  *
package/index.js CHANGED
@@ -5412,6 +5412,7 @@ const LOGIN_SELECTORS = {
5412
5412
  twitterAuthenticationButton: "twitter-authentication-button",
5413
5413
  authenticatorAppOtpInput: "authenticator-app-otp-login-code-input",
5414
5414
  enterOtpInputError: "enter-otp-input-error",
5415
+ authenticatorAppLaterButton: "authenticator-app-promo-later-button",
5415
5416
  };
5416
5417
 
5417
5418
  const MEMBER_SELECTORS = {
@@ -8540,6 +8541,10 @@ class OrganizationPage {
8540
8541
  await submitButton.click();
8541
8542
  await expect(submitButton).toBeHidden({ timeout: 35_000 });
8542
8543
  };
8544
+ dismissAuthenticatorSetupPromptIfPresent = async () => {
8545
+ const maybeLaterButton = this.page.getByTestId(LOGIN_SELECTORS.authenticatorAppLaterButton);
8546
+ (await maybeLaterButton.isVisible()) && (await maybeLaterButton.click());
8547
+ };
8543
8548
  createOrganization = async ({ email, businessName, subdomainName, firstName, lastName, appName, }) => {
8544
8549
  if (shouldSkipSetupAndTeardown())
8545
8550
  return;
@@ -8683,11 +8688,13 @@ class OrganizationPage {
8683
8688
  }
8684
8689
  await this.fillEmailAndSubmit(email, loginTimeout);
8685
8690
  await this.fillOTP();
8691
+ await this.dismissAuthenticatorSetupPromptIfPresent();
8686
8692
  };
8687
8693
  loginWithFastmailEmail = async ({ email, loginTimeout = 2 * 60 * 1000, fetchOtpFromEmail, }) => {
8688
8694
  await this.fillEmailAndSubmit(email, loginTimeout);
8689
8695
  const otp = await fetchOtpFromEmail({ email, timeout: 4 * 60 * 1000 });
8690
8696
  await this.fillOTP(otp);
8697
+ await this.dismissAuthenticatorSetupPromptIfPresent();
8691
8698
  };
8692
8699
  setupProfile = async ({ firstName = faker.person.firstName(), lastName = faker.person.lastName(), country, } = {}) => {
8693
8700
  if (IS_DEV_ENV)