@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.cjs.js CHANGED
@@ -7702,7 +7702,11 @@ class OrganizationPage {
7702
7702
  await this.page
7703
7703
  .getByTestId(SIGNUP_SELECTORS.organizationNameTextField)
7704
7704
  .fill(businessName);
7705
- const fetchSubdomainAvailability = this.page.waitForResponse(response => response.url().includes(ROUTES.subdomainAvailability));
7705
+ const fetchSubdomainAvailability = this.neetoPlaywrightUtilities.interceptMultipleResponses({
7706
+ responseUrl: ROUTES.subdomainAvailability,
7707
+ timeout: 60 * 1000,
7708
+ baseUrl: NEETO_AUTH_BASE_URL(),
7709
+ });
7706
7710
  await this.page
7707
7711
  .getByTestId(SIGNUP_SELECTORS.subdomainNameTextField)
7708
7712
  .fill(subdomainName);
@@ -7712,13 +7716,15 @@ class OrganizationPage {
7712
7716
  if (subdomainErrorCount !== 0) {
7713
7717
  await this.updateSubdomainIfExists(appNameInLowerCase);
7714
7718
  }
7719
+ const fetchProfile = this.neetoPlaywrightUtilities.interceptMultipleResponses({
7720
+ times: 2,
7721
+ timeout: 60 * 1000,
7722
+ baseUrl: NEETO_AUTH_BASE_URL(),
7723
+ });
7715
7724
  await this.page
7716
7725
  .getByTestId(SIGNUP_SELECTORS.organizationSubmitButton)
7717
7726
  .click();
7718
- await Promise.all([
7719
- this.page.waitForResponse(response => response.url().includes(ROUTES.signup)),
7720
- this.page.waitForResponse(response => response.url().includes(ROUTES.countries)),
7721
- ]);
7727
+ await fetchProfile;
7722
7728
  await this.page.waitForURL(`**${ROUTES.profile}`, { timeout: 60 * 1000 });
7723
7729
  await this.page
7724
7730
  .getByTestId(SIGNUP_SELECTORS.firstNameTextField)
@@ -7769,10 +7775,15 @@ class OrganizationPage {
7769
7775
  if (subdomainErrorCount !== 0) {
7770
7776
  const subdomainErrorText = await subdomainError.innerText();
7771
7777
  const newOrganizationName = extractSubdomainFromError(subdomainErrorText);
7778
+ const subdomainAvailability = this.neetoPlaywrightUtilities.interceptMultipleResponses({
7779
+ responseUrl: ROUTES.subdomainAvailability,
7780
+ timeout: 60 * 1000,
7781
+ baseUrl: NEETO_AUTH_BASE_URL(),
7782
+ });
7772
7783
  await this.page
7773
7784
  .getByTestId(SIGNUP_SELECTORS.subdomainNameTextField)
7774
7785
  .fill(newOrganizationName);
7775
- await this.page.waitForResponse(response => response.url().includes(ROUTES.subdomainAvailability));
7786
+ await subdomainAvailability;
7776
7787
  subdomainErrorCount = await subdomainError.count();
7777
7788
  if (subdomainErrorCount === 0) {
7778
7789
  updateCredentials({