@bigbinary/neeto-playwright-commons 4.3.4 → 4.4.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.
Files changed (3) hide show
  1. package/index.d.ts +517 -15
  2. package/index.js +546 -82
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -1025,9 +1025,12 @@ const COMMON_SELECTORS = {
1025
1025
  inputError: "input-error",
1026
1026
  selectDropDownError: "nui-select-error",
1027
1027
  subTitleHeading: "menubar-subtitle-heading",
1028
- noDataTitle: "empty-state-title",
1029
- noDataDescription: "empty-state-description",
1030
- noDataHelpText: "empty-state-help-text",
1028
+ noDataTitle: "no-data-title",
1029
+ noDataDescription: "no-data-description",
1030
+ noDataHelpText: "no-data-help-text",
1031
+ noDataTitleV2: "empty-state-title",
1032
+ noDataDescriptionV2: "empty-state-description",
1033
+ noDataHelpTextV2: "empty-state-help-text",
1031
1034
  backdrop: "neeto-backdrop",
1032
1035
  menuBarHeading: "menubar-heading",
1033
1036
  dropdownWrapper: "nui-select-container-wrapper",
@@ -1037,7 +1040,8 @@ const COMMON_SELECTORS = {
1037
1040
  tabItem: "tab-item",
1038
1041
  labelInputError: "label-input-error",
1039
1042
  urlInputError: "url-input-error",
1040
- noDataPrimaryButton: "empty-state-primary-button",
1043
+ noDataPrimaryButton: "no-data-primary-button",
1044
+ noDataPrimaryButtonV2: "empty-state-primary-button",
1041
1045
  modalHeader: "modal-header",
1042
1046
  avatar: "nui-avatar",
1043
1047
  nameInputError: "name-input-error",
@@ -2245,7 +2249,7 @@ class CustomCommands {
2245
2249
  retryTimeout: 20_000,
2246
2250
  }, options);
2247
2251
  const menu = page.getByTestId(COMMON_SELECTORS.customDropDownMenu(label));
2248
- const container = page.getByTestId(COMMON_SELECTORS.customSelectContainer(label));
2252
+ const container = page.getByTestId(COMMON_SELECTORS.customSelectValueContainer(label));
2249
2253
  await expect(async () => {
2250
2254
  await container.click();
2251
2255
  await expect(menu).toBeVisible({
@@ -2311,26 +2315,17 @@ class CustomCommands {
2311
2315
  await this.hideTooltip(triggerElement, customPageContext);
2312
2316
  };
2313
2317
  verifyHelpPopover = async ({ triggerElement = this.page.getByTestId(COMMON_SELECTORS.helpPopoverButton), title, content, helpURL, customPageContext = this.page, }) => {
2318
+ const tooltipBox = customPageContext.getByTestId(COMMON_SELECTORS.tooltip);
2314
2319
  await triggerElement.hover();
2315
- const getPopoverContentLocator = () => {
2316
- if (title) {
2317
- return customPageContext.getByTestId(COMMON_SELECTORS.helpPopoverTitle);
2318
- }
2319
- if (content) {
2320
- return customPageContext.getByTestId(COMMON_SELECTORS.helpPopoverDesc);
2321
- }
2322
- return customPageContext.getByTestId(COMMON_SELECTORS.helpPopoverLinkButton);
2323
- };
2324
- const popoverContentLocator = getPopoverContentLocator();
2325
- title && (await expect(popoverContentLocator).toHaveText(title));
2326
- content &&
2327
- (await expect(customPageContext.getByTestId(COMMON_SELECTORS.helpPopoverDesc)).toContainText(content));
2320
+ title &&
2321
+ (await expect(tooltipBox.getByRole("heading", { name: title })).toBeVisible());
2322
+ content && (await expect(tooltipBox).toContainText(content));
2328
2323
  helpURL &&
2329
2324
  (await Promise.all([
2330
2325
  this.assertHelpURLIsValid(helpURL),
2331
- expect(customPageContext.getByTestId(COMMON_SELECTORS.helpPopoverLinkButton)).toHaveAttribute("href", new RegExp(helpURL, "i")),
2326
+ expect(tooltipBox.getByTestId(COMMON_SELECTORS.helpPopoverLinkButton)).toHaveAttribute("href", new RegExp(helpURL, "i")),
2332
2327
  ]));
2333
- await this.hidePopoverContent(triggerElement, popoverContentLocator, customPageContext);
2328
+ await this.hideTooltip(triggerElement, customPageContext);
2334
2329
  };
2335
2330
  assertHelpURLIsValid = async (helpURL) => {
2336
2331
  const response = await this.request.get(helpURL);
@@ -2342,39 +2337,11 @@ class CustomCommands {
2342
2337
  .isHidden();
2343
2338
  if (isNoDataTitleHidden)
2344
2339
  return;
2345
- const helpLink = this.page
2346
- .getByTestId(COMMON_SELECTORS.noDataHelpText)
2347
- .getByRole("link")
2348
- .or(this.page
2349
- .getByTestId(COMMON_SELECTORS.noDataDescription)
2350
- .getByRole("link"));
2351
2340
  await Promise.all([
2352
2341
  this.assertHelpURLIsValid(helpURL),
2353
- expect(helpLink).toHaveAttribute("href", new RegExp(helpURL, "i")),
2342
+ expect(this.page.getByTestId(COMMON_SELECTORS.noDataHelpText).getByRole("link")).toHaveAttribute("href", new RegExp(helpURL, "i")),
2354
2343
  ]);
2355
2344
  };
2356
- hidePopoverContent = async (triggerElement, contentLocator, customPageContext = this.page) => {
2357
- const boundingBox = await triggerElement.boundingBox();
2358
- if (!boundingBox) {
2359
- throw new Error("Trigger element bounding box not found");
2360
- }
2361
- const { x, y, width, height } = boundingBox;
2362
- const moves = [
2363
- [x + width + 10, y],
2364
- [x, y + height + 10],
2365
- [x - 10, y],
2366
- [x, y - 10],
2367
- ];
2368
- await expect(async () => {
2369
- for (const [moveX, moveY] of moves) {
2370
- await customPageContext.mouse.move(moveX, moveY);
2371
- const isHidden = await contentLocator.isHidden();
2372
- if (isHidden)
2373
- break;
2374
- }
2375
- await expect(contentLocator).toBeHidden();
2376
- }).toPass({ timeout: 30_000 });
2377
- };
2378
2345
  verifySearchTermBlock = async (searchTerm) => {
2379
2346
  const filtersSearchTermBlock = this.page.getByTestId(NEETO_FILTERS_SELECTORS.filtersTermBlock());
2380
2347
  if (searchTerm) {
@@ -2438,7 +2405,7 @@ class CustomCommands {
2438
2405
  await Promise.all([
2439
2406
  expect(header).toContainText(titles),
2440
2407
  expect(header).toHaveCount(titlesAndRoutes.length),
2441
- expect(header.getByRole("link", { name: last?.title, exact: true })).toHaveAttribute("aria-disabled", "true"),
2408
+ expect(header.getByRole("link", { name: last?.title, exact: true })).toHaveCount(0),
2442
2409
  ...links.map(({ title, route }) => expect(header.getByRole("link", { name: title, exact: true })).toHaveAttribute("href", route)),
2443
2410
  ]);
2444
2411
  };
@@ -2525,6 +2492,100 @@ class CustomCommands {
2525
2492
  await this.page.keyboard.press("Enter");
2526
2493
  };
2527
2494
  }
2495
+ class CustomCommandsV2 extends CustomCommands {
2496
+ selectOptionFromDropdown = async ({ label = "nui", value, page = this.page, options = {}, }) => {
2497
+ Object.assign({
2498
+ visibilityTimeout: 2_000,
2499
+ textAssertionTimeout: 1_000,
2500
+ retryTimeout: 20_000,
2501
+ }, options);
2502
+ const menu = page.getByTestId(COMMON_SELECTORS.customDropDownMenu(label));
2503
+ const container = page.getByTestId(COMMON_SELECTORS.customSelectContainer(label));
2504
+ await expect(async () => {
2505
+ await container.click();
2506
+ await expect(menu).toBeVisible({
2507
+ timeout: options.visibilityTimeout,
2508
+ });
2509
+ await page.keyboard.type(value);
2510
+ await menu.getByText(value, { exact: true }).click();
2511
+ await expect(container).toContainText(value, {
2512
+ timeout: options.textAssertionTimeout,
2513
+ });
2514
+ }).toPass({ timeout: options.retryTimeout });
2515
+ };
2516
+ verifyHelpPopover = async ({ triggerElement = this.page.getByTestId(COMMON_SELECTORS.helpPopoverButton), title, content, helpURL, customPageContext = this.page, }) => {
2517
+ await triggerElement.hover();
2518
+ const getPopoverContentLocator = () => {
2519
+ if (title) {
2520
+ return customPageContext.getByTestId(COMMON_SELECTORS.helpPopoverTitle);
2521
+ }
2522
+ if (content) {
2523
+ return customPageContext.getByTestId(COMMON_SELECTORS.helpPopoverDesc);
2524
+ }
2525
+ return customPageContext.getByTestId(COMMON_SELECTORS.helpPopoverLinkButton);
2526
+ };
2527
+ const popoverContentLocator = getPopoverContentLocator();
2528
+ title && (await expect(popoverContentLocator).toHaveText(title));
2529
+ content &&
2530
+ (await expect(customPageContext.getByTestId(COMMON_SELECTORS.helpPopoverDesc)).toContainText(content));
2531
+ helpURL &&
2532
+ (await Promise.all([
2533
+ this.assertHelpURLIsValid(helpURL),
2534
+ expect(customPageContext.getByTestId(COMMON_SELECTORS.helpPopoverLinkButton)).toHaveAttribute("href", new RegExp(helpURL, "i")),
2535
+ ]));
2536
+ await this.hidePopoverContent(triggerElement, popoverContentLocator, customPageContext);
2537
+ };
2538
+ verifyHelpText = async (helpURL) => {
2539
+ const isNoDataTitleHidden = await this.page
2540
+ .getByTestId(COMMON_SELECTORS.noDataTitleV2)
2541
+ .isHidden();
2542
+ if (isNoDataTitleHidden)
2543
+ return;
2544
+ const helpLink = this.page
2545
+ .getByTestId(COMMON_SELECTORS.noDataHelpTextV2)
2546
+ .getByRole("link")
2547
+ .or(this.page
2548
+ .getByTestId(COMMON_SELECTORS.noDataDescriptionV2)
2549
+ .getByRole("link"));
2550
+ await Promise.all([
2551
+ this.assertHelpURLIsValid(helpURL),
2552
+ expect(helpLink).toHaveAttribute("href", new RegExp(helpURL, "i")),
2553
+ ]);
2554
+ };
2555
+ verifyBreadcrumbs = async (titlesAndRoutes) => {
2556
+ const header = this.page.getByTestId(COMMON_SELECTORS.breadcrumbHeader);
2557
+ const titles = pluck("title", titlesAndRoutes);
2558
+ const [last, ...links] = titlesAndRoutes.slice().reverse();
2559
+ await Promise.all([
2560
+ expect(header).toContainText(titles),
2561
+ expect(header).toHaveCount(titlesAndRoutes.length),
2562
+ expect(header.getByRole("link", { name: last?.title, exact: true })).toHaveAttribute("aria-disabled", "true"),
2563
+ ...links.map(({ title, route }) => expect(header.getByRole("link", { name: title, exact: true })).toHaveAttribute("href", route)),
2564
+ ]);
2565
+ };
2566
+ hidePopoverContent = async (triggerElement, contentLocator, customPageContext = this.page) => {
2567
+ const boundingBox = await triggerElement.boundingBox();
2568
+ if (!boundingBox) {
2569
+ throw new Error("Trigger element bounding box not found");
2570
+ }
2571
+ const { x, y, width, height } = boundingBox;
2572
+ const moves = [
2573
+ [x + width + 10, y],
2574
+ [x, y + height + 10],
2575
+ [x - 10, y],
2576
+ [x, y - 10],
2577
+ ];
2578
+ await expect(async () => {
2579
+ for (const [moveX, moveY] of moves) {
2580
+ await customPageContext.mouse.move(moveX, moveY);
2581
+ const isHidden = await contentLocator.isHidden();
2582
+ if (isHidden)
2583
+ break;
2584
+ }
2585
+ await expect(contentLocator).toBeHidden();
2586
+ }).toPass({ timeout: 30_000 });
2587
+ };
2588
+ }
2528
2589
 
2529
2590
  const CHAT_WIDGET_TEXTS = {
2530
2591
  newConversation: "Ask a question",
@@ -118815,7 +118876,7 @@ class HelpAndProfilePage {
118815
118876
  const floatingActionMenuBtn = this.page.getByTestId(COMMON_SELECTORS.floatingActionMenuButton);
118816
118877
  await expect(async () => {
118817
118878
  await floatingActionMenuBtn.scrollIntoViewIfNeeded();
118818
- await floatingActionMenuBtn.click();
118879
+ await floatingActionMenuBtn.hover();
118819
118880
  await expect(this.helpMenuBtn).toBeVisible();
118820
118881
  }).toPass({ timeout: 60_000 });
118821
118882
  };
@@ -118917,7 +118978,7 @@ class HelpAndProfilePage {
118917
118978
  await this.page.keyboard.press(openKeyboardShortcut);
118918
118979
  await expect(keyboardShortcutsPane).not.toHaveCSS("width", "1px");
118919
118980
  await Promise.all([
118920
- expect(keyItem.getByTestId(COMMON_SELECTORS.hotkeyDescription)).toHaveText(shortcuts.map(shortcut => shortcut.description)),
118981
+ expect(keyItem.locator("p")).toHaveText(shortcuts.map(shortcut => shortcut.description)),
118921
118982
  expect(keyItem.locator("div")).toHaveText(formattedSequences),
118922
118983
  ]);
118923
118984
  });
@@ -118965,9 +119026,13 @@ class HelpAndProfilePage {
118965
119026
  };
118966
119027
  openAuthLinkAndVerify = async ({ linkTestId, redirectLink, }) => {
118967
119028
  await this.page
118968
- .getByTestId(PROFILE_SECTION_SELECTORS.profileMoreDropdownButton)
119029
+ .getByTestId(COMMON_SELECTORS.pane)
119030
+ .getByTestId(COMMON_SELECTORS.dropdownIcon)
119031
+ .click();
119032
+ await this.page
119033
+ .getByTestId(COMMON_SELECTORS.dropdownContainer)
119034
+ .getByTestId(linkTestId)
118969
119035
  .click();
118970
- await this.page.getByTestId(linkTestId).click();
118971
119036
  await expect(this.page).toHaveURL(new RegExp(NEETO_AUTH_BASE_URL(readFileSyncIfExists()?.user?.subdomainName)));
118972
119037
  await expect(this.page).toHaveURL(new RegExp(redirectLink));
118973
119038
  await this.page.goBack();
@@ -119015,7 +119080,8 @@ class HelpAndProfilePage {
119015
119080
  return;
119016
119081
  }
119017
119082
  await this.page
119018
- .getByTestId(PROFILE_SECTION_SELECTORS.profileMoreDropdownButton)
119083
+ .getByTestId(COMMON_SELECTORS.paneBody)
119084
+ .getByTestId(COMMON_SELECTORS.dropdownIcon)
119019
119085
  .click();
119020
119086
  await this.page
119021
119087
  .getByTestId(PROFILE_SECTION_SELECTORS.imageUploadBtn)
@@ -119029,7 +119095,7 @@ class HelpAndProfilePage {
119029
119095
  };
119030
119096
  updateBasicInfo = async ({ contact, settings, imageName, }) => {
119031
119097
  await expect(this.page
119032
- .getByTestId(COMMON_SELECTORS.sheetBody)
119098
+ .getByTestId(COMMON_SELECTORS.pane)
119033
119099
  .getByTestId(COMMON_SELECTORS.uiSpinner)).toBeHidden();
119034
119100
  await this.uploadImage(imageName);
119035
119101
  await this.fillTextFields(contact);
@@ -119039,7 +119105,7 @@ class HelpAndProfilePage {
119039
119105
  .or(this.page.getByTestId(PROFILE_SECTION_SELECTORS.profileSubmitBtn))
119040
119106
  .click();
119041
119107
  await this.neetoPlaywrightUtilities.waitForPageLoad();
119042
- await expect(this.page.getByTestId(COMMON_SELECTORS.sheetCloseButton)).toBeHidden();
119108
+ await expect(this.page.getByTestId(COMMON_SELECTORS.paneModalCrossIcon)).toBeHidden();
119043
119109
  };
119044
119110
  openProfile = async () => {
119045
119111
  await this.openHelpCenter();
@@ -119049,7 +119115,7 @@ class HelpAndProfilePage {
119049
119115
  await this.page
119050
119116
  .getByTestId(PROFILE_SECTION_SELECTORS.myProfileButton)
119051
119117
  .click();
119052
- await expect(this.page.getByTestId(COMMON_SELECTORS.sheetHeader)).toContainText(this.t("neetoTeamMembers.profile.common.myProfile"));
119118
+ await expect(this.page.getByTestId(COMMON_SELECTORS.paneHeader)).toContainText(this.t("neetoTeamMembers.profile.common.myProfile"));
119053
119119
  };
119054
119120
  verifyProfileSidePane = async ({ contact, settings }) => {
119055
119121
  const timeZone = settings?.timeZone;
@@ -119097,7 +119163,8 @@ class HelpAndProfilePage {
119097
119163
  await test$1.step("3: Verify basic info", async () => {
119098
119164
  await this.openProfile();
119099
119165
  await this.page
119100
- .getByTestId(PROFILE_SECTION_SELECTORS.profileMoreDropdownButton)
119166
+ .getByTestId(COMMON_SELECTORS.pane)
119167
+ .getByTestId(COMMON_SELECTORS.dropdownIcon)
119101
119168
  .click();
119102
119169
  await this.page
119103
119170
  .getByTestId(PROFILE_SECTION_SELECTORS.editBasicInfoMenuBtn)
@@ -119225,6 +119292,132 @@ class HelpAndProfilePage {
119225
119292
  });
119226
119293
  };
119227
119294
  }
119295
+ class HelpAndProfilePageV2 extends HelpAndProfilePage {
119296
+ openHelpCenter = async () => {
119297
+ const floatingActionMenuBtn = this.page.getByTestId(COMMON_SELECTORS.floatingActionMenuButton);
119298
+ await expect(async () => {
119299
+ await floatingActionMenuBtn.scrollIntoViewIfNeeded();
119300
+ await floatingActionMenuBtn.click();
119301
+ await expect(this.helpMenuBtn).toBeVisible();
119302
+ }).toPass({ timeout: 60_000 });
119303
+ };
119304
+ openAndVerifyKeyboardShortcutsPane = async (productShortcuts, osPlatform = "windows") => {
119305
+ const keyboardShortcutsPane = this.page.getByTestId(KEYBOARD_SHORTCUTS_SELECTORS.keyboardShortcutsPane);
119306
+ const keyItem = this.page.getByTestId(KEYBOARD_SHORTCUTS_SELECTORS.hotKeyItem);
119307
+ const openKeyboardShortcut = osPlatform === "mac" ? "Meta+/" : "Control+/";
119308
+ const shortcuts = [...globalShortcuts(this.t), ...productShortcuts];
119309
+ const formattedSequences = shortcuts.map(shortcut => this.formatKeyboardShortcut(shortcut.sequence, osPlatform));
119310
+ await test$1.step("1: Open Help Center", this.openHelpCenter);
119311
+ await test$1.step("2: Open and close keyboard shortcuts from UI", async () => {
119312
+ await this.page
119313
+ .getByTestId(HELP_CENTER_SELECTORS.keyboardShortcutButton)
119314
+ .click();
119315
+ await expect(keyboardShortcutsPane).not.toHaveCSS("width", "1px");
119316
+ await this.page
119317
+ .getByTestId(KEYBOARD_SHORTCUTS_SELECTORS.closePaneButton)
119318
+ .click();
119319
+ await expect(keyboardShortcutsPane).toHaveCSS("width", "1px");
119320
+ });
119321
+ await test$1.step("3: Open and close keyboard shortcuts through shortcut", async () => {
119322
+ await this.page.keyboard.press(openKeyboardShortcut);
119323
+ await expect(keyboardShortcutsPane).not.toHaveCSS("width", "1px");
119324
+ await this.page.keyboard.press("Escape");
119325
+ await expect(keyboardShortcutsPane).toHaveCSS("width", "1px");
119326
+ });
119327
+ await test$1.step("4: Verify all displayed keyboard shortcuts", async () => {
119328
+ await this.page.keyboard.press(openKeyboardShortcut);
119329
+ await expect(keyboardShortcutsPane).not.toHaveCSS("width", "1px");
119330
+ await Promise.all([
119331
+ expect(keyItem.getByTestId(COMMON_SELECTORS.hotkeyDescription)).toHaveText(shortcuts.map(shortcut => shortcut.description)),
119332
+ expect(keyItem.locator("div")).toHaveText(formattedSequences),
119333
+ ]);
119334
+ });
119335
+ };
119336
+ openAuthLinkAndVerify = async ({ linkTestId, redirectLink, }) => {
119337
+ await this.page
119338
+ .getByTestId(PROFILE_SECTION_SELECTORS.profileMoreDropdownButton)
119339
+ .click();
119340
+ await this.page.getByTestId(linkTestId).click();
119341
+ await expect(this.page).toHaveURL(new RegExp(NEETO_AUTH_BASE_URL(readFileSyncIfExists()?.user?.subdomainName)));
119342
+ await expect(this.page).toHaveURL(new RegExp(redirectLink));
119343
+ await this.page.goBack();
119344
+ };
119345
+ uploadImage = async (imageName) => {
119346
+ if (await isGithubIssueOpen([
119347
+ "https://github.com/neetozone/neeto-team-members-nano/issues/1567",
119348
+ ])) {
119349
+ return;
119350
+ }
119351
+ await this.page
119352
+ .getByTestId(PROFILE_SECTION_SELECTORS.profileMoreDropdownButton)
119353
+ .click();
119354
+ await this.page
119355
+ .getByTestId(PROFILE_SECTION_SELECTORS.imageUploadBtn)
119356
+ .click();
119357
+ await this.neetoPlaywrightUtilities.uploadFileViaDispatch({
119358
+ fileNameWithType: `images/${imageName}`,
119359
+ droppableZone: this.page.getByTestId(NEETO_IMAGE_UPLOADER_SELECTORS.fileInput),
119360
+ });
119361
+ await expect(this.page.getByTestId(COMMON_SELECTORS.modalHeader)).toBeHidden({ timeout: 10_000 });
119362
+ await expect(this.page.getByTestId(COMMON_SELECTORS.avatar).locator("img")).toHaveAttribute("src", imageRegex(imageName));
119363
+ };
119364
+ updateBasicInfo = async ({ contact, settings, imageName, }) => {
119365
+ await expect(this.page
119366
+ .getByTestId(COMMON_SELECTORS.sheetBody)
119367
+ .getByTestId(COMMON_SELECTORS.uiSpinner)).toBeHidden();
119368
+ await this.uploadImage(imageName);
119369
+ await this.fillTextFields(contact);
119370
+ await this.selectDropdownFields(settings);
119371
+ await this.page
119372
+ .getByTestId(PROFILE_SECTION_SELECTORS.submitButton)
119373
+ .or(this.page.getByTestId(PROFILE_SECTION_SELECTORS.profileSubmitBtn))
119374
+ .click();
119375
+ await this.neetoPlaywrightUtilities.waitForPageLoad();
119376
+ await expect(this.page.getByTestId(COMMON_SELECTORS.sheetCloseButton)).toBeHidden();
119377
+ };
119378
+ openProfile = async () => {
119379
+ await this.openHelpCenter();
119380
+ await this.page
119381
+ .getByTestId(PROFILE_SECTION_SELECTORS.profileExpandMenuBtn)
119382
+ .click();
119383
+ await this.page
119384
+ .getByTestId(PROFILE_SECTION_SELECTORS.myProfileButton)
119385
+ .click();
119386
+ await expect(this.page.getByTestId(COMMON_SELECTORS.sheetHeader)).toContainText(this.t("neetoTeamMembers.profile.common.myProfile"));
119387
+ };
119388
+ verifyProfile = async () => {
119389
+ await test$1.step("1: Open Manage billing and subscriptions link and verify", async () => {
119390
+ await this.openProfile();
119391
+ await this.openAuthLinkAndVerify({
119392
+ redirectLink: ROUTES.myProfile,
119393
+ linkTestId: PROFILE_SECTION_SELECTORS.manageBillingAndSubscriptionsButton,
119394
+ });
119395
+ });
119396
+ await test$1.step("2: Open Update email link and verify", async (step) => {
119397
+ step.skip(await isGithubIssueOpen([
119398
+ "https://github.com/neetozone/neeto-team-members-nano/issues/1566",
119399
+ ]), "Update email button is not navigating to Change email page.");
119400
+ await this.openProfile();
119401
+ await this.openAuthLinkAndVerify({
119402
+ redirectLink: ROUTES.updateEmail,
119403
+ linkTestId: PROFILE_SECTION_SELECTORS.updateEmailMenuBtn,
119404
+ });
119405
+ });
119406
+ await test$1.step("3: Verify basic info", async () => {
119407
+ await this.openProfile();
119408
+ await this.page
119409
+ .getByTestId(PROFILE_SECTION_SELECTORS.profileMoreDropdownButton)
119410
+ .click();
119411
+ await this.page
119412
+ .getByTestId(PROFILE_SECTION_SELECTORS.editBasicInfoMenuBtn)
119413
+ .click();
119414
+ const basicInfoParams = getBasicInfoTestData();
119415
+ await this.updateBasicInfo(basicInfoParams);
119416
+ await this.openProfile();
119417
+ await this.verifyProfileSidePane(basicInfoParams);
119418
+ });
119419
+ };
119420
+ }
119228
119421
 
119229
119422
  class MicrosoftPage extends IntegrationBase {
119230
119423
  totp;
@@ -120898,6 +121091,13 @@ class ImageUploader {
120898
121091
  }
120899
121092
 
120900
121093
  const openFilterPane = async (page) => {
121094
+ await page
121095
+ .getByTestId(NEETO_FILTERS_SELECTORS.filterButton)
121096
+ .or(page.getByTestId(COMMON_SELECTORS.filterButon))
121097
+ .click();
121098
+ await expect(page.getByTestId(COMMON_SELECTORS.paneHeader)).toHaveText(getI18nInstance().t("neetoFilters.common.filters"));
121099
+ };
121100
+ const openFilterPaneV2 = async (page) => {
120901
121101
  await page
120902
121102
  .getByTestId(NEETO_FILTERS_SELECTORS.filterButton)
120903
121103
  .or(page.getByTestId(COMMON_SELECTORS.filterButon))
@@ -120922,6 +121122,7 @@ const clearFiltersFromActionBlock = async (page) => {
120922
121122
  };
120923
121123
  const filterUtils = {
120924
121124
  openFilterPane,
121125
+ openFilterPaneV2,
120925
121126
  clearFiltersFromActionBlock,
120926
121127
  };
120927
121128
 
@@ -120948,13 +121149,12 @@ class TeamMembers {
120948
121149
  };
120949
121150
  fillMemberForm = async (emails, role) => {
120950
121151
  await this.page
120951
- .getByTestId(COMMON_SELECTORS.emailInputWrapper)
120952
- .getByRole("textbox")
121152
+ .getByTestId(MEMBER_FORM_SELECTORS.emailTextField)
120953
121153
  .fill(emails.join(", "));
120954
121154
  await this.page.keyboard.press("Enter");
120955
121155
  role &&
120956
121156
  (await this.neetoPlaywrightUtilities.toggleElement({
120957
- locator: this.page.getByRole("radio", { name: role, exact: true }),
121157
+ locator: this.page.getByTestId(MEMBER_SELECTORS.roleLabel(role)),
120958
121158
  }));
120959
121159
  const continueBtn = this.page.getByTestId(MEMBER_SELECTORS.continueButton);
120960
121160
  await continueBtn.click();
@@ -120973,7 +121173,7 @@ class TeamMembers {
120973
121173
  await this.neetoPlaywrightUtilities.waitForPageLoad();
120974
121174
  };
120975
121175
  submit = async () => {
120976
- const pane = this.page.getByRole("dialog");
121176
+ const pane = this.page.getByTestId(COMMON_SELECTORS.paneBody);
120977
121177
  const submitBtn = this.page.getByTestId(MEMBER_SELECTORS.submitButton);
120978
121178
  const buttonSpinner = submitBtn.getByTestId(COMMON_SELECTORS.uiSpinner);
120979
121179
  await expect(submitBtn).toBeVisible({ timeout: 10_000 });
@@ -120996,12 +121196,9 @@ class TeamMembers {
120996
121196
  await expect(this.page.getByRole("cell", { name: email, exact: true })).toBeVisible();
120997
121197
  };
120998
121198
  editMemberViaUI = async ({ email = "", firstName = "", lastName = "", role = "standard", } = {}) => {
120999
- await expect(this.page.getByTestId(MEMBER_SELECTORS.dropDownIcon)).toHaveCount(1);
121000
121199
  await this.page.getByTestId(MEMBER_SELECTORS.dropDownIcon).click();
121001
121200
  await this.page.getByTestId(MEMBER_SELECTORS.editButton).click();
121002
- const editPane = this.page.getByRole("dialog");
121003
- await expect(editPane).toBeVisible({ timeout: 35_000 });
121004
- await expect(editPane.getByTestId(COMMON_SELECTORS.uiSpinner)).toHaveCount(0, { timeout: 35_000 });
121201
+ await this.neetoPlaywrightUtilities.waitForPaneToLoad();
121005
121202
  await expect(this.page
121006
121203
  .getByTestId(MEMBER_SELECTORS.submitButton)
121007
121204
  .getByTestId(COMMON_SELECTORS.uiSpinner)).toHaveCount(0, { timeout: 35_000 });
@@ -121018,7 +121215,7 @@ class TeamMembers {
121018
121215
  .getByTestId(MEMBER_FORM_SELECTORS.lastNameTextField)
121019
121216
  .fill(lastName));
121020
121217
  await this.neetoPlaywrightUtilities.toggleElement({
121021
- locator: this.page.getByRole("radio", { name: role, exact: true }),
121218
+ locator: this.page.getByTestId(MEMBER_SELECTORS.roleLabel(role)),
121022
121219
  });
121023
121220
  await this.submit();
121024
121221
  await this.neetoPlaywrightUtilities.waitForPageLoad();
@@ -121037,16 +121234,16 @@ class TeamMembers {
121037
121234
  .getByTestId(NEETO_FILTERS_SELECTORS.filterButton)
121038
121235
  .or(this.page.getByTestId(COMMON_SELECTORS.filterButon))
121039
121236
  .click();
121040
- await expect(this.page.getByTestId(NEETO_FILTERS_SELECTORS.filterPaneHeading)).toHaveText(this.t("neetoFilters.common.filters"));
121237
+ await expect(this.page.getByTestId(COMMON_SELECTORS.paneHeader)).toHaveText(this.t("neetoFilters.common.filters"));
121041
121238
  };
121042
121239
  filterMembersByMultiSelect = async ({ selectedOptions = [], selectContainerLocator = NEETO_FILTERS_SELECTORS.roleSelectContainer, }) => {
121043
121240
  await this.page
121044
121241
  .getByTestId(selectContainerLocator)
121045
- .getByRole("combobox")
121046
- .click({ timeout: 30_000 });
121242
+ .getByTestId(COMMON_SELECTORS.actionSelectIndicator)
121243
+ .click();
121047
121244
  for (const option of selectedOptions) {
121048
121245
  await this.page
121049
- .getByRole("option", { name: option, exact: true })
121246
+ .getByTestId(COMMON_SELECTORS.selectOption(option))
121050
121247
  .click();
121051
121248
  }
121052
121249
  await this.neetoPlaywrightUtilities.waitForPageLoad();
@@ -121054,14 +121251,14 @@ class TeamMembers {
121054
121251
  };
121055
121252
  filterMembers = async ({ email = { id: "", condition: "Is" }, roles = [], name = "", }) => {
121056
121253
  await filterUtils.clearFiltersFromActionBlock(this.page);
121057
- await this.openFilterPane();
121254
+ await filterUtils.openFilterPane(this.page);
121058
121255
  if (isPresent(email.id)) {
121059
121256
  await this.page
121060
121257
  .getByTestId(NEETO_FILTERS_SELECTORS.emailSelectContainer)
121061
- .getByRole("combobox")
121258
+ .getByTestId(COMMON_SELECTORS.actionSelectIndicator)
121062
121259
  .click();
121063
121260
  await this.page
121064
- .getByRole("option", { name: email.condition, exact: true })
121261
+ .getByTestId(COMMON_SELECTORS.selectOption(email.condition))
121065
121262
  .click();
121066
121263
  await this.page
121067
121264
  .getByTestId(NEETO_FILTERS_SELECTORS.filtersEmailFilter)
@@ -121182,6 +121379,120 @@ class TeamMembers {
121182
121379
  await filterUtils.clearFiltersFromActionBlock(this.page);
121183
121380
  };
121184
121381
  }
121382
+ class TeamMembersV2 extends TeamMembers {
121383
+ fillMemberForm = async (emails, role) => {
121384
+ await this.page
121385
+ .getByTestId(COMMON_SELECTORS.emailInputWrapper)
121386
+ .getByRole("textbox")
121387
+ .fill(emails.join(", "));
121388
+ await this.page.keyboard.press("Enter");
121389
+ role &&
121390
+ (await this.neetoPlaywrightUtilities.toggleElement({
121391
+ locator: this.page.getByRole("radio", { name: role, exact: true }),
121392
+ }));
121393
+ const continueBtn = this.page.getByTestId(MEMBER_SELECTORS.continueButton);
121394
+ await continueBtn.click();
121395
+ if (IS_DEV_ENV)
121396
+ return;
121397
+ await this.page
121398
+ .getByTestId(COMMON_SELECTORS.paneBody)
121399
+ .getByTestId(COMMON_SELECTORS.checkboxLabel)
121400
+ .click();
121401
+ await continueBtn.click();
121402
+ };
121403
+ submit = async () => {
121404
+ const pane = this.page.getByRole("dialog");
121405
+ const submitBtn = this.page.getByTestId(MEMBER_SELECTORS.submitButton);
121406
+ const buttonSpinner = submitBtn.getByTestId(COMMON_SELECTORS.uiSpinner);
121407
+ await expect(submitBtn).toBeVisible({ timeout: 10_000 });
121408
+ await expect(async () => {
121409
+ if (await pane.isHidden())
121410
+ return;
121411
+ (await buttonSpinner.isHidden()) && (await submitBtn.click());
121412
+ await expect(buttonSpinner).toHaveCount(0, { timeout: 10_000 });
121413
+ await expect(pane).toBeHidden();
121414
+ }).toPass({ timeout: 60_000 });
121415
+ await this.neetoPlaywrightUtilities.verifyToast();
121416
+ };
121417
+ editMemberViaUI = async ({ email = "", firstName = "", lastName = "", role = "standard", } = {}) => {
121418
+ await expect(this.page.getByTestId(MEMBER_SELECTORS.dropDownIcon)).toHaveCount(1);
121419
+ await this.page.getByTestId(MEMBER_SELECTORS.dropDownIcon).click();
121420
+ await this.page.getByTestId(MEMBER_SELECTORS.editButton).click();
121421
+ const editPane = this.page.getByRole("dialog");
121422
+ await expect(editPane).toBeVisible({ timeout: 35_000 });
121423
+ await expect(editPane.getByTestId(COMMON_SELECTORS.uiSpinner)).toHaveCount(0, { timeout: 35_000 });
121424
+ await expect(this.page
121425
+ .getByTestId(MEMBER_SELECTORS.submitButton)
121426
+ .getByTestId(COMMON_SELECTORS.uiSpinner)).toHaveCount(0, { timeout: 35_000 });
121427
+ isPresent(email) &&
121428
+ (await this.page
121429
+ .getByTestId(MEMBER_FORM_SELECTORS.emailInput)
121430
+ .fill(email));
121431
+ isPresent(firstName) &&
121432
+ (await this.page
121433
+ .getByTestId(MEMBER_FORM_SELECTORS.firstNameTextField)
121434
+ .fill(firstName));
121435
+ isPresent(lastName) &&
121436
+ (await this.page
121437
+ .getByTestId(MEMBER_FORM_SELECTORS.lastNameTextField)
121438
+ .fill(lastName));
121439
+ await this.neetoPlaywrightUtilities.toggleElement({
121440
+ locator: this.page.getByRole("radio", { name: role, exact: true }),
121441
+ });
121442
+ await this.submit();
121443
+ await this.neetoPlaywrightUtilities.waitForPageLoad();
121444
+ };
121445
+ openFilterPane = async () => {
121446
+ await this.page
121447
+ .getByTestId(NEETO_FILTERS_SELECTORS.filterButton)
121448
+ .or(this.page.getByTestId(COMMON_SELECTORS.filterButon))
121449
+ .click();
121450
+ await expect(this.page.getByTestId(NEETO_FILTERS_SELECTORS.filterPaneHeading)).toHaveText(this.t("neetoFilters.common.filters"));
121451
+ };
121452
+ filterMembersByMultiSelect = async ({ selectedOptions = [], selectContainerLocator = NEETO_FILTERS_SELECTORS.roleSelectContainer, }) => {
121453
+ await this.page
121454
+ .getByTestId(selectContainerLocator)
121455
+ .getByRole("combobox")
121456
+ .click({ timeout: 30_000 });
121457
+ for (const option of selectedOptions) {
121458
+ await this.page
121459
+ .getByRole("option", { name: option, exact: true })
121460
+ .click();
121461
+ }
121462
+ await this.neetoPlaywrightUtilities.waitForPageLoad();
121463
+ await expect(this.page.locator(COMMON_SELECTORS.tableSpinner)).toBeHidden();
121464
+ };
121465
+ filterMembers = async ({ email = { id: "", condition: "Is" }, roles = [], name = "", }) => {
121466
+ await filterUtils.clearFiltersFromActionBlock(this.page);
121467
+ await this.openFilterPane();
121468
+ if (isPresent(email.id)) {
121469
+ await this.page
121470
+ .getByTestId(NEETO_FILTERS_SELECTORS.emailSelectContainer)
121471
+ .getByRole("combobox")
121472
+ .click();
121473
+ await this.page
121474
+ .getByRole("option", { name: email.condition, exact: true })
121475
+ .click();
121476
+ await this.page
121477
+ .getByTestId(NEETO_FILTERS_SELECTORS.filtersEmailFilter)
121478
+ .fill(email.id);
121479
+ }
121480
+ isPresent(name) &&
121481
+ (await this.page
121482
+ .getByTestId(NEETO_FILTERS_SELECTORS.neetoFiltersNameFilterField)
121483
+ .fill(name));
121484
+ isPresent(roles) &&
121485
+ (await this.filterMembersByMultiSelect({ selectedOptions: roles }));
121486
+ await this.applyFilter();
121487
+ };
121488
+ verifyNoDataTitle = async (email) => {
121489
+ await this.neetoPlaywrightUtilities.waitForPageLoad();
121490
+ await this.page.getByTestId(MEMBER_SELECTORS.searchTextField).fill(email);
121491
+ await expect(this.page.getByTestId(NEETO_FILTERS_SELECTORS.neetoFiltersBarClearButton)).toBeVisible();
121492
+ await expect(this.page.getByTestId(COMMON_SELECTORS.noDataTitleV2)).toBeVisible({ timeout: 10_000 });
121493
+ await filterUtils.clearFiltersFromActionBlock(this.page);
121494
+ };
121495
+ }
121185
121496
 
121186
121497
  dayjs.extend(customParseFormat);
121187
121498
  class ApiKeysPage {
@@ -121193,6 +121504,70 @@ class ApiKeysPage {
121193
121504
  this.neetoPlaywrightUtilities = neetoPlaywrightUtilities;
121194
121505
  this.t = getI18nInstance().t;
121195
121506
  }
121507
+ enableExpiryDate = async (expiryDate) => {
121508
+ const userProps = await getGlobalUserProps(this.page);
121509
+ const normalizedDate = dayjs(expiryDate, DATE_FORMATS.date);
121510
+ const formattedExpiryDate = normalizedDate.format(userProps?.dateFormat);
121511
+ const expiryDateInput = this.page
121512
+ .getByTestId(COMMON_SELECTORS.paneBody)
121513
+ .getByTestId(ADMIN_PANEL_SELECTORS.expiryDateInput);
121514
+ const nextYearBtn = this.page.getByLabel(DATE_TEXTS.nextYear, {
121515
+ exact: true,
121516
+ });
121517
+ await this.page
121518
+ .getByTestId(COMMON_SELECTORS.checkboxInput("never-expires"))
121519
+ .uncheck();
121520
+ await expiryDateInput.click();
121521
+ await expect(nextYearBtn).toBeVisible();
121522
+ await expiryDateInput.pressSequentially(formattedExpiryDate, {
121523
+ delay: 250,
121524
+ });
121525
+ await Promise.all([
121526
+ expect(expiryDateInput).toHaveValue(formattedExpiryDate),
121527
+ expect(this.page.getByRole("button", { name: CALENDAR_LABELS.month })).toHaveText(normalizedDate.format(DATE_FORMATS.month)),
121528
+ expect(this.page.getByRole("button", { name: CALENDAR_LABELS.year })).toHaveText(normalizedDate.format(DATE_FORMATS.year)),
121529
+ expect(this.page.getByTitle(normalizedDate.format(DATE_FORMATS.calendarDate))).toHaveClass(RegExp(DATE_PICKER_SELECTORS.selectedDateInCalendarClass)),
121530
+ ]);
121531
+ await this.page.keyboard.press("Enter");
121532
+ await expect(nextYearBtn).toBeHidden({ timeout: 15_000 });
121533
+ };
121534
+ fillApiKeyDetails = async ({ label, expiryDate }) => {
121535
+ await this.page
121536
+ .getByTestId(COMMON_SELECTORS.paneBody)
121537
+ .getByTestId(COMMON_SELECTORS.customInputField("name"))
121538
+ .fill(label);
121539
+ isPresent(expiryDate) && (await this.enableExpiryDate(expiryDate));
121540
+ await this.neetoPlaywrightUtilities.saveChanges({ isPane: true });
121541
+ };
121542
+ verifyApiKey = ({ targetRow, label, date }) => Promise.all([
121543
+ expect(targetRow.getByRole("cell", { name: label })).toBeVisible(),
121544
+ expect(targetRow.getByRole("cell", { name: date })).toBeVisible(),
121545
+ expect(targetRow.getByRole("cell", {
121546
+ name: this.t("neetoApiKeys.common.never"),
121547
+ })).toBeVisible(),
121548
+ expect(targetRow.getByTestId(TAGS_SELECTORS.tagContainer)).toHaveText(this.t("neetoApiKeys.tags.active")),
121549
+ ]);
121550
+ editApiKey = async ({ label, expiryDate }) => {
121551
+ await this.page
121552
+ .getByTestId(COMMON_SELECTORS.dropdownContainer)
121553
+ .getByTestId(API_KEYS_SELECTORS.editApiKeyButton)
121554
+ .click();
121555
+ await this.fillApiKeyDetails({ label, expiryDate });
121556
+ };
121557
+ deleteApiKey = async (targetRow) => {
121558
+ await targetRow.getByTestId(COMMON_SELECTORS.dropdownIcon).click();
121559
+ await this.page
121560
+ .getByTestId(COMMON_SELECTORS.dropdownContainer)
121561
+ .getByTestId(API_KEYS_SELECTORS.deleteApiKeyButton)
121562
+ .click();
121563
+ await this.page
121564
+ .getByTestId(COMMON_SELECTORS.alertModalSubmitButton)
121565
+ .click();
121566
+ await this.neetoPlaywrightUtilities.verifyToast();
121567
+ await expect(targetRow).toBeHidden();
121568
+ };
121569
+ }
121570
+ class ApiKeysPageV2 extends ApiKeysPage {
121196
121571
  enableExpiryDate = async (expiryDate) => {
121197
121572
  const dialog = this.page.getByRole("dialog");
121198
121573
  const neverExpiresCheckbox = dialog.getByRole("checkbox", {
@@ -121656,12 +122031,12 @@ class RolesPage {
121656
122031
  : this.page;
121657
122032
  parentPermission &&
121658
122033
  (await parentPermissionSelector
121659
- .getByLabel(parentPermission, { exact: true })
121660
- .click());
122034
+ .getByTestId(COMMON_SELECTORS.customCheckboxLabel(parentPermission))
122035
+ .click({ force: true }));
121661
122036
  for (const permission of permissions) {
121662
122037
  await parentPermissionSelector
121663
- .getByLabel(permission, { exact: true })
121664
- .click();
122038
+ .getByTestId(COMMON_SELECTORS.customCheckboxLabel(permission))
122039
+ .click({ force: true }); // Used force: true because disabling the parent permission disables the child permissions means the checkboxes label become disable
121665
122040
  }
121666
122041
  await Promise.all([
121667
122042
  this.page.getByTestId(ROLES_SELECTORS.proceedButton).click(),
@@ -121701,6 +122076,28 @@ class RolesPage {
121701
122076
  }
121702
122077
  };
121703
122078
  }
122079
+ class RolesPageV2 extends RolesPage {
122080
+ selectAndSubmitPermissions = async (permissions, parentPermission = "", hierarchyLevelOfPermissions = 2) => {
122081
+ const parentPermissionSelector = parentPermission
122082
+ ? this.page
122083
+ .getByTestId(ROLES_SELECTORS.permissionSubCategoryCard(hierarchyLevelOfPermissions - 1))
122084
+ .filter({ hasText: parentPermission })
122085
+ : this.page;
122086
+ parentPermission &&
122087
+ (await parentPermissionSelector
122088
+ .getByLabel(parentPermission, { exact: true })
122089
+ .click());
122090
+ for (const permission of permissions) {
122091
+ await parentPermissionSelector
122092
+ .getByLabel(permission, { exact: true })
122093
+ .click();
122094
+ }
122095
+ await Promise.all([
122096
+ this.page.getByTestId(ROLES_SELECTORS.proceedButton).click(),
122097
+ this.neetoPlaywrightUtilities.verifyToast(),
122098
+ ]);
122099
+ };
122100
+ }
121704
122101
 
121705
122102
  class SidebarSection {
121706
122103
  page;
@@ -122248,13 +122645,41 @@ const verifyFreezeColumnAction = async (page, t) => {
122248
122645
  document.body.style.zoom = "0.25";
122249
122646
  }));
122250
122647
  await unFreezeAllColumns({ columnHeaders, columnOffset, page, t });
122251
- await toggleColumnState({ columnHeaders, columnOffset, page, t });
122648
+ await toggleColumnState({ columnHeaders, columnOffset, page });
122252
122649
  await validateColumnNames(columnHeaders, columnOffset, originalColumnNames);
122253
122650
  await toggleColumnState({
122254
122651
  columnHeaders,
122255
122652
  columnOffset,
122256
122653
  action: "Unfreeze",
122257
122654
  page,
122655
+ });
122656
+ await expect(columnHeader).toHaveText(originalColumnNames);
122657
+ moreThanFiveColumns &&
122658
+ (await page.evaluate(() => {
122659
+ document.body.style.zoom = "1";
122660
+ }));
122661
+ };
122662
+ const verifyFreezeColumnActionV2 = async (page, t) => {
122663
+ const columnHeader = page.getByRole("columnheader");
122664
+ const [columnHeaders, originalColumnNames, checkboxVisible] = await Promise.all([
122665
+ columnHeader.all(),
122666
+ columnHeader.allTextContents(),
122667
+ columnHeader.getByRole("checkbox").isVisible(),
122668
+ ]);
122669
+ const columnOffset = checkboxVisible ? 1 : 0;
122670
+ const moreThanFiveColumns = columnHeaders.length > 5;
122671
+ moreThanFiveColumns &&
122672
+ (await page.evaluate(() => {
122673
+ document.body.style.zoom = "0.25";
122674
+ }));
122675
+ await unFreezeAllColumnsV2({ columnHeaders, columnOffset, page, t });
122676
+ await toggleColumnStateV2({ columnHeaders, columnOffset, page, t });
122677
+ await validateColumnNamesV2(columnHeaders, columnOffset, originalColumnNames);
122678
+ await toggleColumnStateV2({
122679
+ columnHeaders,
122680
+ columnOffset,
122681
+ action: "Unfreeze",
122682
+ page,
122258
122683
  t,
122259
122684
  });
122260
122685
  await expect(columnHeader).toHaveText(originalColumnNames);
@@ -122264,6 +122689,23 @@ const verifyFreezeColumnAction = async (page, t) => {
122264
122689
  }));
122265
122690
  };
122266
122691
  const unFreezeAllColumns = async ({ columnHeaders, columnOffset, page, t, }) => {
122692
+ const unFreezeColumnButton = page
122693
+ .getByTestId(TABLE_SELECTORS.freezeUnfreezeButton)
122694
+ .filter({
122695
+ hasText: t("neetoui.table.unFreezeColumn"),
122696
+ });
122697
+ for (let i = columnHeaders.length - 1; i >= columnOffset; i--) {
122698
+ const currentHeader = columnHeaders[i];
122699
+ await currentHeader.getByTestId(TABLE_SELECTORS.columnMenuButton).click();
122700
+ await expect(page.getByTestId(COMMON_SELECTORS.dropdownContainer)).toBeVisible();
122701
+ (await unFreezeColumnButton.isVisible())
122702
+ ? await unFreezeColumnButton.click()
122703
+ : await currentHeader
122704
+ .getByTestId(TABLE_SELECTORS.columnMenuButton)
122705
+ .click();
122706
+ }
122707
+ };
122708
+ const unFreezeAllColumnsV2 = async ({ columnHeaders, columnOffset, page, t, }) => {
122267
122709
  const unFreezeColumnButton = page
122268
122710
  .getByTestId(TABLE_SELECTORS.freezeUnfreezeButton)
122269
122711
  .filter({
@@ -122278,7 +122720,22 @@ const unFreezeAllColumns = async ({ columnHeaders, columnOffset, page, t, }) =>
122278
122720
  : await page.keyboard.press("Escape");
122279
122721
  }
122280
122722
  };
122281
- const toggleColumnState = async ({ columnHeaders, columnOffset, action = "Freeze", page, t, }) => {
122723
+ const toggleColumnState = async ({ columnHeaders, columnOffset, action = "Freeze", page, }) => {
122724
+ const firstColumnIndex = columnOffset;
122725
+ const lastColumnIndex = columnHeaders.length - 1;
122726
+ const targetIndex = action === "Freeze" ? lastColumnIndex : firstColumnIndex;
122727
+ const toggleButton = page
122728
+ .getByTestId(TABLE_SELECTORS.freezeUnfreezeButton)
122729
+ .filter({ hasText: action });
122730
+ for (let i = firstColumnIndex; i < lastColumnIndex; i++) {
122731
+ const columnHeader = columnHeaders[targetIndex];
122732
+ (await page.getByTestId(COMMON_SELECTORS.tooltip).isVisible()) &&
122733
+ (await page.mouse.move(0, 0));
122734
+ await columnHeader.getByTestId(TABLE_SELECTORS.columnMenuButton).click();
122735
+ await toggleButton.click();
122736
+ }
122737
+ };
122738
+ const toggleColumnStateV2 = async ({ columnHeaders, columnOffset, action = "Freeze", page, t, }) => {
122282
122739
  const firstColumnIndex = columnOffset;
122283
122740
  const lastColumnIndex = columnHeaders.length - 1;
122284
122741
  const targetIndex = action === "Freeze" ? lastColumnIndex : firstColumnIndex;
@@ -122297,6 +122754,12 @@ const toggleColumnState = async ({ columnHeaders, columnOffset, action = "Freeze
122297
122754
  }
122298
122755
  };
122299
122756
  const validateColumnNames = async (columnHeaders, columnOffset, originalColumnNames) => {
122757
+ for (let i = columnOffset; i < originalColumnNames.length - 1; i++) {
122758
+ const expectedName = originalColumnNames[i + 1];
122759
+ await expect(columnHeaders[i]).toHaveText(expectedName);
122760
+ }
122761
+ };
122762
+ const validateColumnNamesV2 = async (columnHeaders, columnOffset, originalColumnNames) => {
122300
122763
  const lastColumnIndex = columnHeaders.length - 1;
122301
122764
  for (let i = columnOffset; i < lastColumnIndex; i++) {
122302
122765
  await expect(columnHeaders[i]).toHaveText(originalColumnNames[columnOffset + lastColumnIndex - i]);
@@ -122342,6 +122805,7 @@ const tableUtils = {
122342
122805
  assertColumnHeaderVisibility,
122343
122806
  toggleColumnCheckboxAndVerifyVisibility,
122344
122807
  verifyFreezeColumnAction,
122808
+ verifyFreezeColumnActionV2,
122345
122809
  verifyReorderColumns,
122346
122810
  };
122347
122811
 
@@ -126632,4 +127096,4 @@ class InboundEmailApis {
126632
127096
  };
126633
127097
  }
126634
127098
 
126635
- export { ACTIONS, ADMIN_PANEL_SELECTORS, ALL_RESOURCES, ANALYTICS_RESOURCES, API_KEYS_SELECTORS, API_ROUTES, APP_RESOURCES, AUDIT_LOGS_SELECTORS, ApiKeysApi, ApiKeysPage, AuditLogsPage, BASE_URL, CALENDAR_LABELS, CERTIFICATE_LIMIT_EXCEEDED_MESSAGE, CERTIFICATE_LIMIT_EXCEEDED_REGEXP, CHANGELOG_WIDGET_SELECTORS, CHAT_WIDGET_SELECTORS, CHAT_WIDGET_TEXTS, COLOR, COMMON_SELECTORS, COMMON_TEXTS, COMMUNITY_TEXTS, CREDENTIALS, CURRENT_TIME_RANGES, CUSTOM_DOMAIN_SELECTORS, CUSTOM_DOMAIN_SUFFIX, ColorPickerUtils, CustomCommands, CustomDomainApi, CustomDomainPage, DATE_FORMATS, DATE_PICKER_SELECTORS, DATE_RANGES, DATE_TEXTS, DEFAULT_WEBHOOKS_RESPONSE_TEXT, DESCRIPTION_EDITOR_TEXTS, EDITOR_VERIFY_TEXT_COLOR, EMBED_SELECTORS, EMOJI_LABEL, EMPTY_STORAGE_STATE, ENGAGE_TEXTS, ENVIRONMENT, EXAMPLE_URL, EXPANDED_FONT_SIZE, EXPORT_FILE_TYPES, EditorPage, EmailDeliveryUtils, EmbedBase, FILE_FORMATS, FONTS_RESOURCES, FONT_SIZE_SELECTORS, FROM_EMAIL_ENV_KEYS, GLOBAL_TRANSLATIONS_PATTERN, GOOGLE_ANALYTICS_SELECTORS, GOOGLE_CALENDAR_DATE_FORMAT, GOOGLE_LOGIN_SELECTORS, GOOGLE_LOGIN_TEXTS, GOOGLE_SHEETS_SELECTORS, GooglePage, HELP_CENTER_ROUTES, HELP_CENTER_SELECTORS, HelpAndProfilePage, INTEGRATIONS_TEXTS, INTEGRATION_SELECTORS, IPRestrictionsPage, IP_RESTRICTIONS_SELECTORS, IS_CI, IS_DEV_ENV, IS_MAILPIT_ENABLED, IS_STAGING_ENV, ImageUploader, InboundEmailApis, IntegrationBase, IpRestrictionsApi, KEYBOARD_SHORTCUTS_SELECTORS, KEYBOARD_SHORTCUT_TEST_CASES, LIST_MODIFIER_SELECTORS, LIST_MODIFIER_TAGS, LOGIN_SELECTORS, MAILPIT_BASE_URL, MAILPIT_DOMAIN_NAME, MEMBER_FORM_SELECTORS, MEMBER_SELECTORS, MEMBER_TEXTS, MERGE_TAGS_SELECTORS, MICROSOFT_LOGIN_SELECTORS, MICROSOFT_LOGIN_TEXTS, MailerUtils, MailpitApi, Member, MemberApis, MicrosoftPage, NEETO_AUTH_BASE_URL, NEETO_EDITOR_SELECTORS, NEETO_FILTERS_SELECTORS, NEETO_IMAGE_UPLOADER_SELECTORS, NEETO_ROUTES, NEETO_SEO_SELECTORS, NEETO_TEXT_MODIFIER_SELECTORS, NeetoAuthServer, NeetoChatWidget, NeetoEmailDeliveryApi, NeetoTowerApi, ONBOARDING_SELECTORS, ORGANIZATION_TEXTS, OTP_EMAIL_PATTERN, OrganizationPage, PAST_TIME_RANGES, PHONE_NUMBER_FORMATS, PLURAL, PRODUCT_ROLES_ROUTE_MAP, PROFILE_LINKS, PROFILE_SECTION_SELECTORS, PROJECT_NAMES, PROJECT_TRANSLATIONS_PATH, ROLES_SELECTORS, ROUTES, RailsEmailApiClient, RailsEmailUtils, RoleApis, RolesPage, SIGNUP_SELECTORS, SINGULAR, SLACK_DATA_QA_SELECTORS, SLACK_DEFAULT_CHANNEL, SLACK_SELECTORS, SLACK_WEB_TEXTS, STATUS_TEXTS, STORAGE_STATE, SecurityApi, SidebarSection, SlackApi, SlackPage, TABLE_SELECTORS, TAB_SELECTORS, TAGS_SELECTORS, TEAM_MEMBER_TEXTS, TEXT_MODIFIER_ROLES, TEXT_MODIFIER_SELECTORS, TEXT_MODIFIER_TAGS, THANK_YOU_SELECTORS, THEMES_SELECTORS, THEMES_TEXTS, THIRD_PARTY_RESOURCES, THIRD_PARTY_ROUTES, TIME_RANGES, TOASTR_MESSAGES, TWILIO_SELECTORS, TagsApi, TagsPage, TeamMembers, ThankYouApi, ThankYouPage, TwilioApi, USER_AGENTS, WEBHOOK_SELECTORS, WebhookSiteApi, WebhooksPage, ZAPIER_LIMIT_EXHAUSTED_MESSAGE, ZAPIER_SELECTORS, ZAPIER_TEST_EMAIL, ZAPIER_TEST_EMAIL_V2, ZAPIER_WEB_TEXTS, ZapierPage, authenticateUser, baseURLGenerator, basicHTMLContent, clearCredentials, commands, cpuThrottlingUsingCDP, createOrganizationViaRake, currencyUtils, dataQa, decodeQRCodeFromFile, definePlaywrightConfig, executeWithThrottledResources, extractSubdomainFromError, filterUtils, fixedMenuSelector, generatePhoneNumber, generatePhoneNumberDetails, generateRandomBypassEmail, generateRandomFile, generateStagingData, getByDataQA, getClipboardContent, getDirname, getFormattedPhoneNumber, getFullUrl, getGlobalUserProps, getGlobalUserState, getImagePathAndName, getIsoCodeFromPhoneCode, getListCount, globalShortcuts, grantClipboardPermissions, hexToRGB, hexToRGBA, i18nFixture, imageRegex, initializeCredentials, initializeTestData, initializeTotp, isGithubIssueOpen, isStagingOrganizationExpired, joinHyphenCase, joinString, login, mailpitDomainName, networkConditions, networkThrottlingUsingCDP, optionSelector, readFileAsBrowserFile, readFileSyncIfExists, removeCredentialFile, serializeFileForBrowser, shouldSkipCustomDomainSetup, shouldSkipSetupAndTeardown, simulateClickWithDelay, simulateTypingWithDelay, skipTest, squish, stealth as stealthTest, tableUtils, toCamelCase, updateCredentials, warmup, withCookieCache, writeDataToFile };
127099
+ export { ACTIONS, ADMIN_PANEL_SELECTORS, ALL_RESOURCES, ANALYTICS_RESOURCES, API_KEYS_SELECTORS, API_ROUTES, APP_RESOURCES, AUDIT_LOGS_SELECTORS, ApiKeysApi, ApiKeysPage, ApiKeysPageV2, AuditLogsPage, BASE_URL, CALENDAR_LABELS, CERTIFICATE_LIMIT_EXCEEDED_MESSAGE, CERTIFICATE_LIMIT_EXCEEDED_REGEXP, CHANGELOG_WIDGET_SELECTORS, CHAT_WIDGET_SELECTORS, CHAT_WIDGET_TEXTS, COLOR, COMMON_SELECTORS, COMMON_TEXTS, COMMUNITY_TEXTS, CREDENTIALS, CURRENT_TIME_RANGES, CUSTOM_DOMAIN_SELECTORS, CUSTOM_DOMAIN_SUFFIX, ColorPickerUtils, CustomCommands, CustomCommandsV2, CustomDomainApi, CustomDomainPage, DATE_FORMATS, DATE_PICKER_SELECTORS, DATE_RANGES, DATE_TEXTS, DEFAULT_WEBHOOKS_RESPONSE_TEXT, DESCRIPTION_EDITOR_TEXTS, EDITOR_VERIFY_TEXT_COLOR, EMBED_SELECTORS, EMOJI_LABEL, EMPTY_STORAGE_STATE, ENGAGE_TEXTS, ENVIRONMENT, EXAMPLE_URL, EXPANDED_FONT_SIZE, EXPORT_FILE_TYPES, EditorPage, EmailDeliveryUtils, EmbedBase, FILE_FORMATS, FONTS_RESOURCES, FONT_SIZE_SELECTORS, FROM_EMAIL_ENV_KEYS, GLOBAL_TRANSLATIONS_PATTERN, GOOGLE_ANALYTICS_SELECTORS, GOOGLE_CALENDAR_DATE_FORMAT, GOOGLE_LOGIN_SELECTORS, GOOGLE_LOGIN_TEXTS, GOOGLE_SHEETS_SELECTORS, GooglePage, HELP_CENTER_ROUTES, HELP_CENTER_SELECTORS, HelpAndProfilePage, HelpAndProfilePageV2, INTEGRATIONS_TEXTS, INTEGRATION_SELECTORS, IPRestrictionsPage, IP_RESTRICTIONS_SELECTORS, IS_CI, IS_DEV_ENV, IS_MAILPIT_ENABLED, IS_STAGING_ENV, ImageUploader, InboundEmailApis, IntegrationBase, IpRestrictionsApi, KEYBOARD_SHORTCUTS_SELECTORS, KEYBOARD_SHORTCUT_TEST_CASES, LIST_MODIFIER_SELECTORS, LIST_MODIFIER_TAGS, LOGIN_SELECTORS, MAILPIT_BASE_URL, MAILPIT_DOMAIN_NAME, MEMBER_FORM_SELECTORS, MEMBER_SELECTORS, MEMBER_TEXTS, MERGE_TAGS_SELECTORS, MICROSOFT_LOGIN_SELECTORS, MICROSOFT_LOGIN_TEXTS, MailerUtils, MailpitApi, Member, MemberApis, MicrosoftPage, NEETO_AUTH_BASE_URL, NEETO_EDITOR_SELECTORS, NEETO_FILTERS_SELECTORS, NEETO_IMAGE_UPLOADER_SELECTORS, NEETO_ROUTES, NEETO_SEO_SELECTORS, NEETO_TEXT_MODIFIER_SELECTORS, NeetoAuthServer, NeetoChatWidget, NeetoEmailDeliveryApi, NeetoTowerApi, ONBOARDING_SELECTORS, ORGANIZATION_TEXTS, OTP_EMAIL_PATTERN, OrganizationPage, PAST_TIME_RANGES, PHONE_NUMBER_FORMATS, PLURAL, PRODUCT_ROLES_ROUTE_MAP, PROFILE_LINKS, PROFILE_SECTION_SELECTORS, PROJECT_NAMES, PROJECT_TRANSLATIONS_PATH, ROLES_SELECTORS, ROUTES, RailsEmailApiClient, RailsEmailUtils, RoleApis, RolesPage, RolesPageV2, SIGNUP_SELECTORS, SINGULAR, SLACK_DATA_QA_SELECTORS, SLACK_DEFAULT_CHANNEL, SLACK_SELECTORS, SLACK_WEB_TEXTS, STATUS_TEXTS, STORAGE_STATE, SecurityApi, SidebarSection, SlackApi, SlackPage, TABLE_SELECTORS, TAB_SELECTORS, TAGS_SELECTORS, TEAM_MEMBER_TEXTS, TEXT_MODIFIER_ROLES, TEXT_MODIFIER_SELECTORS, TEXT_MODIFIER_TAGS, THANK_YOU_SELECTORS, THEMES_SELECTORS, THEMES_TEXTS, THIRD_PARTY_RESOURCES, THIRD_PARTY_ROUTES, TIME_RANGES, TOASTR_MESSAGES, TWILIO_SELECTORS, TagsApi, TagsPage, TeamMembers, TeamMembersV2, ThankYouApi, ThankYouPage, TwilioApi, USER_AGENTS, WEBHOOK_SELECTORS, WebhookSiteApi, WebhooksPage, ZAPIER_LIMIT_EXHAUSTED_MESSAGE, ZAPIER_SELECTORS, ZAPIER_TEST_EMAIL, ZAPIER_TEST_EMAIL_V2, ZAPIER_WEB_TEXTS, ZapierPage, authenticateUser, baseURLGenerator, basicHTMLContent, clearCredentials, commands, cpuThrottlingUsingCDP, createOrganizationViaRake, currencyUtils, dataQa, decodeQRCodeFromFile, definePlaywrightConfig, executeWithThrottledResources, extractSubdomainFromError, filterUtils, fixedMenuSelector, generatePhoneNumber, generatePhoneNumberDetails, generateRandomBypassEmail, generateRandomFile, generateStagingData, getByDataQA, getClipboardContent, getDirname, getFormattedPhoneNumber, getFullUrl, getGlobalUserProps, getGlobalUserState, getImagePathAndName, getIsoCodeFromPhoneCode, getListCount, globalShortcuts, grantClipboardPermissions, hexToRGB, hexToRGBA, i18nFixture, imageRegex, initializeCredentials, initializeTestData, initializeTotp, isGithubIssueOpen, isStagingOrganizationExpired, joinHyphenCase, joinString, login, mailpitDomainName, networkConditions, networkThrottlingUsingCDP, optionSelector, readFileAsBrowserFile, readFileSyncIfExists, removeCredentialFile, serializeFileForBrowser, shouldSkipCustomDomainSetup, shouldSkipSetupAndTeardown, simulateClickWithDelay, simulateTypingWithDelay, skipTest, squish, stealth as stealthTest, tableUtils, toCamelCase, updateCredentials, warmup, withCookieCache, writeDataToFile };