@bigbinary/neeto-playwright-commons 1.22.22 → 1.22.24

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
@@ -3488,6 +3488,7 @@ const COMMON_SELECTORS = {
3488
3488
  checkboxInput: (option = "i-agree") => `${neetoCist.hyphenate(option)}-checkbox-input`,
3489
3489
  radioInput: (option = "i-agree") => `${neetoCist.hyphenate(option)}-radio-input`,
3490
3490
  selectOptionError: (option) => `${neetoCist.hyphenate(option)}-select-error`,
3491
+ button: (label) => `${neetoCist.hyphenate(label)}-button`,
3491
3492
  customDropDownMenu: (label = "nui") => `${neetoCist.hyphenate(label)}-select-menu`,
3492
3493
  };
3493
3494
 
@@ -3859,6 +3860,7 @@ const HELP_CENTER_SELECTORS = {
3859
3860
  keyboardShortcutPaneCrossIcon: "keyboard-shortcuts-pane-close-button",
3860
3861
  statusButton: "help-link-status-button",
3861
3862
  communityButton: "help-link-community-button",
3863
+ subscriptionPlan: "subscription-plan",
3862
3864
  };
3863
3865
 
3864
3866
  const NEETO_IMAGE_UPLOADER_SELECTORS = {
@@ -189802,25 +189804,23 @@ class HelpAndProfilePage {
189802
189804
  this.verifySubscriptionPlan = async (plan, product) => {
189803
189805
  await test$1.test.step("1: Open Help Center links", () => this.openHelpCenter());
189804
189806
  await test$1.test.step("2: Open and verify subscription plan", async () => {
189807
+ const subscriptionPlan = this.page.getByTestId(HELP_CENTER_SELECTORS.subscriptionPlan);
189805
189808
  await this.neetoPlaywrightUtilities.waitForPageLoad();
189806
- await test$1.expect(this.page.getByTestId(COMMON_SELECTORS.floatingActionMenuLink)).toHaveText(this.t("neetoMolecules.sidebar.currentPlan", {
189809
+ await test$1.expect(subscriptionPlan).toHaveText(this.t("neetoMolecules.sidebar.currentPlan", {
189807
189810
  subscriptionPlan: plan,
189808
189811
  }));
189809
- await this.page
189810
- .getByTestId(COMMON_SELECTORS.floatingActionMenuLink)
189811
- .click();
189812
+ await subscriptionPlan.click();
189812
189813
  await this.neetoPlaywrightUtilities.waitForPageLoad();
189813
189814
  await test$1.expect(this.page).toHaveURL(new RegExp(ROUTES.auth.billing));
189814
189815
  if (!neetoCist.isPresent(product))
189815
189816
  return;
189816
- //TODO: Use data-cy label when this https://github.com/neetozone/neeto-auth-playwright/issues/24 is resolved
189817
- const actionButtonName = plan === "Free" ? "Upgrade" : "Downgrade";
189817
+ const actionName = plan === "Free" ? "Upgrade" : "Downgrade";
189818
189818
  const productRow = this.page.getByRole("row", {
189819
189819
  name: `Neeto${product}`,
189820
189820
  });
189821
189821
  await Promise.all([
189822
189822
  test$1.expect(productRow.getByRole("cell", { name: plan })).toBeVisible(),
189823
- test$1.expect(productRow.getByRole("button", { name: actionButtonName })).toBeVisible(),
189823
+ test$1.expect(productRow.getByTestId(COMMON_SELECTORS.button(actionName))).toBeVisible(),
189824
189824
  ]);
189825
189825
  });
189826
189826
  };
@@ -194439,6 +194439,7 @@ const unFreezeAllColumns = async ({ columnHeaders, columnOffset, page, t, }) =>
194439
194439
  for (let i = columnHeaders.length - 1; i >= columnOffset; i--) {
194440
194440
  const currentHeader = columnHeaders[i];
194441
194441
  await currentHeader.getByTestId(TABLE_SELECTORS.columnMenuButton).click();
194442
+ await test$1.expect(page.getByTestId(COMMON_SELECTORS.dropdownContainer)).toBeVisible();
194442
194443
  (await unFreezeColumnButton.isVisible())
194443
194444
  ? await unFreezeColumnButton.click()
194444
194445
  : await currentHeader