@bigbinary/neeto-playwright-commons 1.26.0 → 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 +38 -29
- package/index.cjs.js.map +1 -1
- package/index.d.ts +7 -3
- package/index.js +39 -29
- 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",
|
|
@@ -5229,7 +5232,9 @@ const SIGNUP_SELECTORS = {
|
|
|
5229
5232
|
subdomainNameTextField: "signup-organization-subdomain-text-field",
|
|
5230
5233
|
subdomainError: "subdomain-input-error",
|
|
5231
5234
|
tryFreeButton: "neeto-auth-signup-link",
|
|
5232
|
-
|
|
5235
|
+
/** @deprecated Use unregisteredEmailError instead. */
|
|
5236
|
+
unregisterdEmailError: "unregistered-email-error",
|
|
5237
|
+
unregisteredEmailError: "unregistered-email-error",
|
|
5233
5238
|
organization: (organizationName) => `${organizationName}-organization-item`,
|
|
5234
5239
|
};
|
|
5235
5240
|
|
|
@@ -113615,8 +113620,8 @@ class EmbedBase {
|
|
|
113615
113620
|
};
|
|
113616
113621
|
this.copyEmbedScript = async (embedType) => {
|
|
113617
113622
|
await this.selectEmbedType(embedType);
|
|
113618
|
-
await this.page.getByTestId(COMMON_SELECTORS.
|
|
113619
|
-
return await this.page
|
|
113623
|
+
await this.page.getByTestId(COMMON_SELECTORS.copyToClipboardButton).click();
|
|
113624
|
+
return await getClipboardContent(this.page);
|
|
113620
113625
|
};
|
|
113621
113626
|
this.selectEmbedType = async (embedType) => {
|
|
113622
113627
|
await this.page.locator(EMBED_SELECTORS.embedSelector(embedType)).click();
|
|
@@ -113787,7 +113792,6 @@ const TOASTR_MESSAGES = {
|
|
|
113787
113792
|
};
|
|
113788
113793
|
const ZAPIER_LIMIT_EXHAUSTED_MESSAGE = "Zapier free task limit is exhausted. Test will be aborted";
|
|
113789
113794
|
const EMOJI_LABEL = "thumbs up";
|
|
113790
|
-
const SELECT_COUNTRY = "Select country";
|
|
113791
113795
|
const GOOGLE_CALENDAR_DATE_FORMAT = "YYYY/M/D";
|
|
113792
113796
|
const MICROSOFT_LOGIN_TEXTS = {
|
|
113793
113797
|
passwordInput: "Enter the password",
|
|
@@ -114193,11 +114197,10 @@ class HelpAndProfilePage {
|
|
|
114193
114197
|
this.verifyProfileAndOrganizationLinks = async () => {
|
|
114194
114198
|
await test.test.step("1: Open Help center and verify", this.openHelpCenter);
|
|
114195
114199
|
await test.test.step("2: Open My profile link and verify", async () => {
|
|
114196
|
-
const profileSidebarHeader = this.page.getByTestId(COMMON_SELECTORS.paneHeader);
|
|
114197
114200
|
await this.page
|
|
114198
114201
|
.getByTestId(PROFILE_SECTION_SELECTORS.myProfileButton)
|
|
114199
114202
|
.click();
|
|
114200
|
-
await test.expect(
|
|
114203
|
+
await test.expect(this.page.getByTestId(COMMON_SELECTORS.paneHeader)).toContainText(this.t("neetoTeamMembers.profile.common.myProfile"));
|
|
114201
114204
|
await this.openAuthLinkAndVerify({
|
|
114202
114205
|
redirectLink: ROUTES.myProfile,
|
|
114203
114206
|
linkTestId: PROFILE_SECTION_SELECTORS.manageBillingAndSubscriptionsButton,
|
|
@@ -114206,9 +114209,16 @@ class HelpAndProfilePage {
|
|
|
114206
114209
|
await test.test.step("3: Open Help center and verify", this.openHelpCenter);
|
|
114207
114210
|
await test.test.step("4: Open My organization link and verify", async () => {
|
|
114208
114211
|
await this.page
|
|
114209
|
-
.getByTestId(PROFILE_SECTION_SELECTORS.
|
|
114212
|
+
.getByTestId(PROFILE_SECTION_SELECTORS.workspaceDisplay)
|
|
114210
114213
|
.click();
|
|
114211
|
-
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));
|
|
114212
114222
|
});
|
|
114213
114223
|
};
|
|
114214
114224
|
this.openAndVerifyStatus = async (appName) => {
|
|
@@ -114265,14 +114275,11 @@ class HelpAndProfilePage {
|
|
|
114265
114275
|
});
|
|
114266
114276
|
};
|
|
114267
114277
|
this.verifyThemeSwitcher = async (expectedScreenshot) => {
|
|
114268
|
-
|
|
114269
|
-
await test.test.step("1: Verify light theme",
|
|
114270
|
-
bodyElement
|
|
114271
|
-
|
|
114272
|
-
|
|
114273
|
-
test.expect(bodyElement).not.toHaveClass(THEMES_TEXTS.darkThemeClass),
|
|
114274
|
-
]);
|
|
114275
|
-
});
|
|
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
|
+
]));
|
|
114276
114283
|
await test.test.step("2: Open Help Center", () => this.openHelpCenter());
|
|
114277
114284
|
await test.test.step("3: Switch to dark theme", async () => {
|
|
114278
114285
|
await this.page.getByTestId(THEMES_SELECTORS.themeSwitcherButton).click();
|
|
@@ -114281,16 +114288,13 @@ class HelpAndProfilePage {
|
|
|
114281
114288
|
.click();
|
|
114282
114289
|
});
|
|
114283
114290
|
await test.test.step("4: Verify dark theme", async () => {
|
|
114284
|
-
fabContainer = this.page
|
|
114285
|
-
.getByTestId(COMMON_SELECTORS.dropdownContainer)
|
|
114286
|
-
.filter({ hasText: this.t("neetoMolecules.sidebar.myProfile") });
|
|
114287
114291
|
await Promise.all([
|
|
114288
114292
|
test.expect(bodyElement).toHaveClass(THEMES_TEXTS.darkThemeClass),
|
|
114289
114293
|
test.expect(bodyElement).not.toHaveClass(THEMES_TEXTS.lightThemeClass),
|
|
114290
114294
|
]);
|
|
114291
|
-
await test.expect(
|
|
114292
|
-
|
|
114293
|
-
});
|
|
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 });
|
|
114294
114298
|
});
|
|
114295
114299
|
};
|
|
114296
114300
|
this.updateProfile = async ({ firstName, lastName }) => {
|
|
@@ -117816,7 +117820,10 @@ class ImageUploader {
|
|
|
117816
117820
|
}
|
|
117817
117821
|
|
|
117818
117822
|
const openFilterPane = async (page) => {
|
|
117819
|
-
await page
|
|
117823
|
+
await page
|
|
117824
|
+
.getByTestId(NEETO_FILTERS_SELECTORS.filterButton)
|
|
117825
|
+
.or(page.getByTestId(COMMON_SELECTORS.filterButon))
|
|
117826
|
+
.click();
|
|
117820
117827
|
await test.expect(page.getByTestId(COMMON_SELECTORS.paneHeader)).toHaveText(playwrightI18nextFixture.getI18nInstance().t("neetoFilters.common.filters"));
|
|
117821
117828
|
};
|
|
117822
117829
|
const clearFiltersFromActionBlock = async (page) => {
|
|
@@ -118200,7 +118207,7 @@ class OrganizationPage {
|
|
|
118200
118207
|
};
|
|
118201
118208
|
this.fillEmailAndSubmit = async (email, loginTimeout) => {
|
|
118202
118209
|
await this.page.getByTestId(LOGIN_SELECTORS.emailTextField).fill(email);
|
|
118203
|
-
const unregisteredEmailError = this.page.getByTestId(SIGNUP_SELECTORS.
|
|
118210
|
+
const unregisteredEmailError = this.page.getByTestId(SIGNUP_SELECTORS.unregisteredEmailError);
|
|
118204
118211
|
await test.expect(async () => {
|
|
118205
118212
|
await this.page.getByTestId(LOGIN_SELECTORS.submitButton).click();
|
|
118206
118213
|
await this.neetoPlaywrightUtilities.waitForPageLoad();
|
|
@@ -118300,7 +118307,7 @@ class OrganizationPage {
|
|
|
118300
118307
|
});
|
|
118301
118308
|
};
|
|
118302
118309
|
this.changeCountry = async (country) => {
|
|
118303
|
-
const countrySelector = this.page.getByTestId(COMMON_SELECTORS.customSelectValueContainer(
|
|
118310
|
+
const countrySelector = this.page.getByTestId(COMMON_SELECTORS.customSelectValueContainer("country"));
|
|
118304
118311
|
await countrySelector.click();
|
|
118305
118312
|
await countrySelector.pressSequentially(country);
|
|
118306
118313
|
await this.page.getByTestId(COMMON_SELECTORS.selectOption(country)).click();
|
|
@@ -118454,7 +118461,9 @@ class CustomDomainPage {
|
|
|
118454
118461
|
const validateButton = this.page.getByTestId(CUSTOM_DOMAIN_SELECTORS.customDomainValidateButton);
|
|
118455
118462
|
await Promise.all([
|
|
118456
118463
|
test.expect(validateButton).toBeVisible(),
|
|
118457
|
-
test.expect(this.page
|
|
118464
|
+
test.expect(this.page
|
|
118465
|
+
.getByTestId(COMMON_SELECTORS.paneBody)
|
|
118466
|
+
.getByRole("cell", { name: domain.split(".")[0] })).toBeVisible(),
|
|
118458
118467
|
]);
|
|
118459
118468
|
await this.neetoPlaywrightUtilities.waitForPageLoad();
|
|
118460
118469
|
let isCertificateLimitExceeded = false;
|
|
@@ -124161,6 +124170,7 @@ var _a;
|
|
|
124161
124170
|
process.env.TEST_ENV = (_a = process.env.TEST_ENV) !== null && _a !== void 0 ? _a : ENVIRONMENT.development;
|
|
124162
124171
|
const env = dotenv.config({
|
|
124163
124172
|
path: `./e2e/config/.env.${process.env.TEST_ENV}`,
|
|
124173
|
+
quiet: true,
|
|
124164
124174
|
});
|
|
124165
124175
|
dotenvExpand.expand(env);
|
|
124166
124176
|
if (require$$0__namespace.existsSync("./e2e/config/.env.local")) {
|
|
@@ -124388,7 +124398,6 @@ exports.ROLES_SELECTORS = ROLES_SELECTORS;
|
|
|
124388
124398
|
exports.ROUTES = ROUTES;
|
|
124389
124399
|
exports.RoleApis = RoleApis;
|
|
124390
124400
|
exports.RolesPage = RolesPage;
|
|
124391
|
-
exports.SELECT_COUNTRY = SELECT_COUNTRY;
|
|
124392
124401
|
exports.SIGNUP_SELECTORS = SIGNUP_SELECTORS;
|
|
124393
124402
|
exports.SINGULAR = SINGULAR;
|
|
124394
124403
|
exports.SLACK_DATA_QA_SELECTORS = SLACK_DATA_QA_SELECTORS;
|