@bigbinary/neeto-playwright-commons 1.9.28 → 1.9.30

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
@@ -284,6 +284,10 @@ const getByDataQA = ramda.curry((page, dataQa) => {
284
284
  .locator(`[data-qa='${dataQa[0]}']`)
285
285
  .locator(`[data-qa='${dataQa[1]}']`);
286
286
  });
287
+ const getListCount = async ({ page, countSelector, }) => {
288
+ const countText = await page.getByTestId(countSelector).textContent();
289
+ return Number(countText === null || countText === void 0 ? void 0 : countText.trim().split(" ")[0]);
290
+ };
287
291
 
288
292
  const COMMON_SELECTORS = {
289
293
  emailInputError: "email-input-error",
@@ -360,6 +364,7 @@ const COMMON_SELECTORS = {
360
364
  takeActionDropdown: "take-action-dropdown-icon",
361
365
  columnsSearchInput: "neeto-ui-columns-search",
362
366
  errorToastIcon: "error-toast-icon",
367
+ nuiRadioLabel: "nui-radio-label",
363
368
  };
364
369
 
365
370
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
@@ -13882,10 +13887,10 @@ class IntegrationBase {
13882
13887
  })).toBeVisible();
13883
13888
  await this.page.getByTestId(INTEGRATION_SELECTORS.connectButton).click();
13884
13889
  };
13885
- this.verifyIntegrationStatus = async (status = "connected") => {
13890
+ this.verifyIntegrationStatus = async (status = "connected", visibilityTimeout = 15000) => {
13886
13891
  await this.gotoIntegrationIndex();
13887
13892
  if (status === "connected") {
13888
- await test$1.expect(this.integrationCard.getByTestId(INTEGRATION_SELECTORS.integrationStatusTag)).toBeVisible({ timeout: 10000 });
13893
+ await test$1.expect(this.integrationCard.getByTestId(INTEGRATION_SELECTORS.integrationStatusTag)).toBeVisible({ timeout: visibilityTimeout });
13889
13894
  }
13890
13895
  await this.clickOnIntegrationCard();
13891
13896
  const header = status === "connected" ? this.connectedHeader : this.connectHeader;
@@ -13972,7 +13977,11 @@ class SlackPage extends IntegrationBase {
13972
13977
  const slackWebappPageDataQa = getByDataQA(slackWebappPage);
13973
13978
  await slackWebappPage.addLocatorHandler(slackWebappPageDataQa(SLACK_DATA_QA_SELECTORS.coachMarkCloseButton), () => slackWebappPageDataQa(SLACK_DATA_QA_SELECTORS.coachMarkCloseButton).click());
13974
13979
  await slackWebappPage.addLocatorHandler(slackWebappPageDataQa(SLACK_DATA_QA_SELECTORS.messagePaneBannerCloseIcon), () => slackWebappPageDataQa(SLACK_DATA_QA_SELECTORS.messagePaneBannerCloseIcon).click());
13975
- await slackWebappPage.addLocatorHandler(slackWebappPageDataQa(SLACK_DATA_QA_SELECTORS.permissionBannerCloseIcon), () => slackWebappPageDataQa(SLACK_DATA_QA_SELECTORS.permissionBannerCloseIcon).click());
13980
+ const permissionBannerCloseIcon = slackWebappPageDataQa(SLACK_DATA_QA_SELECTORS.permissionBannerCloseIcon);
13981
+ await slackWebappPage.addLocatorHandler(permissionBannerCloseIcon, async () => {
13982
+ await permissionBannerCloseIcon.click();
13983
+ await permissionBannerCloseIcon.click();
13984
+ });
13976
13985
  };
13977
13986
  this.connectAndVerifyIntegration = async (redirectUrl, customSteps, channelToConfigure = SLACK_DEFAULT_CHANNEL) => {
13978
13987
  await this.connect();
@@ -14914,7 +14923,7 @@ const MEMBER_SELECTORS = {
14914
14923
  deactivateButton: "ntm-deactivate-members-button",
14915
14924
  rolesButton: "ntm-manage-member-roles-button",
14916
14925
  statusTag: "ntm-member-status-tag",
14917
- menubarSubLink: (sublink) => `members-menubar-${sublink}-block-sub-link`,
14926
+ menubarSubLink: (sublink) => `members-${sublink}-block-sub-link`,
14918
14927
  takeActionStateOption: (option = "") => `ntm-${hyphenize(option)}-members-button`,
14919
14928
  checkboxLabel: (label) => `${hyphenize(label)}-checkbox-label`,
14920
14929
  };
@@ -14952,8 +14961,9 @@ class TeamMembers {
14952
14961
  await this.page.getByTestId(MEMBER_SELECTORS.continueButton).click();
14953
14962
  }
14954
14963
  await this.page.getByTestId(MEMBER_SELECTORS.submitButton).click();
14964
+ await test$1.expect(this.page.getByTestId(COMMON_SELECTORS.paneBody)).toBeHidden();
14955
14965
  await this.neetoPlaywrightUtilities.waitForPageLoad();
14956
- await this.neetoPlaywrightUtilities.verifySuccessToast();
14966
+ await this.neetoPlaywrightUtilities.verifyToast();
14957
14967
  };
14958
14968
  this.searchAndVerifyMemberByEmail = async ({ email, interceptOptions = {}, }) => {
14959
14969
  const searchMembers = this.neetoPlaywrightUtilities.interceptMultipleResponses({
@@ -149320,6 +149330,7 @@ exports.generateStagingData = generateStagingData;
149320
149330
  exports.getByDataQA = getByDataQA;
149321
149331
  exports.getGlobalUserState = getGlobalUserState;
149322
149332
  exports.getImagePathAndName = getImagePathAndName;
149333
+ exports.getListCount = getListCount;
149323
149334
  exports.headerUtils = headerUtils;
149324
149335
  exports.hexToRGB = hexToRGB;
149325
149336
  exports.hyphenize = hyphenize;