@bigbinary/neeto-playwright-commons 1.8.4 → 1.8.5

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.js CHANGED
@@ -7667,7 +7667,11 @@ class OrganizationPage {
7667
7667
  await this.page
7668
7668
  .getByTestId(SIGNUP_SELECTORS.organizationNameTextField)
7669
7669
  .fill(businessName);
7670
- const fetchSubdomainAvailability = this.page.waitForResponse(response => response.url().includes(ROUTES.subdomainAvailability));
7670
+ const fetchSubdomainAvailability = this.neetoPlaywrightUtilities.interceptMultipleResponses({
7671
+ responseUrl: ROUTES.subdomainAvailability,
7672
+ timeout: 60 * 1000,
7673
+ baseUrl: NEETO_AUTH_BASE_URL(),
7674
+ });
7671
7675
  await this.page
7672
7676
  .getByTestId(SIGNUP_SELECTORS.subdomainNameTextField)
7673
7677
  .fill(subdomainName);
@@ -7677,13 +7681,15 @@ class OrganizationPage {
7677
7681
  if (subdomainErrorCount !== 0) {
7678
7682
  await this.updateSubdomainIfExists(appNameInLowerCase);
7679
7683
  }
7684
+ const fetchProfile = this.neetoPlaywrightUtilities.interceptMultipleResponses({
7685
+ times: 2,
7686
+ timeout: 60 * 1000,
7687
+ baseUrl: NEETO_AUTH_BASE_URL(),
7688
+ });
7680
7689
  await this.page
7681
7690
  .getByTestId(SIGNUP_SELECTORS.organizationSubmitButton)
7682
7691
  .click();
7683
- await Promise.all([
7684
- this.page.waitForResponse(response => response.url().includes(ROUTES.signup)),
7685
- this.page.waitForResponse(response => response.url().includes(ROUTES.countries)),
7686
- ]);
7692
+ await fetchProfile;
7687
7693
  await this.page.waitForURL(`**${ROUTES.profile}`, { timeout: 60 * 1000 });
7688
7694
  await this.page
7689
7695
  .getByTestId(SIGNUP_SELECTORS.firstNameTextField)
@@ -7734,10 +7740,15 @@ class OrganizationPage {
7734
7740
  if (subdomainErrorCount !== 0) {
7735
7741
  const subdomainErrorText = await subdomainError.innerText();
7736
7742
  const newOrganizationName = extractSubdomainFromError(subdomainErrorText);
7743
+ const subdomainAvailability = this.neetoPlaywrightUtilities.interceptMultipleResponses({
7744
+ responseUrl: ROUTES.subdomainAvailability,
7745
+ timeout: 60 * 1000,
7746
+ baseUrl: NEETO_AUTH_BASE_URL(),
7747
+ });
7737
7748
  await this.page
7738
7749
  .getByTestId(SIGNUP_SELECTORS.subdomainNameTextField)
7739
7750
  .fill(newOrganizationName);
7740
- await this.page.waitForResponse(response => response.url().includes(ROUTES.subdomainAvailability));
7751
+ await subdomainAvailability;
7741
7752
  subdomainErrorCount = await subdomainError.count();
7742
7753
  if (subdomainErrorCount === 0) {
7743
7754
  updateCredentials({