@bigbinary/neeto-playwright-commons 1.8.11 → 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 +43 -139
- package/index.cjs.js.map +1 -1
- package/index.d.ts +18 -12
- package/index.js +43 -140
- package/index.js.map +1 -1
- package/package.json +1 -1
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
|
|
|
@@ -363,6 +352,8 @@ declare const COMMON_SELECTORS: {
|
|
|
363
352
|
homeButton: string;
|
|
364
353
|
neetoUiSwitch: string;
|
|
365
354
|
floatingActionMenuButton: string;
|
|
355
|
+
columnsDropdownContainer: string;
|
|
356
|
+
columnsDropdownButton: string;
|
|
366
357
|
};
|
|
367
358
|
|
|
368
359
|
declare const NEETO_EDITOR_SELECTORS: {
|
|
@@ -614,6 +605,21 @@ declare const memberUtils: {
|
|
|
614
605
|
deactivateMemberViaRequest: ({ email, neetoPlaywrightUtilities, }: DeactiveMemberProps) => Promise<playwright_core.APIResponse | undefined>;
|
|
615
606
|
};
|
|
616
607
|
|
|
608
|
+
interface AssertColumnHeaderVisibilityProps {
|
|
609
|
+
page: Page;
|
|
610
|
+
columnName: string;
|
|
611
|
+
shouldBeVisible: boolean;
|
|
612
|
+
}
|
|
613
|
+
interface ToggleColumnCheckboxAndVerifyVisibilityProps {
|
|
614
|
+
page: Page;
|
|
615
|
+
tableColumns: string[];
|
|
616
|
+
shouldBeChecked: boolean;
|
|
617
|
+
}
|
|
618
|
+
declare const tableUtils: {
|
|
619
|
+
assertColumnHeaderVisibility: ({ page, columnName, shouldBeVisible, }: AssertColumnHeaderVisibilityProps) => Promise<void>;
|
|
620
|
+
toggleColumnCheckboxAndVerifyVisibility: ({ page, tableColumns, shouldBeChecked, }: ToggleColumnCheckboxAndVerifyVisibilityProps) => Promise<void>;
|
|
621
|
+
};
|
|
622
|
+
|
|
617
623
|
interface CurrentsOverrides {
|
|
618
624
|
projectId: string;
|
|
619
625
|
}
|
|
@@ -626,4 +632,4 @@ interface Overrides {
|
|
|
626
632
|
}
|
|
627
633
|
declare const definePlaywrightConfig: (overrides: Overrides) => _playwright_test.PlaywrightTestConfig<{}, {}>;
|
|
628
634
|
|
|
629
|
-
export { API_ROUTES, BASE_URL, CHANGELOG_WIDGET_SELECTORS, CHAT_WIDGET_SELECTORS, COMMON_SELECTORS, CREDENTIALS, CustomCommands, type CustomFixture, ENVIRONMENT, GLOBAL_TRANSLATIONS_PATTERN, HELP_CENTER_SELECTORS, HelpAndProfilePage, IS_STAGING_ENV, IntegrationBase, KEYBOARD_SHORTCUTS_SELECTORS, LOGIN_SELECTORS, MEMBER_FORM_SELECTORS, MEMBER_SELECTORS, MERGE_TAGS_SELECTORS, MailosaurUtils, NEETO_AUTH_BASE_URL, NEETO_EDITOR_SELECTORS, NEETO_FILTERS_SELECTORS, OTP_EMAIL_PATTERN, OrganizationPage, PROFILE_SECTION_SELECTORS, PROJECT_TRANSLATIONS_PATH, ROLES_SELECTORS, ROUTES, SIGNUP_SELECTORS, SLACK_DEFAULT_CHANNEL, STORAGE_STATE, SlackPage, TAGS_SELECTORS, THIRD_PARTY_ROUTES, USER_AGENTS, WebhooksPage, clearCredentials, commands, definePlaywrightConfig, extractSubdomainFromError, generateStagingData, getGlobalUserState, hyphenize, i18nFixture, initializeCredentials, joinHyphenCase, joinString, login, loginWithoutSSO, memberUtils, readFileSyncIfExists, removeCredentialFile, shouldSkipSetupAndTeardown, skipTest, updateCredentials, writeDataToFile };
|
|
635
|
+
export { API_ROUTES, BASE_URL, CHANGELOG_WIDGET_SELECTORS, CHAT_WIDGET_SELECTORS, COMMON_SELECTORS, CREDENTIALS, CustomCommands, type CustomFixture, ENVIRONMENT, GLOBAL_TRANSLATIONS_PATTERN, HELP_CENTER_SELECTORS, HelpAndProfilePage, IS_STAGING_ENV, IntegrationBase, KEYBOARD_SHORTCUTS_SELECTORS, LOGIN_SELECTORS, MEMBER_FORM_SELECTORS, MEMBER_SELECTORS, MERGE_TAGS_SELECTORS, MailosaurUtils, NEETO_AUTH_BASE_URL, NEETO_EDITOR_SELECTORS, NEETO_FILTERS_SELECTORS, OTP_EMAIL_PATTERN, OrganizationPage, PROFILE_SECTION_SELECTORS, PROJECT_TRANSLATIONS_PATH, ROLES_SELECTORS, ROUTES, SIGNUP_SELECTORS, SLACK_DEFAULT_CHANNEL, STORAGE_STATE, SlackPage, TAGS_SELECTORS, THIRD_PARTY_ROUTES, USER_AGENTS, WebhooksPage, clearCredentials, commands, definePlaywrightConfig, extractSubdomainFromError, generateStagingData, getGlobalUserState, hyphenize, i18nFixture, initializeCredentials, joinHyphenCase, joinString, login, loginWithoutSSO, memberUtils, readFileSyncIfExists, removeCredentialFile, shouldSkipSetupAndTeardown, skipTest, tableUtils, updateCredentials, writeDataToFile };
|
package/index.js
CHANGED
|
@@ -152,6 +152,8 @@ const COMMON_SELECTORS = {
|
|
|
152
152
|
homeButton: "home-button",
|
|
153
153
|
neetoUiSwitch: "nui-switch",
|
|
154
154
|
floatingActionMenuButton: "floating-action-menu-container",
|
|
155
|
+
columnsDropdownContainer: "columns-dropdown-container",
|
|
156
|
+
columnsDropdownButton: "columns-dropdown-button",
|
|
155
157
|
};
|
|
156
158
|
|
|
157
159
|
class CustomCommands {
|
|
@@ -7347,20 +7349,6 @@ class HelpAndProfilePage {
|
|
|
7347
7349
|
await expect(this.neetoChatFrame.getByTestId(CHAT_WIDGET_SELECTORS.chatBubble)).toHaveText(CHAT_WIDGET_TEXTS.welcomeChatBubble);
|
|
7348
7350
|
});
|
|
7349
7351
|
};
|
|
7350
|
-
// TODO Remove when all apps have migrated to the new navbar style
|
|
7351
|
-
this.openAndVerifyHelpArticles = async () => {
|
|
7352
|
-
await test$1.step("Step 1: Open Help Center links", this.openHelpCenter);
|
|
7353
|
-
await test$1.step("Step 2: Open and verify help articles link", async () => {
|
|
7354
|
-
const helpArticlesPromise = this.page.waitForEvent("popup");
|
|
7355
|
-
await this.page
|
|
7356
|
-
.getByTestId(HELP_CENTER_SELECTORS.documentationButton)
|
|
7357
|
-
.click();
|
|
7358
|
-
const helpArticlesPage = await helpArticlesPromise;
|
|
7359
|
-
await helpArticlesPage.waitForLoadState();
|
|
7360
|
-
await expect(helpArticlesPage).toHaveURL(this.kbDocsBaseURL);
|
|
7361
|
-
await helpArticlesPage.close();
|
|
7362
|
-
});
|
|
7363
|
-
};
|
|
7364
7352
|
this.openAndVerifyHelpArticlesV2 = async () => {
|
|
7365
7353
|
await test$1.step("Step 1: Open Help Center links", this.openHelpCenterV2);
|
|
7366
7354
|
await test$1.step("Step 2: Open and verify help articles link", async () => {
|
|
@@ -7374,13 +7362,6 @@ class HelpAndProfilePage {
|
|
|
7374
7362
|
await helpArticlesPage.close();
|
|
7375
7363
|
});
|
|
7376
7364
|
};
|
|
7377
|
-
// TODO Remove when all apps have migrated to the new navbar style
|
|
7378
|
-
this.openChangelogPane = async () => {
|
|
7379
|
-
await expect(async () => {
|
|
7380
|
-
await this.page.getByTestId(HELP_CENTER_SELECTORS.whatsNewButton).click();
|
|
7381
|
-
await expect(this.page.locator(CHANGELOG_WIDGET_SELECTORS.changelogWrapper)).toBeVisible();
|
|
7382
|
-
}).toPass({ timeout: 15000 });
|
|
7383
|
-
};
|
|
7384
7365
|
this.openChangelogPaneV2 = async () => {
|
|
7385
7366
|
await expect(async () => {
|
|
7386
7367
|
await this.openHelpCenterV2();
|
|
@@ -7388,33 +7369,6 @@ class HelpAndProfilePage {
|
|
|
7388
7369
|
await expect(this.page.locator(CHANGELOG_WIDGET_SELECTORS.changelogWrapper)).toBeVisible();
|
|
7389
7370
|
}).toPass({ timeout: 45000 });
|
|
7390
7371
|
};
|
|
7391
|
-
// TODO Remove when all apps have migrated to the new navbar style
|
|
7392
|
-
this.openAndVerifyChangelog = async () => {
|
|
7393
|
-
await test$1.step("Step 1: Open Help Center links", this.openHelpCenter);
|
|
7394
|
-
await test$1.step("Step 2: Open and verify changelog pane", this.openChangelogPane);
|
|
7395
|
-
await test$1.step("Step 3: Close and reopen changelog pane", async () => {
|
|
7396
|
-
await this.page
|
|
7397
|
-
.getByTestId(CHANGELOG_WIDGET_SELECTORS.closeButton)
|
|
7398
|
-
.click();
|
|
7399
|
-
await expect(this.page.locator(CHANGELOG_WIDGET_SELECTORS.changelogWrapper)).toBeHidden();
|
|
7400
|
-
await this.openHelpCenter();
|
|
7401
|
-
await this.openChangelogPane();
|
|
7402
|
-
});
|
|
7403
|
-
await test$1.step("Step 4: Open and verify public URL", async () => {
|
|
7404
|
-
const changelogPagePromise = this.page.waitForEvent("popup");
|
|
7405
|
-
await this.page
|
|
7406
|
-
.getByTestId(CHANGELOG_WIDGET_SELECTORS.publicUrlLink)
|
|
7407
|
-
.click();
|
|
7408
|
-
const changelogPage = await changelogPagePromise;
|
|
7409
|
-
await this.neetoPlaywrightUtilities.interceptMultipleResponses({
|
|
7410
|
-
customPageContext: changelogPage,
|
|
7411
|
-
baseUrl: this.changelogBaseURL.split("/site")[0],
|
|
7412
|
-
times: 3,
|
|
7413
|
-
});
|
|
7414
|
-
await expect(changelogPage).toHaveURL(this.changelogBaseURL);
|
|
7415
|
-
await changelogPage.close();
|
|
7416
|
-
});
|
|
7417
|
-
};
|
|
7418
7372
|
this.openAndVerifyChangelogV2 = async () => {
|
|
7419
7373
|
await test$1.step("Step 1: Open Help Center links and changelog", this.openChangelogPaneV2);
|
|
7420
7374
|
await test$1.step("Step 2: Close and reopen changelog pane", async () => {
|
|
@@ -7447,52 +7401,6 @@ class HelpAndProfilePage {
|
|
|
7447
7401
|
? formattedShortcut.replace(/ctrl/g, "⌘").replace(/alt/g, "opt")
|
|
7448
7402
|
: formattedShortcut;
|
|
7449
7403
|
};
|
|
7450
|
-
this.openAndVerifyKeyboardShortcutsPane = async (productShortcuts, osPlatform = "windows") => {
|
|
7451
|
-
const globalShortcuts = [
|
|
7452
|
-
{
|
|
7453
|
-
description: this.t("neetoMolecules.keyboardShortcuts.global.openKeyboardShortcutsPane"),
|
|
7454
|
-
sequence: "shift+/",
|
|
7455
|
-
},
|
|
7456
|
-
{
|
|
7457
|
-
description: this.t("neetoMolecules.keyboardShortcuts.global.close"),
|
|
7458
|
-
sequence: "esc",
|
|
7459
|
-
},
|
|
7460
|
-
{
|
|
7461
|
-
description: this.t("neetoMolecules.keyboardShortcuts.global.submitForm"),
|
|
7462
|
-
sequence: "ctrl+enter",
|
|
7463
|
-
},
|
|
7464
|
-
];
|
|
7465
|
-
const shortcuts = [...globalShortcuts, ...productShortcuts];
|
|
7466
|
-
await test$1.step("Step 1: Open Help Center", this.openHelpCenter);
|
|
7467
|
-
await test$1.step("Step 2: Open and close keyboard shortcuts from UI", async () => {
|
|
7468
|
-
await this.page
|
|
7469
|
-
.getByTestId(HELP_CENTER_SELECTORS.keyboardShortcutButton)
|
|
7470
|
-
.click();
|
|
7471
|
-
await expect(this.page.getByTestId(KEYBOARD_SHORTCUTS_SELECTORS.keyboardShortcutsPane)).not.toHaveCSS("width", "1px");
|
|
7472
|
-
await this.page
|
|
7473
|
-
.getByTestId(KEYBOARD_SHORTCUTS_SELECTORS.closePaneButton)
|
|
7474
|
-
.click();
|
|
7475
|
-
await expect(this.page.getByTestId(KEYBOARD_SHORTCUTS_SELECTORS.keyboardShortcutsPane)).toHaveCSS("width", "1px");
|
|
7476
|
-
});
|
|
7477
|
-
await test$1.step("Step 3: Open and close keyboard shortcuts through shortcut", async () => {
|
|
7478
|
-
await this.page.keyboard.press("Shift+/");
|
|
7479
|
-
await expect(this.page.getByTestId(KEYBOARD_SHORTCUTS_SELECTORS.keyboardShortcutsPane)).not.toHaveCSS("width", "1px");
|
|
7480
|
-
await this.page.keyboard.press("Escape");
|
|
7481
|
-
await expect(this.page.getByTestId(KEYBOARD_SHORTCUTS_SELECTORS.keyboardShortcutsPane)).toHaveCSS("width", "1px");
|
|
7482
|
-
});
|
|
7483
|
-
await test$1.step("Step 4: Verify all displayed keyboard shortcuts", async () => {
|
|
7484
|
-
await this.page.keyboard.press("Shift+/");
|
|
7485
|
-
await expect(this.page.getByTestId(KEYBOARD_SHORTCUTS_SELECTORS.keyboardShortcutsPane)).not.toHaveCSS("width", "1px");
|
|
7486
|
-
await expect(this.page
|
|
7487
|
-
.getByTestId(KEYBOARD_SHORTCUTS_SELECTORS.hotKeyItem)
|
|
7488
|
-
.locator("p")).toHaveText(shortcuts.map(shortcut => shortcut.description));
|
|
7489
|
-
const formattedSequences = shortcuts.map(shortcut => this.formatKeyboardShortcut(shortcut.sequence, osPlatform));
|
|
7490
|
-
await expect(this.page
|
|
7491
|
-
.getByTestId(KEYBOARD_SHORTCUTS_SELECTORS.hotKeyItem)
|
|
7492
|
-
.locator("div")).toHaveText(formattedSequences);
|
|
7493
|
-
});
|
|
7494
|
-
};
|
|
7495
|
-
// TODO Remove when all apps have migrated to the new navbar style
|
|
7496
7404
|
this.openAndVerifyKeyboardShortcutsPaneV2 = async (productShortcuts, osPlatform = "windows") => {
|
|
7497
7405
|
const globalShortcuts = [
|
|
7498
7406
|
{
|
|
@@ -7538,16 +7446,6 @@ class HelpAndProfilePage {
|
|
|
7538
7446
|
.locator("div")).toHaveText(formattedSequences);
|
|
7539
7447
|
});
|
|
7540
7448
|
};
|
|
7541
|
-
// TODO Remove when all apps have migrated to the new navbar style
|
|
7542
|
-
this.openAppSwitcherAndVerify = async () => {
|
|
7543
|
-
const appSwitcher = this.page.getByTestId(COMMON_SELECTORS.appSwitcherButton);
|
|
7544
|
-
await test$1.step("Step 1: Verify hovering over app switcher opens the app switcher drawer", () => expect(async () => {
|
|
7545
|
-
await this.hoverOnBody();
|
|
7546
|
-
await appSwitcher.scrollIntoViewIfNeeded();
|
|
7547
|
-
await appSwitcher.hover();
|
|
7548
|
-
await expect(this.page.getByTestId(COMMON_SELECTORS.appSwitcherWrapper)).toBeVisible();
|
|
7549
|
-
}).toPass({ timeout: 15000 }));
|
|
7550
|
-
};
|
|
7551
7449
|
this.openAppSwitcherAndVerifyV2 = async () => {
|
|
7552
7450
|
await test$1.step("Step 1: Verify hovering over app switcher opens the app switcher drawer", () => expect(async () => {
|
|
7553
7451
|
await this.openHelpCenterV2();
|
|
@@ -7557,13 +7455,6 @@ class HelpAndProfilePage {
|
|
|
7557
7455
|
await expect(this.page.getByTestId(COMMON_SELECTORS.appSwitcherWrapper)).toBeVisible();
|
|
7558
7456
|
}).toPass({ timeout: 45000 }));
|
|
7559
7457
|
};
|
|
7560
|
-
// TODO Remove when all apps have migrated to the new navbar style
|
|
7561
|
-
this.openProfilePopup = () => expect(async () => {
|
|
7562
|
-
await this.hoverOnBody();
|
|
7563
|
-
await this.profileSectionButton.scrollIntoViewIfNeeded();
|
|
7564
|
-
await this.profileSectionButton.hover();
|
|
7565
|
-
await expect(this.page.getByTestId(PROFILE_SECTION_SELECTORS.profilePopup)).toBeVisible();
|
|
7566
|
-
}).toPass({ timeout: 15000 });
|
|
7567
7458
|
this.openAuthLinkAndVerify = async ({ linkSelector, redirectLink, }) => {
|
|
7568
7459
|
var _a, _b;
|
|
7569
7460
|
const profilePagePromise = this.page.waitForEvent("popup");
|
|
@@ -7574,19 +7465,6 @@ class HelpAndProfilePage {
|
|
|
7574
7465
|
await expect(profilePage).toHaveURL(new RegExp(redirectLink));
|
|
7575
7466
|
await profilePage.close();
|
|
7576
7467
|
};
|
|
7577
|
-
// TODO Remove when all apps have migrated to the new navbar style
|
|
7578
|
-
this.verifyProfileAndOrganizationLinks = async () => {
|
|
7579
|
-
await test$1.step("Step 1: Open Profile popup and verify", this.openProfilePopup);
|
|
7580
|
-
await test$1.step("Step 2: Open My profile link and verify", async () => this.openAuthLinkAndVerify({
|
|
7581
|
-
linkSelector: PROFILE_SECTION_SELECTORS.myProfileButton,
|
|
7582
|
-
redirectLink: ROUTES.myProfile,
|
|
7583
|
-
}));
|
|
7584
|
-
await test$1.step("Step 3: Open Profile popup and verify", this.openProfilePopup);
|
|
7585
|
-
await test$1.step("Step 4: Open My organization link and verify", async () => this.openAuthLinkAndVerify({
|
|
7586
|
-
linkSelector: PROFILE_SECTION_SELECTORS.profileOrganizationSettingsButton,
|
|
7587
|
-
redirectLink: ROUTES.authSettings,
|
|
7588
|
-
}));
|
|
7589
|
-
};
|
|
7590
7468
|
this.verifyProfileAndOrganizationLinksV2 = async () => {
|
|
7591
7469
|
await test$1.step("Step 1: Open Help center and verify", this.openHelpCenterV2);
|
|
7592
7470
|
await test$1.step("Step 2: Open My profile link and verify", async () => this.openAuthLinkAndVerify({
|
|
@@ -7599,19 +7477,6 @@ class HelpAndProfilePage {
|
|
|
7599
7477
|
redirectLink: ROUTES.authSettings,
|
|
7600
7478
|
}));
|
|
7601
7479
|
};
|
|
7602
|
-
// TODO Remove when all apps have migrated to the new navbar style
|
|
7603
|
-
this.verifyLogout = async () => {
|
|
7604
|
-
if (shouldSkipSetupAndTeardown())
|
|
7605
|
-
return;
|
|
7606
|
-
await test$1.step("Step 1: Open Profile popup and verify", this.openProfilePopup);
|
|
7607
|
-
await test$1.step("Step 2: Click logout and verify", async () => {
|
|
7608
|
-
await this.page
|
|
7609
|
-
.getByTestId(PROFILE_SECTION_SELECTORS.logoutButton)
|
|
7610
|
-
.click();
|
|
7611
|
-
await expect(this.page).toHaveURL(NEETO_AUTH_BASE_URL());
|
|
7612
|
-
await expect(this.page).toHaveURL(new RegExp(ROUTES.loginLink));
|
|
7613
|
-
});
|
|
7614
|
-
};
|
|
7615
7480
|
this.verifyLogoutV2 = async () => {
|
|
7616
7481
|
if (shouldSkipSetupAndTeardown())
|
|
7617
7482
|
return;
|
|
@@ -7620,8 +7485,12 @@ class HelpAndProfilePage {
|
|
|
7620
7485
|
await this.page
|
|
7621
7486
|
.getByTestId(PROFILE_SECTION_SELECTORS.logoutButton)
|
|
7622
7487
|
.click();
|
|
7623
|
-
await expect(this.page).toHaveURL(new RegExp(NEETO_AUTH_BASE_URL()), {
|
|
7624
|
-
|
|
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
|
+
});
|
|
7625
7494
|
});
|
|
7626
7495
|
};
|
|
7627
7496
|
this.page = page;
|
|
@@ -8279,6 +8148,40 @@ const memberUtils = {
|
|
|
8279
8148
|
deactivateMemberViaRequest,
|
|
8280
8149
|
};
|
|
8281
8150
|
|
|
8151
|
+
const assertColumnHeaderVisibility = async ({ page, columnName, shouldBeVisible, }) => {
|
|
8152
|
+
const visibilityAssertion = shouldBeVisible ? "toBeVisible" : "toBeHidden";
|
|
8153
|
+
await expect(page.getByRole("columnheader", { name: columnName }))[visibilityAssertion]();
|
|
8154
|
+
};
|
|
8155
|
+
const toggleColumnCheckboxAndVerifyVisibility = async ({ page, tableColumns, shouldBeChecked, }) => {
|
|
8156
|
+
await page.getByTestId(COMMON_SELECTORS.columnsDropdownButton).click();
|
|
8157
|
+
for (const columnName of tableColumns) {
|
|
8158
|
+
const checkbox = page
|
|
8159
|
+
.getByTestId(COMMON_SELECTORS.columnsDropdownContainer)
|
|
8160
|
+
.getByRole("listitem")
|
|
8161
|
+
.filter({ hasText: columnName })
|
|
8162
|
+
.getByRole("checkbox");
|
|
8163
|
+
const isCheckBoxChecked = await checkbox.isChecked();
|
|
8164
|
+
if (isCheckBoxChecked !== shouldBeChecked) {
|
|
8165
|
+
await checkbox.click();
|
|
8166
|
+
}
|
|
8167
|
+
shouldBeChecked
|
|
8168
|
+
? await expect(checkbox).toBeChecked()
|
|
8169
|
+
: await expect(checkbox).not.toBeChecked();
|
|
8170
|
+
}
|
|
8171
|
+
await page.getByTestId(COMMON_SELECTORS.columnsDropdownButton).click();
|
|
8172
|
+
for (const columnName of tableColumns) {
|
|
8173
|
+
await assertColumnHeaderVisibility({
|
|
8174
|
+
page,
|
|
8175
|
+
columnName,
|
|
8176
|
+
shouldBeVisible: shouldBeChecked,
|
|
8177
|
+
});
|
|
8178
|
+
}
|
|
8179
|
+
};
|
|
8180
|
+
const tableUtils = {
|
|
8181
|
+
assertColumnHeaderVisibility,
|
|
8182
|
+
toggleColumnCheckboxAndVerifyVisibility,
|
|
8183
|
+
};
|
|
8184
|
+
|
|
8282
8185
|
var main$2 = {exports: {}};
|
|
8283
8186
|
|
|
8284
8187
|
var name = "dotenv";
|
|
@@ -8815,5 +8718,5 @@ const definePlaywrightConfig = (overrides) => {
|
|
|
8815
8718
|
});
|
|
8816
8719
|
};
|
|
8817
8720
|
|
|
8818
|
-
export { API_ROUTES, BASE_URL, CHANGELOG_WIDGET_SELECTORS, CHAT_WIDGET_SELECTORS, COMMON_SELECTORS, CREDENTIALS, CustomCommands, ENVIRONMENT, GLOBAL_TRANSLATIONS_PATTERN, HELP_CENTER_SELECTORS, HelpAndProfilePage, IS_STAGING_ENV, IntegrationBase, KEYBOARD_SHORTCUTS_SELECTORS, LOGIN_SELECTORS, MEMBER_FORM_SELECTORS, MEMBER_SELECTORS, MERGE_TAGS_SELECTORS, MailosaurUtils, NEETO_AUTH_BASE_URL, NEETO_EDITOR_SELECTORS, NEETO_FILTERS_SELECTORS, OTP_EMAIL_PATTERN, OrganizationPage, PROFILE_SECTION_SELECTORS, PROJECT_TRANSLATIONS_PATH, ROLES_SELECTORS, ROUTES, SIGNUP_SELECTORS, SLACK_DEFAULT_CHANNEL, STORAGE_STATE, SlackPage, TAGS_SELECTORS, THIRD_PARTY_ROUTES, USER_AGENTS, WebhooksPage, clearCredentials, commands, definePlaywrightConfig, extractSubdomainFromError, generateStagingData, getGlobalUserState, hyphenize, i18nFixture, initializeCredentials, joinHyphenCase, joinString, login, loginWithoutSSO, memberUtils, readFileSyncIfExists, removeCredentialFile, shouldSkipSetupAndTeardown, skipTest, updateCredentials, writeDataToFile };
|
|
8721
|
+
export { API_ROUTES, BASE_URL, CHANGELOG_WIDGET_SELECTORS, CHAT_WIDGET_SELECTORS, COMMON_SELECTORS, CREDENTIALS, CustomCommands, ENVIRONMENT, GLOBAL_TRANSLATIONS_PATTERN, HELP_CENTER_SELECTORS, HelpAndProfilePage, IS_STAGING_ENV, IntegrationBase, KEYBOARD_SHORTCUTS_SELECTORS, LOGIN_SELECTORS, MEMBER_FORM_SELECTORS, MEMBER_SELECTORS, MERGE_TAGS_SELECTORS, MailosaurUtils, NEETO_AUTH_BASE_URL, NEETO_EDITOR_SELECTORS, NEETO_FILTERS_SELECTORS, OTP_EMAIL_PATTERN, OrganizationPage, PROFILE_SECTION_SELECTORS, PROJECT_TRANSLATIONS_PATH, ROLES_SELECTORS, ROUTES, SIGNUP_SELECTORS, SLACK_DEFAULT_CHANNEL, STORAGE_STATE, SlackPage, TAGS_SELECTORS, THIRD_PARTY_ROUTES, USER_AGENTS, WebhooksPage, clearCredentials, commands, definePlaywrightConfig, extractSubdomainFromError, generateStagingData, getGlobalUserState, hyphenize, i18nFixture, initializeCredentials, joinHyphenCase, joinString, login, loginWithoutSSO, memberUtils, readFileSyncIfExists, removeCredentialFile, shouldSkipSetupAndTeardown, skipTest, tableUtils, updateCredentials, writeDataToFile };
|
|
8819
8722
|
//# sourceMappingURL=index.js.map
|