@bigbinary/neeto-playwright-commons 1.26.1 → 1.26.3
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 +32 -23
- package/index.cjs.js.map +1 -1
- package/index.d.ts +3 -0
- package/index.js +32 -23
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -4602,6 +4602,8 @@ const COMMON_SELECTORS = {
|
|
|
4602
4602
|
heading: "main-header",
|
|
4603
4603
|
paneBody: "pane-body",
|
|
4604
4604
|
paneHeader: "pane-header",
|
|
4605
|
+
filterButon: "filter-button",
|
|
4606
|
+
menuButton: "neeto-molecules-menu-button",
|
|
4605
4607
|
profileSidebar: "profile-section",
|
|
4606
4608
|
selectOption: (label) => `${neetoCist.hyphenate(label)}-select-option`,
|
|
4607
4609
|
radioLabel: (embedLabel) => `${neetoCist.hyphenate(embedLabel)}-radio-label`,
|
|
@@ -4647,7 +4649,7 @@ const COMMON_SELECTORS = {
|
|
|
4647
4649
|
ticketFieldTextInput: (label) => `${neetoCist.hyphenate(label)}-text-input`,
|
|
4648
4650
|
appSwitcherButton: "product-switcher-button",
|
|
4649
4651
|
appSwitcherWrapper: "switcher-wrapper",
|
|
4650
|
-
appLink: (appName) => `${appName}-app-link`,
|
|
4652
|
+
appLink: (appName) => `${appName.toLowerCase()}-app-link`,
|
|
4651
4653
|
tableSpinner: ".ant-spin",
|
|
4652
4654
|
pageLoader: "neeto-molecules-pageloader",
|
|
4653
4655
|
homeButton: "home-button",
|
|
@@ -5027,7 +5029,7 @@ const EMBED_SELECTORS = {
|
|
|
5027
5029
|
inlineHeightInput: "inline-height-input-field",
|
|
5028
5030
|
inlineWidthInput: "inline-width-input-field",
|
|
5029
5031
|
inlineElementIdInput: "inline-element-id-input-field",
|
|
5030
|
-
codeBlock: "code-block",
|
|
5032
|
+
codeBlock: "html-code-block",
|
|
5031
5033
|
previewTab: "preview-tab",
|
|
5032
5034
|
htmlTab: "html-tab",
|
|
5033
5035
|
buttonTextInput: "button-text-input-field",
|
|
@@ -5176,6 +5178,7 @@ const PROFILE_SECTION_SELECTORS = {
|
|
|
5176
5178
|
profileSectionButton: "profile-section",
|
|
5177
5179
|
profilePopup: "profile-popup",
|
|
5178
5180
|
myProfileButton: "my-profile-button",
|
|
5181
|
+
workspaceDisplay: "workspace-display",
|
|
5179
5182
|
profileOrganizationSettingsButton: "profile-organization-settings-button",
|
|
5180
5183
|
logoutButton: "profile-logout-button",
|
|
5181
5184
|
neetoAuthLink: "ntm-visit-auth-button",
|
|
@@ -114194,11 +114197,10 @@ class HelpAndProfilePage {
|
|
|
114194
114197
|
this.verifyProfileAndOrganizationLinks = async () => {
|
|
114195
114198
|
await test.test.step("1: Open Help center and verify", this.openHelpCenter);
|
|
114196
114199
|
await test.test.step("2: Open My profile link and verify", async () => {
|
|
114197
|
-
const profileSidebarHeader = this.page.getByTestId(COMMON_SELECTORS.paneHeader);
|
|
114198
114200
|
await this.page
|
|
114199
114201
|
.getByTestId(PROFILE_SECTION_SELECTORS.myProfileButton)
|
|
114200
114202
|
.click();
|
|
114201
|
-
await test.expect(
|
|
114203
|
+
await test.expect(this.page.getByTestId(COMMON_SELECTORS.paneHeader)).toContainText(this.t("neetoTeamMembers.profile.common.myProfile"));
|
|
114202
114204
|
await this.openAuthLinkAndVerify({
|
|
114203
114205
|
redirectLink: ROUTES.myProfile,
|
|
114204
114206
|
linkTestId: PROFILE_SECTION_SELECTORS.manageBillingAndSubscriptionsButton,
|
|
@@ -114207,9 +114209,16 @@ class HelpAndProfilePage {
|
|
|
114207
114209
|
await test.test.step("3: Open Help center and verify", this.openHelpCenter);
|
|
114208
114210
|
await test.test.step("4: Open My organization link and verify", async () => {
|
|
114209
114211
|
await this.page
|
|
114210
|
-
.getByTestId(PROFILE_SECTION_SELECTORS.
|
|
114212
|
+
.getByTestId(PROFILE_SECTION_SELECTORS.workspaceDisplay)
|
|
114211
114213
|
.click();
|
|
114212
|
-
await
|
|
114214
|
+
const [workspacePage] = await Promise.all([
|
|
114215
|
+
this.page.waitForEvent("popup"),
|
|
114216
|
+
this.page
|
|
114217
|
+
.getByTestId(PROFILE_SECTION_SELECTORS.profileOrganizationSettingsButton)
|
|
114218
|
+
.click(),
|
|
114219
|
+
]);
|
|
114220
|
+
await workspacePage.waitForLoadState();
|
|
114221
|
+
await test.expect(workspacePage).toHaveURL(new RegExp(ROUTES.auth.adminPanel));
|
|
114213
114222
|
});
|
|
114214
114223
|
};
|
|
114215
114224
|
this.openAndVerifyStatus = async (appName) => {
|
|
@@ -114266,14 +114275,11 @@ class HelpAndProfilePage {
|
|
|
114266
114275
|
});
|
|
114267
114276
|
};
|
|
114268
114277
|
this.verifyThemeSwitcher = async (expectedScreenshot) => {
|
|
114269
|
-
|
|
114270
|
-
await test.test.step("1: Verify light theme",
|
|
114271
|
-
bodyElement
|
|
114272
|
-
|
|
114273
|
-
|
|
114274
|
-
test.expect(bodyElement).not.toHaveClass(THEMES_TEXTS.darkThemeClass),
|
|
114275
|
-
]);
|
|
114276
|
-
});
|
|
114278
|
+
const bodyElement = this.page.locator("body");
|
|
114279
|
+
await test.test.step("1: Verify light theme", () => Promise.all([
|
|
114280
|
+
test.expect(bodyElement).toHaveClass(THEMES_TEXTS.lightThemeClass),
|
|
114281
|
+
test.expect(bodyElement).not.toHaveClass(THEMES_TEXTS.darkThemeClass),
|
|
114282
|
+
]));
|
|
114277
114283
|
await test.test.step("2: Open Help Center", () => this.openHelpCenter());
|
|
114278
114284
|
await test.test.step("3: Switch to dark theme", async () => {
|
|
114279
114285
|
await this.page.getByTestId(THEMES_SELECTORS.themeSwitcherButton).click();
|
|
@@ -114282,16 +114288,13 @@ class HelpAndProfilePage {
|
|
|
114282
114288
|
.click();
|
|
114283
114289
|
});
|
|
114284
114290
|
await test.test.step("4: Verify dark theme", async () => {
|
|
114285
|
-
fabContainer = this.page
|
|
114286
|
-
.getByTestId(COMMON_SELECTORS.dropdownContainer)
|
|
114287
|
-
.filter({ hasText: this.t("neetoMolecules.sidebar.myProfile") });
|
|
114288
114291
|
await Promise.all([
|
|
114289
114292
|
test.expect(bodyElement).toHaveClass(THEMES_TEXTS.darkThemeClass),
|
|
114290
114293
|
test.expect(bodyElement).not.toHaveClass(THEMES_TEXTS.lightThemeClass),
|
|
114291
114294
|
]);
|
|
114292
|
-
await test.expect(
|
|
114293
|
-
|
|
114294
|
-
});
|
|
114295
|
+
await test.expect(this.page.getByTestId(COMMON_SELECTORS.dropdownContainer).filter({
|
|
114296
|
+
has: this.page.getByTestId(PROFILE_SECTION_SELECTORS.myProfileButton),
|
|
114297
|
+
})).toHaveScreenshot(expectedScreenshot, { maxDiffPixelRatio: 0.1 });
|
|
114295
114298
|
});
|
|
114296
114299
|
};
|
|
114297
114300
|
this.updateProfile = async ({ firstName, lastName }) => {
|
|
@@ -117817,7 +117820,10 @@ class ImageUploader {
|
|
|
117817
117820
|
}
|
|
117818
117821
|
|
|
117819
117822
|
const openFilterPane = async (page) => {
|
|
117820
|
-
await page
|
|
117823
|
+
await page
|
|
117824
|
+
.getByTestId(NEETO_FILTERS_SELECTORS.filterButton)
|
|
117825
|
+
.or(page.getByTestId(COMMON_SELECTORS.filterButon))
|
|
117826
|
+
.click();
|
|
117821
117827
|
await test.expect(page.getByTestId(COMMON_SELECTORS.paneHeader)).toHaveText(playwrightI18nextFixture.getI18nInstance().t("neetoFilters.common.filters"));
|
|
117822
117828
|
};
|
|
117823
117829
|
const clearFiltersFromActionBlock = async (page) => {
|
|
@@ -117940,7 +117946,8 @@ class TeamMembers {
|
|
|
117940
117946
|
await test.expect(this.page.locator(COMMON_SELECTORS.tableSpinner)).toBeHidden();
|
|
117941
117947
|
};
|
|
117942
117948
|
this.filterMembers = async ({ email = { id: "", condition: "Is" }, roles = [], name = "", }) => {
|
|
117943
|
-
await this.page
|
|
117949
|
+
await filterUtils.clearFiltersFromActionBlock(this.page);
|
|
117950
|
+
await filterUtils.openFilterPane(this.page);
|
|
117944
117951
|
if (neetoCist.isPresent(email.id)) {
|
|
117945
117952
|
await this.page
|
|
117946
117953
|
.getByTestId(NEETO_FILTERS_SELECTORS.emailSelectContainer)
|
|
@@ -118455,7 +118462,9 @@ class CustomDomainPage {
|
|
|
118455
118462
|
const validateButton = this.page.getByTestId(CUSTOM_DOMAIN_SELECTORS.customDomainValidateButton);
|
|
118456
118463
|
await Promise.all([
|
|
118457
118464
|
test.expect(validateButton).toBeVisible(),
|
|
118458
|
-
test.expect(this.page
|
|
118465
|
+
test.expect(this.page
|
|
118466
|
+
.getByTestId(COMMON_SELECTORS.paneBody)
|
|
118467
|
+
.getByRole("cell", { name: domain.split(".")[0] })).toBeVisible(),
|
|
118459
118468
|
]);
|
|
118460
118469
|
await this.neetoPlaywrightUtilities.waitForPageLoad();
|
|
118461
118470
|
let isCertificateLimitExceeded = false;
|