@bigbinary/neeto-playwright-commons 1.8.25 → 1.8.26

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
@@ -12565,7 +12565,7 @@ const INTEGRATION_SELECTORS = {
12565
12565
  };
12566
12566
 
12567
12567
  class IntegrationBase {
12568
- constructor({ page, neetoPlaywrightUtilities, integration, integrationRouteIndex, connectHeader, connectedHeader, }) {
12568
+ constructor({ page, neetoPlaywrightUtilities, integration, connectHeader, connectedHeader, pageloaderTimeout, integrationRouteIndex, integrationRouteResponsesParams, }) {
12569
12569
  this.disconnect = async (interceptMultipleResponsesParams = {}) => {
12570
12570
  await this.gotoIntegrationIndex();
12571
12571
  await this.clickOnIntegrationCard();
@@ -12600,18 +12600,27 @@ class IntegrationBase {
12600
12600
  await test$1.expect(this.page.getByTestId(COMMON_SELECTORS.spinner)).toHaveCount(0);
12601
12601
  await this.integrationCard.scrollIntoViewIfNeeded();
12602
12602
  await this.integrationCard.click();
12603
- await test$1.expect(this.page.getByTestId(COMMON_SELECTORS.pageLoader)).toBeHidden();
12603
+ await test$1.expect(this.page.getByTestId(COMMON_SELECTORS.pageLoader)).toBeHidden({ timeout: this.pageloaderTimeout });
12604
12604
  };
12605
12605
  this.gotoIntegrationIndex = async () => {
12606
- neetoCist.isNotEmpty(this.integrationRouteIndex) &&
12607
- (await this.page.goto(this.integrationRouteIndex));
12606
+ if (neetoCist.isNotEmpty(this.integrationRouteIndex)) {
12607
+ const integrationIndexPromise = this.neetoPlaywrightUtilities.interceptMultipleResponses({
12608
+ times: 0,
12609
+ ...this.integrationRouteResponsesParams,
12610
+ });
12611
+ await this.page.goto(this.integrationRouteIndex);
12612
+ await integrationIndexPromise;
12613
+ }
12608
12614
  };
12609
12615
  this.page = page;
12610
12616
  this.neetoPlaywrightUtilities = neetoPlaywrightUtilities;
12611
12617
  this.t = playwrightI18nextFixture.getI18nInstance().t;
12612
12618
  this.integration = integration;
12613
12619
  this.integrationCard = this.page.getByTestId(INTEGRATION_SELECTORS.integrationCard(integration));
12620
+ this.pageloaderTimeout = pageloaderTimeout || 10000;
12614
12621
  this.integrationRouteIndex = integrationRouteIndex || "";
12622
+ this.integrationRouteResponsesParams =
12623
+ integrationRouteResponsesParams || {};
12615
12624
  this.connectHeader =
12616
12625
  connectHeader ||
12617
12626
  INTEGRATIONS_TEXTS.connectHeader(neetoCist.humanize(this.integration));