@bigbinary/neeto-playwright-commons 1.8.12 → 1.8.13

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.d.ts CHANGED
@@ -116,28 +116,17 @@ declare class HelpAndProfilePage {
116
116
  private openLiveChatAndVerify;
117
117
  openAndVerifyChatWidget: () => Promise<void>;
118
118
  openAndVerifyChatWidgetV2: () => Promise<void>;
119
- openAndVerifyHelpArticles: () => Promise<void>;
120
119
  openAndVerifyHelpArticlesV2: () => Promise<void>;
121
- private openChangelogPane;
122
120
  private openChangelogPaneV2;
123
- openAndVerifyChangelog: () => Promise<void>;
124
121
  openAndVerifyChangelogV2: () => Promise<void>;
125
122
  private formatKeyboardShortcut;
126
- openAndVerifyKeyboardShortcutsPane: (productShortcuts: {
127
- description: string;
128
- sequence: string;
129
- }[], osPlatform?: "mac" | "windows") => Promise<void>;
130
123
  openAndVerifyKeyboardShortcutsPaneV2: (productShortcuts: {
131
124
  description: string;
132
125
  sequence: string;
133
126
  }[], osPlatform?: "mac" | "windows") => Promise<void>;
134
- openAppSwitcherAndVerify: () => Promise<void>;
135
127
  openAppSwitcherAndVerifyV2: () => Promise<void>;
136
- private openProfilePopup;
137
128
  private openAuthLinkAndVerify;
138
- verifyProfileAndOrganizationLinks: () => Promise<void>;
139
129
  verifyProfileAndOrganizationLinksV2: () => Promise<void>;
140
- verifyLogout: () => Promise<void>;
141
130
  verifyLogoutV2: () => Promise<void>;
142
131
  }
143
132
 
package/index.js CHANGED
@@ -7349,20 +7349,6 @@ class HelpAndProfilePage {
7349
7349
  await expect(this.neetoChatFrame.getByTestId(CHAT_WIDGET_SELECTORS.chatBubble)).toHaveText(CHAT_WIDGET_TEXTS.welcomeChatBubble);
7350
7350
  });
7351
7351
  };
7352
- // TODO Remove when all apps have migrated to the new navbar style
7353
- this.openAndVerifyHelpArticles = async () => {
7354
- await test$1.step("Step 1: Open Help Center links", this.openHelpCenter);
7355
- await test$1.step("Step 2: Open and verify help articles link", async () => {
7356
- const helpArticlesPromise = this.page.waitForEvent("popup");
7357
- await this.page
7358
- .getByTestId(HELP_CENTER_SELECTORS.documentationButton)
7359
- .click();
7360
- const helpArticlesPage = await helpArticlesPromise;
7361
- await helpArticlesPage.waitForLoadState();
7362
- await expect(helpArticlesPage).toHaveURL(this.kbDocsBaseURL);
7363
- await helpArticlesPage.close();
7364
- });
7365
- };
7366
7352
  this.openAndVerifyHelpArticlesV2 = async () => {
7367
7353
  await test$1.step("Step 1: Open Help Center links", this.openHelpCenterV2);
7368
7354
  await test$1.step("Step 2: Open and verify help articles link", async () => {
@@ -7376,13 +7362,6 @@ class HelpAndProfilePage {
7376
7362
  await helpArticlesPage.close();
7377
7363
  });
7378
7364
  };
7379
- // TODO Remove when all apps have migrated to the new navbar style
7380
- this.openChangelogPane = async () => {
7381
- await expect(async () => {
7382
- await this.page.getByTestId(HELP_CENTER_SELECTORS.whatsNewButton).click();
7383
- await expect(this.page.locator(CHANGELOG_WIDGET_SELECTORS.changelogWrapper)).toBeVisible();
7384
- }).toPass({ timeout: 15000 });
7385
- };
7386
7365
  this.openChangelogPaneV2 = async () => {
7387
7366
  await expect(async () => {
7388
7367
  await this.openHelpCenterV2();
@@ -7390,33 +7369,6 @@ class HelpAndProfilePage {
7390
7369
  await expect(this.page.locator(CHANGELOG_WIDGET_SELECTORS.changelogWrapper)).toBeVisible();
7391
7370
  }).toPass({ timeout: 45000 });
7392
7371
  };
7393
- // TODO Remove when all apps have migrated to the new navbar style
7394
- this.openAndVerifyChangelog = async () => {
7395
- await test$1.step("Step 1: Open Help Center links", this.openHelpCenter);
7396
- await test$1.step("Step 2: Open and verify changelog pane", this.openChangelogPane);
7397
- await test$1.step("Step 3: Close and reopen changelog pane", async () => {
7398
- await this.page
7399
- .getByTestId(CHANGELOG_WIDGET_SELECTORS.closeButton)
7400
- .click();
7401
- await expect(this.page.locator(CHANGELOG_WIDGET_SELECTORS.changelogWrapper)).toBeHidden();
7402
- await this.openHelpCenter();
7403
- await this.openChangelogPane();
7404
- });
7405
- await test$1.step("Step 4: Open and verify public URL", async () => {
7406
- const changelogPagePromise = this.page.waitForEvent("popup");
7407
- await this.page
7408
- .getByTestId(CHANGELOG_WIDGET_SELECTORS.publicUrlLink)
7409
- .click();
7410
- const changelogPage = await changelogPagePromise;
7411
- await this.neetoPlaywrightUtilities.interceptMultipleResponses({
7412
- customPageContext: changelogPage,
7413
- baseUrl: this.changelogBaseURL.split("/site")[0],
7414
- times: 3,
7415
- });
7416
- await expect(changelogPage).toHaveURL(this.changelogBaseURL);
7417
- await changelogPage.close();
7418
- });
7419
- };
7420
7372
  this.openAndVerifyChangelogV2 = async () => {
7421
7373
  await test$1.step("Step 1: Open Help Center links and changelog", this.openChangelogPaneV2);
7422
7374
  await test$1.step("Step 2: Close and reopen changelog pane", async () => {
@@ -7449,52 +7401,6 @@ class HelpAndProfilePage {
7449
7401
  ? formattedShortcut.replace(/ctrl/g, "⌘").replace(/alt/g, "opt")
7450
7402
  : formattedShortcut;
7451
7403
  };
7452
- this.openAndVerifyKeyboardShortcutsPane = async (productShortcuts, osPlatform = "windows") => {
7453
- const globalShortcuts = [
7454
- {
7455
- description: this.t("neetoMolecules.keyboardShortcuts.global.openKeyboardShortcutsPane"),
7456
- sequence: "shift+/",
7457
- },
7458
- {
7459
- description: this.t("neetoMolecules.keyboardShortcuts.global.close"),
7460
- sequence: "esc",
7461
- },
7462
- {
7463
- description: this.t("neetoMolecules.keyboardShortcuts.global.submitForm"),
7464
- sequence: "ctrl+enter",
7465
- },
7466
- ];
7467
- const shortcuts = [...globalShortcuts, ...productShortcuts];
7468
- await test$1.step("Step 1: Open Help Center", this.openHelpCenter);
7469
- await test$1.step("Step 2: Open and close keyboard shortcuts from UI", async () => {
7470
- await this.page
7471
- .getByTestId(HELP_CENTER_SELECTORS.keyboardShortcutButton)
7472
- .click();
7473
- await expect(this.page.getByTestId(KEYBOARD_SHORTCUTS_SELECTORS.keyboardShortcutsPane)).not.toHaveCSS("width", "1px");
7474
- await this.page
7475
- .getByTestId(KEYBOARD_SHORTCUTS_SELECTORS.closePaneButton)
7476
- .click();
7477
- await expect(this.page.getByTestId(KEYBOARD_SHORTCUTS_SELECTORS.keyboardShortcutsPane)).toHaveCSS("width", "1px");
7478
- });
7479
- await test$1.step("Step 3: Open and close keyboard shortcuts through shortcut", async () => {
7480
- await this.page.keyboard.press("Shift+/");
7481
- await expect(this.page.getByTestId(KEYBOARD_SHORTCUTS_SELECTORS.keyboardShortcutsPane)).not.toHaveCSS("width", "1px");
7482
- await this.page.keyboard.press("Escape");
7483
- await expect(this.page.getByTestId(KEYBOARD_SHORTCUTS_SELECTORS.keyboardShortcutsPane)).toHaveCSS("width", "1px");
7484
- });
7485
- await test$1.step("Step 4: Verify all displayed keyboard shortcuts", async () => {
7486
- await this.page.keyboard.press("Shift+/");
7487
- await expect(this.page.getByTestId(KEYBOARD_SHORTCUTS_SELECTORS.keyboardShortcutsPane)).not.toHaveCSS("width", "1px");
7488
- await expect(this.page
7489
- .getByTestId(KEYBOARD_SHORTCUTS_SELECTORS.hotKeyItem)
7490
- .locator("p")).toHaveText(shortcuts.map(shortcut => shortcut.description));
7491
- const formattedSequences = shortcuts.map(shortcut => this.formatKeyboardShortcut(shortcut.sequence, osPlatform));
7492
- await expect(this.page
7493
- .getByTestId(KEYBOARD_SHORTCUTS_SELECTORS.hotKeyItem)
7494
- .locator("div")).toHaveText(formattedSequences);
7495
- });
7496
- };
7497
- // TODO Remove when all apps have migrated to the new navbar style
7498
7404
  this.openAndVerifyKeyboardShortcutsPaneV2 = async (productShortcuts, osPlatform = "windows") => {
7499
7405
  const globalShortcuts = [
7500
7406
  {
@@ -7540,16 +7446,6 @@ class HelpAndProfilePage {
7540
7446
  .locator("div")).toHaveText(formattedSequences);
7541
7447
  });
7542
7448
  };
7543
- // TODO Remove when all apps have migrated to the new navbar style
7544
- this.openAppSwitcherAndVerify = async () => {
7545
- const appSwitcher = this.page.getByTestId(COMMON_SELECTORS.appSwitcherButton);
7546
- await test$1.step("Step 1: Verify hovering over app switcher opens the app switcher drawer", () => expect(async () => {
7547
- await this.hoverOnBody();
7548
- await appSwitcher.scrollIntoViewIfNeeded();
7549
- await appSwitcher.hover();
7550
- await expect(this.page.getByTestId(COMMON_SELECTORS.appSwitcherWrapper)).toBeVisible();
7551
- }).toPass({ timeout: 15000 }));
7552
- };
7553
7449
  this.openAppSwitcherAndVerifyV2 = async () => {
7554
7450
  await test$1.step("Step 1: Verify hovering over app switcher opens the app switcher drawer", () => expect(async () => {
7555
7451
  await this.openHelpCenterV2();
@@ -7559,13 +7455,6 @@ class HelpAndProfilePage {
7559
7455
  await expect(this.page.getByTestId(COMMON_SELECTORS.appSwitcherWrapper)).toBeVisible();
7560
7456
  }).toPass({ timeout: 45000 }));
7561
7457
  };
7562
- // TODO Remove when all apps have migrated to the new navbar style
7563
- this.openProfilePopup = () => expect(async () => {
7564
- await this.hoverOnBody();
7565
- await this.profileSectionButton.scrollIntoViewIfNeeded();
7566
- await this.profileSectionButton.hover();
7567
- await expect(this.page.getByTestId(PROFILE_SECTION_SELECTORS.profilePopup)).toBeVisible();
7568
- }).toPass({ timeout: 15000 });
7569
7458
  this.openAuthLinkAndVerify = async ({ linkSelector, redirectLink, }) => {
7570
7459
  var _a, _b;
7571
7460
  const profilePagePromise = this.page.waitForEvent("popup");
@@ -7576,19 +7465,6 @@ class HelpAndProfilePage {
7576
7465
  await expect(profilePage).toHaveURL(new RegExp(redirectLink));
7577
7466
  await profilePage.close();
7578
7467
  };
7579
- // TODO Remove when all apps have migrated to the new navbar style
7580
- this.verifyProfileAndOrganizationLinks = async () => {
7581
- await test$1.step("Step 1: Open Profile popup and verify", this.openProfilePopup);
7582
- await test$1.step("Step 2: Open My profile link and verify", async () => this.openAuthLinkAndVerify({
7583
- linkSelector: PROFILE_SECTION_SELECTORS.myProfileButton,
7584
- redirectLink: ROUTES.myProfile,
7585
- }));
7586
- await test$1.step("Step 3: Open Profile popup and verify", this.openProfilePopup);
7587
- await test$1.step("Step 4: Open My organization link and verify", async () => this.openAuthLinkAndVerify({
7588
- linkSelector: PROFILE_SECTION_SELECTORS.profileOrganizationSettingsButton,
7589
- redirectLink: ROUTES.authSettings,
7590
- }));
7591
- };
7592
7468
  this.verifyProfileAndOrganizationLinksV2 = async () => {
7593
7469
  await test$1.step("Step 1: Open Help center and verify", this.openHelpCenterV2);
7594
7470
  await test$1.step("Step 2: Open My profile link and verify", async () => this.openAuthLinkAndVerify({
@@ -7601,19 +7477,6 @@ class HelpAndProfilePage {
7601
7477
  redirectLink: ROUTES.authSettings,
7602
7478
  }));
7603
7479
  };
7604
- // TODO Remove when all apps have migrated to the new navbar style
7605
- this.verifyLogout = async () => {
7606
- if (shouldSkipSetupAndTeardown())
7607
- return;
7608
- await test$1.step("Step 1: Open Profile popup and verify", this.openProfilePopup);
7609
- await test$1.step("Step 2: Click logout and verify", async () => {
7610
- await this.page
7611
- .getByTestId(PROFILE_SECTION_SELECTORS.logoutButton)
7612
- .click();
7613
- await expect(this.page).toHaveURL(NEETO_AUTH_BASE_URL());
7614
- await expect(this.page).toHaveURL(new RegExp(ROUTES.loginLink));
7615
- });
7616
- };
7617
7480
  this.verifyLogoutV2 = async () => {
7618
7481
  if (shouldSkipSetupAndTeardown())
7619
7482
  return;
@@ -7622,8 +7485,12 @@ class HelpAndProfilePage {
7622
7485
  await this.page
7623
7486
  .getByTestId(PROFILE_SECTION_SELECTORS.logoutButton)
7624
7487
  .click();
7625
- await expect(this.page).toHaveURL(new RegExp(NEETO_AUTH_BASE_URL()), { timeout: 15000 });
7626
- await expect(this.page).toHaveURL(new RegExp(ROUTES.loginLink), { timeout: 15000 });
7488
+ await expect(this.page).toHaveURL(new RegExp(NEETO_AUTH_BASE_URL()), {
7489
+ timeout: 15000,
7490
+ });
7491
+ await expect(this.page).toHaveURL(new RegExp(ROUTES.loginLink), {
7492
+ timeout: 15000,
7493
+ });
7627
7494
  });
7628
7495
  };
7629
7496
  this.page = page;