@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.cjs.js CHANGED
@@ -7384,20 +7384,6 @@ class HelpAndProfilePage {
7384
7384
  await test.expect(this.neetoChatFrame.getByTestId(CHAT_WIDGET_SELECTORS.chatBubble)).toHaveText(CHAT_WIDGET_TEXTS.welcomeChatBubble);
7385
7385
  });
7386
7386
  };
7387
- // TODO Remove when all apps have migrated to the new navbar style
7388
- this.openAndVerifyHelpArticles = async () => {
7389
- await test.test.step("Step 1: Open Help Center links", this.openHelpCenter);
7390
- await test.test.step("Step 2: Open and verify help articles link", async () => {
7391
- const helpArticlesPromise = this.page.waitForEvent("popup");
7392
- await this.page
7393
- .getByTestId(HELP_CENTER_SELECTORS.documentationButton)
7394
- .click();
7395
- const helpArticlesPage = await helpArticlesPromise;
7396
- await helpArticlesPage.waitForLoadState();
7397
- await test.expect(helpArticlesPage).toHaveURL(this.kbDocsBaseURL);
7398
- await helpArticlesPage.close();
7399
- });
7400
- };
7401
7387
  this.openAndVerifyHelpArticlesV2 = async () => {
7402
7388
  await test.test.step("Step 1: Open Help Center links", this.openHelpCenterV2);
7403
7389
  await test.test.step("Step 2: Open and verify help articles link", async () => {
@@ -7411,13 +7397,6 @@ class HelpAndProfilePage {
7411
7397
  await helpArticlesPage.close();
7412
7398
  });
7413
7399
  };
7414
- // TODO Remove when all apps have migrated to the new navbar style
7415
- this.openChangelogPane = async () => {
7416
- await test.expect(async () => {
7417
- await this.page.getByTestId(HELP_CENTER_SELECTORS.whatsNewButton).click();
7418
- await test.expect(this.page.locator(CHANGELOG_WIDGET_SELECTORS.changelogWrapper)).toBeVisible();
7419
- }).toPass({ timeout: 15000 });
7420
- };
7421
7400
  this.openChangelogPaneV2 = async () => {
7422
7401
  await test.expect(async () => {
7423
7402
  await this.openHelpCenterV2();
@@ -7425,33 +7404,6 @@ class HelpAndProfilePage {
7425
7404
  await test.expect(this.page.locator(CHANGELOG_WIDGET_SELECTORS.changelogWrapper)).toBeVisible();
7426
7405
  }).toPass({ timeout: 45000 });
7427
7406
  };
7428
- // TODO Remove when all apps have migrated to the new navbar style
7429
- this.openAndVerifyChangelog = async () => {
7430
- await test.test.step("Step 1: Open Help Center links", this.openHelpCenter);
7431
- await test.test.step("Step 2: Open and verify changelog pane", this.openChangelogPane);
7432
- await test.test.step("Step 3: Close and reopen changelog pane", async () => {
7433
- await this.page
7434
- .getByTestId(CHANGELOG_WIDGET_SELECTORS.closeButton)
7435
- .click();
7436
- await test.expect(this.page.locator(CHANGELOG_WIDGET_SELECTORS.changelogWrapper)).toBeHidden();
7437
- await this.openHelpCenter();
7438
- await this.openChangelogPane();
7439
- });
7440
- await test.test.step("Step 4: Open and verify public URL", async () => {
7441
- const changelogPagePromise = this.page.waitForEvent("popup");
7442
- await this.page
7443
- .getByTestId(CHANGELOG_WIDGET_SELECTORS.publicUrlLink)
7444
- .click();
7445
- const changelogPage = await changelogPagePromise;
7446
- await this.neetoPlaywrightUtilities.interceptMultipleResponses({
7447
- customPageContext: changelogPage,
7448
- baseUrl: this.changelogBaseURL.split("/site")[0],
7449
- times: 3,
7450
- });
7451
- await test.expect(changelogPage).toHaveURL(this.changelogBaseURL);
7452
- await changelogPage.close();
7453
- });
7454
- };
7455
7407
  this.openAndVerifyChangelogV2 = async () => {
7456
7408
  await test.test.step("Step 1: Open Help Center links and changelog", this.openChangelogPaneV2);
7457
7409
  await test.test.step("Step 2: Close and reopen changelog pane", async () => {
@@ -7484,52 +7436,6 @@ class HelpAndProfilePage {
7484
7436
  ? formattedShortcut.replace(/ctrl/g, "⌘").replace(/alt/g, "opt")
7485
7437
  : formattedShortcut;
7486
7438
  };
7487
- this.openAndVerifyKeyboardShortcutsPane = async (productShortcuts, osPlatform = "windows") => {
7488
- const globalShortcuts = [
7489
- {
7490
- description: this.t("neetoMolecules.keyboardShortcuts.global.openKeyboardShortcutsPane"),
7491
- sequence: "shift+/",
7492
- },
7493
- {
7494
- description: this.t("neetoMolecules.keyboardShortcuts.global.close"),
7495
- sequence: "esc",
7496
- },
7497
- {
7498
- description: this.t("neetoMolecules.keyboardShortcuts.global.submitForm"),
7499
- sequence: "ctrl+enter",
7500
- },
7501
- ];
7502
- const shortcuts = [...globalShortcuts, ...productShortcuts];
7503
- await test.test.step("Step 1: Open Help Center", this.openHelpCenter);
7504
- await test.test.step("Step 2: Open and close keyboard shortcuts from UI", async () => {
7505
- await this.page
7506
- .getByTestId(HELP_CENTER_SELECTORS.keyboardShortcutButton)
7507
- .click();
7508
- await test.expect(this.page.getByTestId(KEYBOARD_SHORTCUTS_SELECTORS.keyboardShortcutsPane)).not.toHaveCSS("width", "1px");
7509
- await this.page
7510
- .getByTestId(KEYBOARD_SHORTCUTS_SELECTORS.closePaneButton)
7511
- .click();
7512
- await test.expect(this.page.getByTestId(KEYBOARD_SHORTCUTS_SELECTORS.keyboardShortcutsPane)).toHaveCSS("width", "1px");
7513
- });
7514
- await test.test.step("Step 3: Open and close keyboard shortcuts through shortcut", async () => {
7515
- await this.page.keyboard.press("Shift+/");
7516
- await test.expect(this.page.getByTestId(KEYBOARD_SHORTCUTS_SELECTORS.keyboardShortcutsPane)).not.toHaveCSS("width", "1px");
7517
- await this.page.keyboard.press("Escape");
7518
- await test.expect(this.page.getByTestId(KEYBOARD_SHORTCUTS_SELECTORS.keyboardShortcutsPane)).toHaveCSS("width", "1px");
7519
- });
7520
- await test.test.step("Step 4: Verify all displayed keyboard shortcuts", async () => {
7521
- await this.page.keyboard.press("Shift+/");
7522
- await test.expect(this.page.getByTestId(KEYBOARD_SHORTCUTS_SELECTORS.keyboardShortcutsPane)).not.toHaveCSS("width", "1px");
7523
- await test.expect(this.page
7524
- .getByTestId(KEYBOARD_SHORTCUTS_SELECTORS.hotKeyItem)
7525
- .locator("p")).toHaveText(shortcuts.map(shortcut => shortcut.description));
7526
- const formattedSequences = shortcuts.map(shortcut => this.formatKeyboardShortcut(shortcut.sequence, osPlatform));
7527
- await test.expect(this.page
7528
- .getByTestId(KEYBOARD_SHORTCUTS_SELECTORS.hotKeyItem)
7529
- .locator("div")).toHaveText(formattedSequences);
7530
- });
7531
- };
7532
- // TODO Remove when all apps have migrated to the new navbar style
7533
7439
  this.openAndVerifyKeyboardShortcutsPaneV2 = async (productShortcuts, osPlatform = "windows") => {
7534
7440
  const globalShortcuts = [
7535
7441
  {
@@ -7575,16 +7481,6 @@ class HelpAndProfilePage {
7575
7481
  .locator("div")).toHaveText(formattedSequences);
7576
7482
  });
7577
7483
  };
7578
- // TODO Remove when all apps have migrated to the new navbar style
7579
- this.openAppSwitcherAndVerify = async () => {
7580
- const appSwitcher = this.page.getByTestId(COMMON_SELECTORS.appSwitcherButton);
7581
- await test.test.step("Step 1: Verify hovering over app switcher opens the app switcher drawer", () => test.expect(async () => {
7582
- await this.hoverOnBody();
7583
- await appSwitcher.scrollIntoViewIfNeeded();
7584
- await appSwitcher.hover();
7585
- await test.expect(this.page.getByTestId(COMMON_SELECTORS.appSwitcherWrapper)).toBeVisible();
7586
- }).toPass({ timeout: 15000 }));
7587
- };
7588
7484
  this.openAppSwitcherAndVerifyV2 = async () => {
7589
7485
  await test.test.step("Step 1: Verify hovering over app switcher opens the app switcher drawer", () => test.expect(async () => {
7590
7486
  await this.openHelpCenterV2();
@@ -7594,13 +7490,6 @@ class HelpAndProfilePage {
7594
7490
  await test.expect(this.page.getByTestId(COMMON_SELECTORS.appSwitcherWrapper)).toBeVisible();
7595
7491
  }).toPass({ timeout: 45000 }));
7596
7492
  };
7597
- // TODO Remove when all apps have migrated to the new navbar style
7598
- this.openProfilePopup = () => test.expect(async () => {
7599
- await this.hoverOnBody();
7600
- await this.profileSectionButton.scrollIntoViewIfNeeded();
7601
- await this.profileSectionButton.hover();
7602
- await test.expect(this.page.getByTestId(PROFILE_SECTION_SELECTORS.profilePopup)).toBeVisible();
7603
- }).toPass({ timeout: 15000 });
7604
7493
  this.openAuthLinkAndVerify = async ({ linkSelector, redirectLink, }) => {
7605
7494
  var _a, _b;
7606
7495
  const profilePagePromise = this.page.waitForEvent("popup");
@@ -7611,19 +7500,6 @@ class HelpAndProfilePage {
7611
7500
  await test.expect(profilePage).toHaveURL(new RegExp(redirectLink));
7612
7501
  await profilePage.close();
7613
7502
  };
7614
- // TODO Remove when all apps have migrated to the new navbar style
7615
- this.verifyProfileAndOrganizationLinks = async () => {
7616
- await test.test.step("Step 1: Open Profile popup and verify", this.openProfilePopup);
7617
- await test.test.step("Step 2: Open My profile link and verify", async () => this.openAuthLinkAndVerify({
7618
- linkSelector: PROFILE_SECTION_SELECTORS.myProfileButton,
7619
- redirectLink: ROUTES.myProfile,
7620
- }));
7621
- await test.test.step("Step 3: Open Profile popup and verify", this.openProfilePopup);
7622
- await test.test.step("Step 4: Open My organization link and verify", async () => this.openAuthLinkAndVerify({
7623
- linkSelector: PROFILE_SECTION_SELECTORS.profileOrganizationSettingsButton,
7624
- redirectLink: ROUTES.authSettings,
7625
- }));
7626
- };
7627
7503
  this.verifyProfileAndOrganizationLinksV2 = async () => {
7628
7504
  await test.test.step("Step 1: Open Help center and verify", this.openHelpCenterV2);
7629
7505
  await test.test.step("Step 2: Open My profile link and verify", async () => this.openAuthLinkAndVerify({
@@ -7636,19 +7512,6 @@ class HelpAndProfilePage {
7636
7512
  redirectLink: ROUTES.authSettings,
7637
7513
  }));
7638
7514
  };
7639
- // TODO Remove when all apps have migrated to the new navbar style
7640
- this.verifyLogout = async () => {
7641
- if (shouldSkipSetupAndTeardown())
7642
- return;
7643
- await test.test.step("Step 1: Open Profile popup and verify", this.openProfilePopup);
7644
- await test.test.step("Step 2: Click logout and verify", async () => {
7645
- await this.page
7646
- .getByTestId(PROFILE_SECTION_SELECTORS.logoutButton)
7647
- .click();
7648
- await test.expect(this.page).toHaveURL(NEETO_AUTH_BASE_URL());
7649
- await test.expect(this.page).toHaveURL(new RegExp(ROUTES.loginLink));
7650
- });
7651
- };
7652
7515
  this.verifyLogoutV2 = async () => {
7653
7516
  if (shouldSkipSetupAndTeardown())
7654
7517
  return;
@@ -7657,8 +7520,12 @@ class HelpAndProfilePage {
7657
7520
  await this.page
7658
7521
  .getByTestId(PROFILE_SECTION_SELECTORS.logoutButton)
7659
7522
  .click();
7660
- await test.expect(this.page).toHaveURL(new RegExp(NEETO_AUTH_BASE_URL()), { timeout: 15000 });
7661
- await test.expect(this.page).toHaveURL(new RegExp(ROUTES.loginLink), { timeout: 15000 });
7523
+ await test.expect(this.page).toHaveURL(new RegExp(NEETO_AUTH_BASE_URL()), {
7524
+ timeout: 15000,
7525
+ });
7526
+ await test.expect(this.page).toHaveURL(new RegExp(ROUTES.loginLink), {
7527
+ timeout: 15000,
7528
+ });
7662
7529
  });
7663
7530
  };
7664
7531
  this.page = page;