@bigbinary/neeto-playwright-commons 1.26.1 → 1.26.2
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 +30 -22
- package/index.cjs.js.map +1 -1
- package/index.d.ts +3 -0
- package/index.js +30 -22
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -5592,6 +5592,8 @@ declare const COMMON_SELECTORS: {
|
|
|
5592
5592
|
heading: string;
|
|
5593
5593
|
paneBody: string;
|
|
5594
5594
|
paneHeader: string;
|
|
5595
|
+
filterButon: string;
|
|
5596
|
+
menuButton: string;
|
|
5595
5597
|
profileSidebar: string;
|
|
5596
5598
|
selectOption: (label: string) => string;
|
|
5597
5599
|
radioLabel: (embedLabel: string) => string;
|
|
@@ -6371,6 +6373,7 @@ declare const PROFILE_SECTION_SELECTORS: {
|
|
|
6371
6373
|
profileSectionButton: string;
|
|
6372
6374
|
profilePopup: string;
|
|
6373
6375
|
myProfileButton: string;
|
|
6376
|
+
workspaceDisplay: string;
|
|
6374
6377
|
profileOrganizationSettingsButton: string;
|
|
6375
6378
|
logoutButton: string;
|
|
6376
6379
|
neetoAuthLink: string;
|
package/index.js
CHANGED
|
@@ -4581,6 +4581,8 @@ const COMMON_SELECTORS = {
|
|
|
4581
4581
|
heading: "main-header",
|
|
4582
4582
|
paneBody: "pane-body",
|
|
4583
4583
|
paneHeader: "pane-header",
|
|
4584
|
+
filterButon: "filter-button",
|
|
4585
|
+
menuButton: "neeto-molecules-menu-button",
|
|
4584
4586
|
profileSidebar: "profile-section",
|
|
4585
4587
|
selectOption: (label) => `${hyphenate(label)}-select-option`,
|
|
4586
4588
|
radioLabel: (embedLabel) => `${hyphenate(embedLabel)}-radio-label`,
|
|
@@ -4626,7 +4628,7 @@ const COMMON_SELECTORS = {
|
|
|
4626
4628
|
ticketFieldTextInput: (label) => `${hyphenate(label)}-text-input`,
|
|
4627
4629
|
appSwitcherButton: "product-switcher-button",
|
|
4628
4630
|
appSwitcherWrapper: "switcher-wrapper",
|
|
4629
|
-
appLink: (appName) => `${appName}-app-link`,
|
|
4631
|
+
appLink: (appName) => `${appName.toLowerCase()}-app-link`,
|
|
4630
4632
|
tableSpinner: ".ant-spin",
|
|
4631
4633
|
pageLoader: "neeto-molecules-pageloader",
|
|
4632
4634
|
homeButton: "home-button",
|
|
@@ -5006,7 +5008,7 @@ const EMBED_SELECTORS = {
|
|
|
5006
5008
|
inlineHeightInput: "inline-height-input-field",
|
|
5007
5009
|
inlineWidthInput: "inline-width-input-field",
|
|
5008
5010
|
inlineElementIdInput: "inline-element-id-input-field",
|
|
5009
|
-
codeBlock: "code-block",
|
|
5011
|
+
codeBlock: "html-code-block",
|
|
5010
5012
|
previewTab: "preview-tab",
|
|
5011
5013
|
htmlTab: "html-tab",
|
|
5012
5014
|
buttonTextInput: "button-text-input-field",
|
|
@@ -5155,6 +5157,7 @@ const PROFILE_SECTION_SELECTORS = {
|
|
|
5155
5157
|
profileSectionButton: "profile-section",
|
|
5156
5158
|
profilePopup: "profile-popup",
|
|
5157
5159
|
myProfileButton: "my-profile-button",
|
|
5160
|
+
workspaceDisplay: "workspace-display",
|
|
5158
5161
|
profileOrganizationSettingsButton: "profile-organization-settings-button",
|
|
5159
5162
|
logoutButton: "profile-logout-button",
|
|
5160
5163
|
neetoAuthLink: "ntm-visit-auth-button",
|
|
@@ -114173,11 +114176,10 @@ class HelpAndProfilePage {
|
|
|
114173
114176
|
this.verifyProfileAndOrganizationLinks = async () => {
|
|
114174
114177
|
await test$1.step("1: Open Help center and verify", this.openHelpCenter);
|
|
114175
114178
|
await test$1.step("2: Open My profile link and verify", async () => {
|
|
114176
|
-
const profileSidebarHeader = this.page.getByTestId(COMMON_SELECTORS.paneHeader);
|
|
114177
114179
|
await this.page
|
|
114178
114180
|
.getByTestId(PROFILE_SECTION_SELECTORS.myProfileButton)
|
|
114179
114181
|
.click();
|
|
114180
|
-
await expect(
|
|
114182
|
+
await expect(this.page.getByTestId(COMMON_SELECTORS.paneHeader)).toContainText(this.t("neetoTeamMembers.profile.common.myProfile"));
|
|
114181
114183
|
await this.openAuthLinkAndVerify({
|
|
114182
114184
|
redirectLink: ROUTES.myProfile,
|
|
114183
114185
|
linkTestId: PROFILE_SECTION_SELECTORS.manageBillingAndSubscriptionsButton,
|
|
@@ -114186,9 +114188,16 @@ class HelpAndProfilePage {
|
|
|
114186
114188
|
await test$1.step("3: Open Help center and verify", this.openHelpCenter);
|
|
114187
114189
|
await test$1.step("4: Open My organization link and verify", async () => {
|
|
114188
114190
|
await this.page
|
|
114189
|
-
.getByTestId(PROFILE_SECTION_SELECTORS.
|
|
114191
|
+
.getByTestId(PROFILE_SECTION_SELECTORS.workspaceDisplay)
|
|
114190
114192
|
.click();
|
|
114191
|
-
await
|
|
114193
|
+
const [workspacePage] = await Promise.all([
|
|
114194
|
+
this.page.waitForEvent("popup"),
|
|
114195
|
+
this.page
|
|
114196
|
+
.getByTestId(PROFILE_SECTION_SELECTORS.profileOrganizationSettingsButton)
|
|
114197
|
+
.click(),
|
|
114198
|
+
]);
|
|
114199
|
+
await workspacePage.waitForLoadState();
|
|
114200
|
+
await expect(workspacePage).toHaveURL(new RegExp(ROUTES.auth.adminPanel));
|
|
114192
114201
|
});
|
|
114193
114202
|
};
|
|
114194
114203
|
this.openAndVerifyStatus = async (appName) => {
|
|
@@ -114245,14 +114254,11 @@ class HelpAndProfilePage {
|
|
|
114245
114254
|
});
|
|
114246
114255
|
};
|
|
114247
114256
|
this.verifyThemeSwitcher = async (expectedScreenshot) => {
|
|
114248
|
-
|
|
114249
|
-
await test$1.step("1: Verify light theme",
|
|
114250
|
-
bodyElement
|
|
114251
|
-
|
|
114252
|
-
|
|
114253
|
-
expect(bodyElement).not.toHaveClass(THEMES_TEXTS.darkThemeClass),
|
|
114254
|
-
]);
|
|
114255
|
-
});
|
|
114257
|
+
const bodyElement = this.page.locator("body");
|
|
114258
|
+
await test$1.step("1: Verify light theme", () => Promise.all([
|
|
114259
|
+
expect(bodyElement).toHaveClass(THEMES_TEXTS.lightThemeClass),
|
|
114260
|
+
expect(bodyElement).not.toHaveClass(THEMES_TEXTS.darkThemeClass),
|
|
114261
|
+
]));
|
|
114256
114262
|
await test$1.step("2: Open Help Center", () => this.openHelpCenter());
|
|
114257
114263
|
await test$1.step("3: Switch to dark theme", async () => {
|
|
114258
114264
|
await this.page.getByTestId(THEMES_SELECTORS.themeSwitcherButton).click();
|
|
@@ -114261,16 +114267,13 @@ class HelpAndProfilePage {
|
|
|
114261
114267
|
.click();
|
|
114262
114268
|
});
|
|
114263
114269
|
await test$1.step("4: Verify dark theme", async () => {
|
|
114264
|
-
fabContainer = this.page
|
|
114265
|
-
.getByTestId(COMMON_SELECTORS.dropdownContainer)
|
|
114266
|
-
.filter({ hasText: this.t("neetoMolecules.sidebar.myProfile") });
|
|
114267
114270
|
await Promise.all([
|
|
114268
114271
|
expect(bodyElement).toHaveClass(THEMES_TEXTS.darkThemeClass),
|
|
114269
114272
|
expect(bodyElement).not.toHaveClass(THEMES_TEXTS.lightThemeClass),
|
|
114270
114273
|
]);
|
|
114271
|
-
await expect(
|
|
114272
|
-
|
|
114273
|
-
});
|
|
114274
|
+
await expect(this.page.getByTestId(COMMON_SELECTORS.dropdownContainer).filter({
|
|
114275
|
+
has: this.page.getByTestId(PROFILE_SECTION_SELECTORS.myProfileButton),
|
|
114276
|
+
})).toHaveScreenshot(expectedScreenshot, { maxDiffPixelRatio: 0.1 });
|
|
114274
114277
|
});
|
|
114275
114278
|
};
|
|
114276
114279
|
this.updateProfile = async ({ firstName, lastName }) => {
|
|
@@ -117796,7 +117799,10 @@ class ImageUploader {
|
|
|
117796
117799
|
}
|
|
117797
117800
|
|
|
117798
117801
|
const openFilterPane = async (page) => {
|
|
117799
|
-
await page
|
|
117802
|
+
await page
|
|
117803
|
+
.getByTestId(NEETO_FILTERS_SELECTORS.filterButton)
|
|
117804
|
+
.or(page.getByTestId(COMMON_SELECTORS.filterButon))
|
|
117805
|
+
.click();
|
|
117800
117806
|
await expect(page.getByTestId(COMMON_SELECTORS.paneHeader)).toHaveText(getI18nInstance().t("neetoFilters.common.filters"));
|
|
117801
117807
|
};
|
|
117802
117808
|
const clearFiltersFromActionBlock = async (page) => {
|
|
@@ -118434,7 +118440,9 @@ class CustomDomainPage {
|
|
|
118434
118440
|
const validateButton = this.page.getByTestId(CUSTOM_DOMAIN_SELECTORS.customDomainValidateButton);
|
|
118435
118441
|
await Promise.all([
|
|
118436
118442
|
expect(validateButton).toBeVisible(),
|
|
118437
|
-
expect(this.page
|
|
118443
|
+
expect(this.page
|
|
118444
|
+
.getByTestId(COMMON_SELECTORS.paneBody)
|
|
118445
|
+
.getByRole("cell", { name: domain.split(".")[0] })).toBeVisible(),
|
|
118438
118446
|
]);
|
|
118439
118447
|
await this.neetoPlaywrightUtilities.waitForPageLoad();
|
|
118440
118448
|
let isCertificateLimitExceeded = false;
|