@bigbinary/neeto-playwright-commons 1.11.12 → 1.11.14

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
@@ -3599,23 +3599,23 @@ class CustomCommands {
3599
3599
  })}`;
3600
3600
  return await this.request[method](formattedUrl, requestOptions);
3601
3601
  };
3602
- this.selectOptionFromDropdown = async ({ selectValueContainer, selectMenu, value, options = {}, }) => {
3602
+ this.selectOptionFromDropdown = async ({ selectValueContainer = COMMON_SELECTORS.selectValueContainer, selectMenu = COMMON_SELECTORS.dropdownMenu, value, page = this.page, options = {}, }) => {
3603
3603
  Object.assign({
3604
3604
  visibilityTimeout: 2000,
3605
3605
  textAssertionTimeout: 1000,
3606
3606
  retryTimeout: 20000,
3607
3607
  }, options);
3608
3608
  await test$1.expect(async () => {
3609
- await this.page.getByTestId(selectValueContainer).click();
3610
- await test$1.expect(this.page.getByTestId(selectMenu)).toBeVisible({
3609
+ await page.getByTestId(selectValueContainer).click();
3610
+ await test$1.expect(page.getByTestId(selectMenu)).toBeVisible({
3611
3611
  timeout: options.visibilityTimeout,
3612
3612
  });
3613
- await this.page.keyboard.type(value);
3614
- await this.page
3613
+ await page.keyboard.type(value);
3614
+ await page
3615
3615
  .getByTestId(selectMenu)
3616
3616
  .getByText(value, { exact: true })
3617
3617
  .click();
3618
- await test$1.expect(this.page.getByTestId(selectValueContainer)).toContainText(value, { timeout: options.textAssertionTimeout });
3618
+ await test$1.expect(page.getByTestId(selectValueContainer)).toContainText(value, { timeout: options.textAssertionTimeout });
3619
3619
  }).toPass({ timeout: options.retryTimeout });
3620
3620
  };
3621
3621
  this.verifyFieldValue = values => {
@@ -13116,7 +13116,9 @@ const ZAPIER_WEB_TEXTS = {
13116
13116
  trialEndsRegExp: "Trial ends on",
13117
13117
  testCurrentlyInQueue: "Test currently in queue",
13118
13118
  welcomeText: (zapierLoginEmail) => `Welcome back ${zapierLoginEmail}`,
13119
- connectNeetoFormStaging: "Connect neetoForm Staging",
13119
+ connectStagingApp: (appName) => `Connect ${appName} Staging`,
13120
+ zapierWorkflowTriggered: "Zapier Workflow Triggered",
13121
+ confirmPublishing: "Confirm Publishing",
13120
13122
  };
13121
13123
  const TOASTR_MESSAGES = {
13122
13124
  zapierApiKeyGenerated: "Zapier API key is generated successfully!",
@@ -15688,6 +15690,7 @@ const ZAPIER_SELECTORS = {
15688
15690
  universalSidebar: "[data-testid='universalSidebar']",
15689
15691
  sidebarFooter: "css=[class$=InAppSidebarFooter__footerWrapper]",
15690
15692
  contextualSideBar: "[data-testid='contextual-sidebar']",
15693
+ iconContainer: "[data-testid='iconContainer']",
15691
15694
  };
15692
15695
 
15693
15696
  class ZapierPage extends IntegrationBase {
@@ -15721,7 +15724,7 @@ class ZapierPage extends IntegrationBase {
15721
15724
  });
15722
15725
  await this.zapierWebPage.close();
15723
15726
  };
15724
- this.reconnectAccountAndPublish = async (zapierApiKey) => {
15727
+ this.reconnectAccountAndPublish = async (zapierApiKey, appName) => {
15725
15728
  var _a;
15726
15729
  await this.zapierWebPage.goto(THIRD_PARTY_ROUTES.zapier.zapEditor(process.env.ZAP_ID));
15727
15730
  await this.zapierWebPage
@@ -15735,7 +15738,9 @@ class ZapierPage extends IntegrationBase {
15735
15738
  }
15736
15739
  const signInPagePromise = this.zapierWebPage.waitForEvent("popup");
15737
15740
  await this.zapierWebPage
15738
- .getByRole("button", { name: ZAPIER_WEB_TEXTS.connectNeetoFormStaging })
15741
+ .getByRole("button", {
15742
+ name: ZAPIER_WEB_TEXTS.connectStagingApp(appName),
15743
+ })
15739
15744
  .click();
15740
15745
  const signInPage = await signInPagePromise;
15741
15746
  await signInPage.waitForLoadState();
@@ -15775,9 +15780,10 @@ class ZapierPage extends IntegrationBase {
15775
15780
  .getByRole("button", {
15776
15781
  name: ZAPIER_WEB_TEXTS.continueWithSelectedRecord,
15777
15782
  })
15778
- .click({ timeout: 20000 });
15779
- await this.continueButton.click();
15780
- await this.continueButton.click();
15783
+ .click({ timeout: 30000 });
15784
+ await this.continueButton.click({ timeout: 20000 });
15785
+ await test$1.expect(this.zapierWebPage.getByText(ZAPIER_WEB_TEXTS.zapierWorkflowTriggered)).toBeVisible();
15786
+ await this.continueButton.click({ timeout: 20000 });
15781
15787
  await this.zapierWebPage
15782
15788
  .getByLabel(ZAPIER_WEB_TEXTS.publish, { exact: true })
15783
15789
  .or(this.zapierWebPage
@@ -15785,11 +15791,16 @@ class ZapierPage extends IntegrationBase {
15785
15791
  .getByRole("button", { name: ZAPIER_WEB_TEXTS.publish }))
15786
15792
  .click({ timeout: 20000 });
15787
15793
  await this.zapierWebPage
15794
+ .getByRole("button", { name: ZAPIER_WEB_TEXTS.confirmPublishing })
15795
+ .or(this.zapierWebPage
15788
15796
  .locator(ZAPIER_SELECTORS.modal)
15789
15797
  .getByLabel(ZAPIER_WEB_TEXTS.publish)
15790
15798
  .or(this.zapierWebPage
15791
15799
  .locator(ZAPIER_SELECTORS.modal)
15792
- .getByRole("button", { name: ZAPIER_WEB_TEXTS.publish, exact: true }))
15800
+ .getByRole("button", {
15801
+ name: ZAPIER_WEB_TEXTS.publish,
15802
+ exact: true,
15803
+ })))
15793
15804
  .click();
15794
15805
  await this.zapierWebPage
15795
15806
  .getByLabel(ZAPIER_WEB_TEXTS.publishingZapHeading)