@bigbinary/neeto-playwright-commons 1.19.12 → 1.20.0

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
@@ -142,6 +142,7 @@ const COMMON_SELECTORS = {
142
142
  ticketFieldTextInput: (label) => `${neetoCist.hyphenate(label)}-text-input`,
143
143
  appSwitcherButton: "product-switcher-button",
144
144
  appSwitcherWrapper: "switcher-wrapper",
145
+ appLink: (appName) => `${appName}-app-link`,
145
146
  tableSpinner: ".ant-spin",
146
147
  pageLoader: "neeto-molecules-pageloader",
147
148
  homeButton: "home-button",
@@ -170,6 +171,7 @@ const COMMON_SELECTORS = {
170
171
  pendingTagContainer: "pending-tag-container",
171
172
  nextYearButton: "next-year-button",
172
173
  popoverTitle: "popover-title",
174
+ productSwitcherSearchInput: "product-switcher-search-input",
173
175
  helpPopoverButton: "help-popover-button",
174
176
  helpPopoverDesc: "help-popover-description",
175
177
  helpPopoverLinkButton: "help-popover-link-button",
@@ -504,6 +506,8 @@ const HELP_CENTER_SELECTORS = {
504
506
  whatsNewWidgetCloseButton: ".ne-widget-header__btn",
505
507
  keyboardShortcutPaneHeading: "keyboard-shortcuts-pane-title",
506
508
  keyboardShortcutPaneCrossIcon: "keyboard-shortcuts-pane-close-button",
509
+ statusButton: "help-link-status-button",
510
+ communityButton: "help-link-community-button",
507
511
  };
508
512
 
509
513
  const NEETO_IMAGE_UPLOADER_SELECTORS = {
@@ -188812,6 +188816,10 @@ const THIRD_PARTY_ROUTES = {
188812
188816
  const NEETO_ROUTES = {
188813
188817
  imageUploader: "/neeto_image_uploader_engine",
188814
188818
  };
188819
+ const PROFILE_LINKS = {
188820
+ neetoStatus: "https://neetostatus.com/",
188821
+ neetoCommunity: "https://www.launchpass.com/neetohq",
188822
+ };
188815
188823
 
188816
188824
  const CHAT_WIDGET_TEXTS = {
188817
188825
  newConversation: "Ask a question",
@@ -188903,6 +188911,10 @@ const GOOGLE_LOGIN_TEXTS = {
188903
188911
  neetoAutomation: "neeto.automation",
188904
188912
  };
188905
188913
  const ENGAGE_TEXTS = { subscribe: "Subscribe" };
188914
+ const COMMUNITY_TEXTS = { joinNow: "Join Now" };
188915
+ const STATUS_TEXTS = {
188916
+ application: (appName) => `Neeto${appName} Application`,
188917
+ };
188906
188918
  const AUDIT_LOGS_TEXTS = { organizationRole: "Organization Role" };
188907
188919
  const COMMON_TEXTS = {
188908
188920
  skipCleanup: "SKIP_CLEANUP",
@@ -188913,7 +188925,6 @@ const ORGANIZATION_TEXTS = {
188913
188925
  };
188914
188926
 
188915
188927
  /* eslint-disable playwright/require-top-level-describe */
188916
- /* eslint-disable playwright/no-standalone-expect */
188917
188928
  class HelpAndProfilePage {
188918
188929
  constructor({ page, neetoPlaywrightUtilities, chatApiBaseURL, kbDocsBaseURL, changelogBaseURL, }) {
188919
188930
  this.hoverOnBody = () => this.page.locator("body").hover();
@@ -189046,11 +189057,32 @@ class HelpAndProfilePage {
189046
189057
  });
189047
189058
  };
189048
189059
  this.openAppSwitcherAndVerifyV2 = async () => {
189060
+ const productName = "Playdash";
189061
+ const searchQueryPartial = productName.slice(0, 4).toLowerCase();
189062
+ const searchQueryFull = productName.toLowerCase();
189049
189063
  await test$1.test.step("Step 1: Verify hovering over app switcher opens the app switcher drawer", () => test$1.expect(async () => {
189050
189064
  await this.openHelpCenterV2();
189051
189065
  await this.page.getByTestId(COMMON_SELECTORS.appSwitcherButton).hover();
189052
189066
  await test$1.expect(this.page.getByTestId(COMMON_SELECTORS.appSwitcherWrapper)).toBeVisible();
189053
189067
  }).toPass({ timeout: 45000 }));
189068
+ await test$1.test.step("Step 2: Verify search functionality", async () => {
189069
+ const playdashAppLink = this.page.getByTestId(COMMON_SELECTORS.appLink(productName));
189070
+ const replayAppLink = this.page.getByTestId(COMMON_SELECTORS.appLink("Replay"));
189071
+ const searchInput = this.page.getByTestId(COMMON_SELECTORS.productSwitcherSearchInput);
189072
+ await searchInput.fill(faker.faker.word.words(3));
189073
+ //TODO: Use data-cy label when this https://github.com/bigbinary/neeto-molecules/issues/2114 is resolved
189074
+ await test$1.expect(this.page.getByText(this.t("neetoMolecules.productSwitcher.noApps"))).toBeVisible();
189075
+ await searchInput.fill(searchQueryPartial);
189076
+ await Promise.all([
189077
+ test$1.expect(playdashAppLink).toBeVisible(),
189078
+ test$1.expect(replayAppLink).toBeVisible(),
189079
+ ]);
189080
+ await searchInput.fill(searchQueryFull);
189081
+ await Promise.all([
189082
+ test$1.expect(playdashAppLink).toBeVisible(),
189083
+ test$1.expect(replayAppLink).toBeHidden(),
189084
+ ]);
189085
+ });
189054
189086
  };
189055
189087
  this.openAuthLinkAndVerify = async ({ linkSelector, redirectLink, }) => {
189056
189088
  var _a, _b;
@@ -189139,6 +189171,36 @@ class HelpAndProfilePage {
189139
189171
  await test$1.expect(this.page).toHaveURL(new RegExp(ROUTES.dashboard));
189140
189172
  });
189141
189173
  };
189174
+ this.openAndVerifyStatus = async (appName) => {
189175
+ await test$1.test.step("Step 1: Open Help Center links", this.openHelpCenterV2);
189176
+ await test$1.test.step("Step 2: Open and verify status page", async () => {
189177
+ const statusPagePromise = this.page.waitForEvent("popup");
189178
+ await this.page.getByTestId(HELP_CENTER_SELECTORS.statusButton).click();
189179
+ const statusPage = await statusPagePromise;
189180
+ await statusPage.waitForLoadState();
189181
+ await Promise.all([
189182
+ test$1.expect(statusPage).toHaveURL(PROFILE_LINKS.neetoStatus),
189183
+ test$1.expect(statusPage.getByText(STATUS_TEXTS.application(appName), {
189184
+ exact: true,
189185
+ })).toBeVisible(),
189186
+ ]);
189187
+ });
189188
+ };
189189
+ this.openAndVerifyCommunity = async () => {
189190
+ await test$1.test.step("Step 1: Open Help Center links", this.openHelpCenterV2);
189191
+ await test$1.test.step("Step 2: Open and verify community", async () => {
189192
+ const communityPagePromise = this.page.waitForEvent("popup");
189193
+ await this.page
189194
+ .getByTestId(HELP_CENTER_SELECTORS.communityButton)
189195
+ .click();
189196
+ const communityPage = await communityPagePromise;
189197
+ await communityPage.waitForLoadState();
189198
+ await Promise.all([
189199
+ test$1.expect(communityPage).toHaveURL(PROFILE_LINKS.neetoCommunity),
189200
+ test$1.expect(communityPage.getByRole("button", { name: COMMUNITY_TEXTS.joinNow })).toBeVisible(),
189201
+ ]);
189202
+ });
189203
+ };
189142
189204
  this.page = page;
189143
189205
  this.neetoPlaywrightUtilities = neetoPlaywrightUtilities;
189144
189206
  this.chatApiBaseURL = chatApiBaseURL;
@@ -195071,6 +195133,7 @@ exports.CHAT_WIDGET_TEXTS = CHAT_WIDGET_TEXTS;
195071
195133
  exports.COLOR = COLOR;
195072
195134
  exports.COMMON_SELECTORS = COMMON_SELECTORS;
195073
195135
  exports.COMMON_TEXTS = COMMON_TEXTS;
195136
+ exports.COMMUNITY_TEXTS = COMMUNITY_TEXTS;
195074
195137
  exports.CREDENTIALS = CREDENTIALS;
195075
195138
  exports.CUSTOM_DOMAIN_SELECTORS = CUSTOM_DOMAIN_SELECTORS;
195076
195139
  exports.CustomCommands = CustomCommands;
@@ -195120,6 +195183,7 @@ exports.ORGANIZATION_TEXTS = ORGANIZATION_TEXTS;
195120
195183
  exports.OTP_EMAIL_PATTERN = OTP_EMAIL_PATTERN;
195121
195184
  exports.OrganizationPage = OrganizationPage;
195122
195185
  exports.PLURAL = PLURAL;
195186
+ exports.PROFILE_LINKS = PROFILE_LINKS;
195123
195187
  exports.PROFILE_SECTION_SELECTORS = PROFILE_SECTION_SELECTORS;
195124
195188
  exports.PROJECT_TRANSLATIONS_PATH = PROJECT_TRANSLATIONS_PATH;
195125
195189
  exports.ROLES_SELECTORS = ROLES_SELECTORS;
@@ -195132,6 +195196,7 @@ exports.SLACK_DATA_QA_SELECTORS = SLACK_DATA_QA_SELECTORS;
195132
195196
  exports.SLACK_DEFAULT_CHANNEL = SLACK_DEFAULT_CHANNEL;
195133
195197
  exports.SLACK_SELECTORS = SLACK_SELECTORS;
195134
195198
  exports.SLACK_WEB_TEXTS = SLACK_WEB_TEXTS;
195199
+ exports.STATUS_TEXTS = STATUS_TEXTS;
195135
195200
  exports.STORAGE_STATE = STORAGE_STATE;
195136
195201
  exports.SidebarSection = SidebarSection;
195137
195202
  exports.SlackPage = SlackPage;