@bigbinary/neeto-playwright-commons 1.5.2 → 1.6.1
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 +291 -38
- package/index.cjs.js.map +1 -1
- package/index.d.ts +83 -13
- package/index.js +287 -40
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -170,25 +170,30 @@ const COMMON_SELECTORS = {
|
|
|
170
170
|
subheader: "subheader",
|
|
171
171
|
settingsLink: "Settings",
|
|
172
172
|
ticketFieldTextInput: (label) => `${hyphenize(label)}-text-input`,
|
|
173
|
+
appSwitcherButton: "app-switcher-button",
|
|
174
|
+
appSwitcherWrapper: "switcher-wrapper",
|
|
173
175
|
tableSpinner: ".ant-spin",
|
|
174
176
|
};
|
|
175
177
|
|
|
176
178
|
class CustomCommands {
|
|
177
179
|
constructor(page, request) {
|
|
178
|
-
this.interceptMultipleResponses = ({ responseUrl = "", times = 1, baseUrl,
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
response.
|
|
183
|
-
|
|
184
|
-
.url()
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
180
|
+
this.interceptMultipleResponses = ({ responseUrl = "", times = 1, baseUrl, customPageContext, timeout = 10000, } = {}) => {
|
|
181
|
+
const pageContext = customPageContext !== null && customPageContext !== void 0 ? customPageContext : this.page;
|
|
182
|
+
return Promise.all([...new Array(times)].map(() => pageContext.waitForResponse((response) => {
|
|
183
|
+
var _a, _b, _c;
|
|
184
|
+
if (response.request().resourceType() === "xhr" &&
|
|
185
|
+
response.status() === 200 &&
|
|
186
|
+
response.url().includes(responseUrl) &&
|
|
187
|
+
response
|
|
188
|
+
.url()
|
|
189
|
+
.startsWith((_a = baseUrl !== null && baseUrl !== void 0 ? baseUrl : process.env.BASE_URL) !== null && _a !== void 0 ? _a : "") &&
|
|
190
|
+
!this.responses.includes((_b = response.headers()) === null || _b === void 0 ? void 0 : _b["x-request-id"])) {
|
|
191
|
+
this.responses.push((_c = response.headers()) === null || _c === void 0 ? void 0 : _c["x-request-id"]);
|
|
192
|
+
return true;
|
|
193
|
+
}
|
|
194
|
+
return false;
|
|
195
|
+
}, { timeout })));
|
|
196
|
+
};
|
|
192
197
|
this.recursiveMethod = async (callback, condition, timeout, startTime) => {
|
|
193
198
|
if (Date.now() - timeout >= startTime) {
|
|
194
199
|
return false;
|
|
@@ -236,6 +241,7 @@ class CustomCommands {
|
|
|
236
241
|
};
|
|
237
242
|
const httpMethodsHandlers = {
|
|
238
243
|
get: () => this.request.get(url, requestOptions),
|
|
244
|
+
patch: () => this.request.patch(url, requestOptions),
|
|
239
245
|
post: () => this.request.post(url, requestOptions),
|
|
240
246
|
put: () => this.request.put(url, requestOptions),
|
|
241
247
|
delete: () => this.request.delete(url, requestOptions),
|
|
@@ -7161,10 +7167,14 @@ const i18nFixture = {
|
|
|
7161
7167
|
};
|
|
7162
7168
|
|
|
7163
7169
|
const BASE_URL = "/api/v1";
|
|
7170
|
+
const NEETO_AUTH_BASE_URL = (subdomain = "app") => `https://${subdomain}.neetoauth.net`;
|
|
7164
7171
|
const ROUTES = {
|
|
7165
|
-
|
|
7166
|
-
|
|
7172
|
+
neetoAuthSignup: `${NEETO_AUTH_BASE_URL()}/signups/new`,
|
|
7173
|
+
neetoAuth: NEETO_AUTH_BASE_URL(),
|
|
7174
|
+
loginLink: "/login",
|
|
7167
7175
|
profile: "/profile",
|
|
7176
|
+
myProfile: "/my/profile",
|
|
7177
|
+
authSettings: "/settings",
|
|
7168
7178
|
login: `${BASE_URL}/login`,
|
|
7169
7179
|
signup: `${BASE_URL}/signups`,
|
|
7170
7180
|
subdomainAvailability: `${BASE_URL}/subdomain_availability`,
|
|
@@ -7178,6 +7188,256 @@ const ROUTES = {
|
|
|
7178
7188
|
},
|
|
7179
7189
|
};
|
|
7180
7190
|
|
|
7191
|
+
const CHAT_WIDGET_TEXTS = {
|
|
7192
|
+
newConversation: "New Conversation",
|
|
7193
|
+
welcomeChatBubble: "Hi! I'm here to assist you with any questions you may have. What can I do for you?",
|
|
7194
|
+
};
|
|
7195
|
+
|
|
7196
|
+
const HELP_CENTER_SELECTORS = {
|
|
7197
|
+
helpButton: "help-button",
|
|
7198
|
+
documentationButton: "help-link-help-center-button",
|
|
7199
|
+
keyboardShortcutButton: "help-link-keyboard-shortcut-button",
|
|
7200
|
+
chatButton: "help-link-live-chat-button",
|
|
7201
|
+
whatsNewButton: "help-link-changelog-button",
|
|
7202
|
+
whatsNewWidgetInfo: "h1",
|
|
7203
|
+
whatsNewWidgetCloseButton: ".nc-widget-header__btn",
|
|
7204
|
+
keyboardShortcutPaneHeading: "keyboard-shortcuts-pane-title",
|
|
7205
|
+
keyboardShortcutPaneCrossIcon: "keyboard-shortcuts-pane-close-button",
|
|
7206
|
+
};
|
|
7207
|
+
|
|
7208
|
+
const PROFILE_SECTION_SELECTORS = {
|
|
7209
|
+
profileSectionButton: "profile-section",
|
|
7210
|
+
myProfileButton: "my-profile-button",
|
|
7211
|
+
profileOrganizationSettingsButton: "profile-organization-settings-button",
|
|
7212
|
+
logoutButton: "profile-logout-button",
|
|
7213
|
+
};
|
|
7214
|
+
|
|
7215
|
+
const CHAT_WIDGET_SELECTORS = {
|
|
7216
|
+
iframe: "#neetochat-iframe",
|
|
7217
|
+
spinner: ".neeto-chat-widget-spinner",
|
|
7218
|
+
helpButton: "help-button",
|
|
7219
|
+
preChatEmailInput: "neeto-chat-widget-input",
|
|
7220
|
+
preChatSubmitButton: "neeto-chat-widget-pre-chat-submit-btn",
|
|
7221
|
+
chatBubble: "neeto-chat-widget-chat-message-bubble",
|
|
7222
|
+
closeChat: "neeto-chat-widget-close-btn",
|
|
7223
|
+
};
|
|
7224
|
+
const CHANGELOG_WIDGET_SELECTORS = {
|
|
7225
|
+
changelogWrapper: ".nc-widget__wrapper",
|
|
7226
|
+
closeButton: "nc-widget-close-btn",
|
|
7227
|
+
publicUrlLink: "nc-widget-public-url",
|
|
7228
|
+
};
|
|
7229
|
+
const KEYBOARD_SHORTCUTS_SELECTORS = {
|
|
7230
|
+
keyboardShortcutsPane: "keyboard-shortcuts-pane",
|
|
7231
|
+
closePaneButton: "keyboard-shortcuts-pane-close-button",
|
|
7232
|
+
hotKeyItem: "hotkey-item",
|
|
7233
|
+
};
|
|
7234
|
+
|
|
7235
|
+
/* eslint-disable playwright/require-top-level-describe */
|
|
7236
|
+
class HelpAndProfilePage {
|
|
7237
|
+
constructor({ page, neetoPlaywrightUtilities, chatApiBaseURL, kbDocsBaseURL, changelogBaseURL, }) {
|
|
7238
|
+
this.openHelpCenter = async () => {
|
|
7239
|
+
await test.expect(async () => {
|
|
7240
|
+
const helpButton = this.page.getByTestId(CHAT_WIDGET_SELECTORS.helpButton);
|
|
7241
|
+
await helpButton.scrollIntoViewIfNeeded();
|
|
7242
|
+
await helpButton.hover();
|
|
7243
|
+
await test.expect(this.page.getByTestId(HELP_CENTER_SELECTORS.chatButton)).toBeVisible();
|
|
7244
|
+
}).toPass({ timeout: 15000 });
|
|
7245
|
+
};
|
|
7246
|
+
this.openLiveChatAndVerify = async () => {
|
|
7247
|
+
await this.page.getByTestId(HELP_CENTER_SELECTORS.chatButton).click();
|
|
7248
|
+
await test.expect(this.neetoChatWidget).toBeVisible();
|
|
7249
|
+
await test.expect(this.neetoChatSpinner).toBeHidden();
|
|
7250
|
+
};
|
|
7251
|
+
this.openAndVerifyChatWidget = async () => {
|
|
7252
|
+
await this.neetoPlaywrightUtilities.interceptMultipleResponses({
|
|
7253
|
+
baseUrl: this.chatApiBaseURL,
|
|
7254
|
+
times: 3,
|
|
7255
|
+
});
|
|
7256
|
+
await test.test.step("Step 1: Open Help Center links", this.openHelpCenter);
|
|
7257
|
+
await test.test.step("Step 2: Open live chat and verify iframe", this.openLiveChatAndVerify);
|
|
7258
|
+
await test.test.step("Step 3: Close and reopen live chat frame", async () => {
|
|
7259
|
+
await this.page.getByTestId(CHAT_WIDGET_SELECTORS.closeChat).click();
|
|
7260
|
+
await test.expect(this.neetoChatWidget).toBeHidden();
|
|
7261
|
+
await this.openHelpCenter();
|
|
7262
|
+
await this.openLiveChatAndVerify();
|
|
7263
|
+
});
|
|
7264
|
+
await test.test.step("Step 4: Start new conversation", async () => {
|
|
7265
|
+
const newConversationButton = this.neetoChatFrame.getByRole("button", {
|
|
7266
|
+
name: CHAT_WIDGET_TEXTS.newConversation,
|
|
7267
|
+
});
|
|
7268
|
+
await test.expect(newConversationButton).toBeVisible(); // Adding additional toBeVisible to take advantage of the auto-retrying web-first assertion
|
|
7269
|
+
await newConversationButton.click();
|
|
7270
|
+
await test.expect(this.neetoChatSpinner).toBeHidden();
|
|
7271
|
+
});
|
|
7272
|
+
await test.test.step("Step 5: Fill and submit email", async () => {
|
|
7273
|
+
var _a, _b;
|
|
7274
|
+
await this.neetoChatFrame
|
|
7275
|
+
.getByTestId(CHAT_WIDGET_SELECTORS.preChatEmailInput)
|
|
7276
|
+
.fill((_b = (_a = readFileSyncIfExists()) === null || _a === void 0 ? void 0 : _a.user) === null || _b === void 0 ? void 0 : _b.email);
|
|
7277
|
+
await this.neetoChatFrame
|
|
7278
|
+
.getByTestId(CHAT_WIDGET_SELECTORS.preChatSubmitButton)
|
|
7279
|
+
.getByRole("button")
|
|
7280
|
+
.click();
|
|
7281
|
+
await test.expect(this.neetoChatSpinner).toBeHidden();
|
|
7282
|
+
});
|
|
7283
|
+
await test.test.step("Step 6: Verify conversation window", async () => {
|
|
7284
|
+
await test.expect(this.neetoChatFrame.getByTestId(CHAT_WIDGET_SELECTORS.chatBubble)).toHaveText(CHAT_WIDGET_TEXTS.welcomeChatBubble);
|
|
7285
|
+
});
|
|
7286
|
+
};
|
|
7287
|
+
this.openAndVerifyHelpArticles = async () => {
|
|
7288
|
+
await test.test.step("Step 1: Open Help Center links", this.openHelpCenter);
|
|
7289
|
+
await test.test.step("Step 2: Open and verify help articles link", async () => {
|
|
7290
|
+
const helpArticlesPromise = this.page.waitForEvent("popup");
|
|
7291
|
+
await this.page
|
|
7292
|
+
.getByTestId(HELP_CENTER_SELECTORS.documentationButton)
|
|
7293
|
+
.click();
|
|
7294
|
+
const helpArticlesPage = await helpArticlesPromise;
|
|
7295
|
+
await helpArticlesPage.waitForLoadState();
|
|
7296
|
+
await test.expect(helpArticlesPage).toHaveURL(this.kbDocsBaseURL);
|
|
7297
|
+
await helpArticlesPage.close();
|
|
7298
|
+
});
|
|
7299
|
+
};
|
|
7300
|
+
this.openChangelogPane = async () => {
|
|
7301
|
+
await this.page.getByTestId(HELP_CENTER_SELECTORS.whatsNewButton).click();
|
|
7302
|
+
await test.expect(this.page.locator(CHANGELOG_WIDGET_SELECTORS.changelogWrapper)).toBeVisible();
|
|
7303
|
+
};
|
|
7304
|
+
this.openAndVerifyChangelog = async () => {
|
|
7305
|
+
await test.test.step("Step 1: Open Help Center links", this.openHelpCenter);
|
|
7306
|
+
await test.test.step("Step 2: Open and verify changelog pane", this.openChangelogPane);
|
|
7307
|
+
await test.test.step("Step 3: Close and reopen changelog pane", async () => {
|
|
7308
|
+
await this.page
|
|
7309
|
+
.getByTestId(CHANGELOG_WIDGET_SELECTORS.closeButton)
|
|
7310
|
+
.click();
|
|
7311
|
+
await test.expect(this.page.locator(CHANGELOG_WIDGET_SELECTORS.changelogWrapper)).toBeHidden();
|
|
7312
|
+
await this.openHelpCenter();
|
|
7313
|
+
await this.openChangelogPane();
|
|
7314
|
+
});
|
|
7315
|
+
await test.test.step("Step 4: Open and verify public URL", async () => {
|
|
7316
|
+
const changelogPagePromise = this.page.waitForEvent("popup");
|
|
7317
|
+
await this.page
|
|
7318
|
+
.getByTestId(CHANGELOG_WIDGET_SELECTORS.publicUrlLink)
|
|
7319
|
+
.click();
|
|
7320
|
+
const changelogPage = await changelogPagePromise;
|
|
7321
|
+
await this.neetoPlaywrightUtilities.interceptMultipleResponses({
|
|
7322
|
+
customPageContext: changelogPage,
|
|
7323
|
+
baseUrl: this.changelogBaseURL.split("/site")[0],
|
|
7324
|
+
times: 3,
|
|
7325
|
+
});
|
|
7326
|
+
await test.expect(changelogPage).toHaveURL(this.changelogBaseURL);
|
|
7327
|
+
await changelogPage.close();
|
|
7328
|
+
});
|
|
7329
|
+
};
|
|
7330
|
+
this.formatKeyboardShortcut = (shortcut, osPlatform = "windows") => {
|
|
7331
|
+
const formattedShortcut = shortcut
|
|
7332
|
+
.replaceAll(" ", "then")
|
|
7333
|
+
.replaceAll("+", "");
|
|
7334
|
+
return osPlatform === "mac"
|
|
7335
|
+
? formattedShortcut.replace(/ctrl/g, "⌘")
|
|
7336
|
+
: formattedShortcut;
|
|
7337
|
+
};
|
|
7338
|
+
this.openAndVerifyKeyboardShortcutsPane = async (productShortcuts, osPlatform = "windows") => {
|
|
7339
|
+
const globalShortcuts = [
|
|
7340
|
+
{
|
|
7341
|
+
description: this.t("neetoMolecules.keyboardShortcuts.global.openKeyboardShortcutsPane"),
|
|
7342
|
+
sequence: "shift+/",
|
|
7343
|
+
},
|
|
7344
|
+
{
|
|
7345
|
+
description: this.t("neetoMolecules.keyboardShortcuts.global.close"),
|
|
7346
|
+
sequence: "esc",
|
|
7347
|
+
},
|
|
7348
|
+
{
|
|
7349
|
+
description: this.t("neetoMolecules.keyboardShortcuts.global.submitForm"),
|
|
7350
|
+
sequence: "ctrl+enter",
|
|
7351
|
+
},
|
|
7352
|
+
];
|
|
7353
|
+
const shortcuts = [...globalShortcuts, ...productShortcuts];
|
|
7354
|
+
await test.test.step("Step 1: Open Help Center", this.openHelpCenter);
|
|
7355
|
+
await test.test.step("Step 2: Open and close keyboard shortcuts from UI", async () => {
|
|
7356
|
+
await this.page
|
|
7357
|
+
.getByTestId(HELP_CENTER_SELECTORS.keyboardShortcutButton)
|
|
7358
|
+
.click();
|
|
7359
|
+
await test.expect(this.page.getByTestId(KEYBOARD_SHORTCUTS_SELECTORS.keyboardShortcutsPane)).not.toHaveCSS("width", "1px");
|
|
7360
|
+
await this.page
|
|
7361
|
+
.getByTestId(KEYBOARD_SHORTCUTS_SELECTORS.closePaneButton)
|
|
7362
|
+
.click();
|
|
7363
|
+
await test.expect(this.page.getByTestId(KEYBOARD_SHORTCUTS_SELECTORS.keyboardShortcutsPane)).toHaveCSS("width", "1px");
|
|
7364
|
+
});
|
|
7365
|
+
await test.test.step("Step 3: Open and close keyboard shortcuts through shortcut", async () => {
|
|
7366
|
+
await this.page.keyboard.press("Shift+/");
|
|
7367
|
+
await test.expect(this.page.getByTestId(KEYBOARD_SHORTCUTS_SELECTORS.keyboardShortcutsPane)).not.toHaveCSS("width", "1px");
|
|
7368
|
+
await this.page.keyboard.press("Escape");
|
|
7369
|
+
await test.expect(this.page.getByTestId(KEYBOARD_SHORTCUTS_SELECTORS.keyboardShortcutsPane)).toHaveCSS("width", "1px");
|
|
7370
|
+
});
|
|
7371
|
+
await test.test.step("Step 4: Verify all displayed keyboard shortcuts", async () => {
|
|
7372
|
+
await this.page.keyboard.press("Shift+/");
|
|
7373
|
+
await test.expect(this.page.getByTestId(KEYBOARD_SHORTCUTS_SELECTORS.keyboardShortcutsPane)).not.toHaveCSS("width", "1px");
|
|
7374
|
+
await test.expect(this.page
|
|
7375
|
+
.getByTestId(KEYBOARD_SHORTCUTS_SELECTORS.hotKeyItem)
|
|
7376
|
+
.locator("p")).toHaveText(shortcuts.map(shortcut => shortcut.description));
|
|
7377
|
+
const formattedSequences = shortcuts.map(shortcut => this.formatKeyboardShortcut(shortcut.sequence, osPlatform));
|
|
7378
|
+
await test.expect(this.page
|
|
7379
|
+
.getByTestId(KEYBOARD_SHORTCUTS_SELECTORS.hotKeyItem)
|
|
7380
|
+
.locator("div")).toHaveText(formattedSequences);
|
|
7381
|
+
});
|
|
7382
|
+
};
|
|
7383
|
+
this.openAppSwitcherAndVerify = async () => {
|
|
7384
|
+
const appSwitcher = this.page.getByTestId(COMMON_SELECTORS.appSwitcherButton);
|
|
7385
|
+
await test.test.step("Step 1: Verify hovering over app switcher opens the app switcher drawer", () => test.expect(async () => {
|
|
7386
|
+
await appSwitcher.scrollIntoViewIfNeeded();
|
|
7387
|
+
await appSwitcher.hover();
|
|
7388
|
+
await test.expect(this.page.getByTestId(COMMON_SELECTORS.appSwitcherWrapper)).toBeVisible();
|
|
7389
|
+
}).toPass({ timeout: 15000 }));
|
|
7390
|
+
};
|
|
7391
|
+
this.openProfilePopup = () => test.expect(async () => {
|
|
7392
|
+
await this.profileSectionButton.scrollIntoViewIfNeeded();
|
|
7393
|
+
await this.profileSectionButton.hover();
|
|
7394
|
+
await test.expect(this.profileSectionButton).toBeVisible();
|
|
7395
|
+
}).toPass({ timeout: 15000 });
|
|
7396
|
+
this.openAuthLinkAndVerify = async ({ linkSelector, redirectLink, }) => {
|
|
7397
|
+
var _a, _b;
|
|
7398
|
+
const profilePagePromise = this.page.waitForEvent("popup");
|
|
7399
|
+
await this.page.getByTestId(linkSelector).click();
|
|
7400
|
+
const profilePage = await profilePagePromise;
|
|
7401
|
+
await profilePage.waitForLoadState();
|
|
7402
|
+
await test.expect(profilePage).toHaveURL(new RegExp(NEETO_AUTH_BASE_URL((_b = (_a = readFileSyncIfExists()) === null || _a === void 0 ? void 0 : _a.user) === null || _b === void 0 ? void 0 : _b.subdomainName)));
|
|
7403
|
+
await test.expect(profilePage).toHaveURL(new RegExp(redirectLink));
|
|
7404
|
+
await profilePage.close();
|
|
7405
|
+
};
|
|
7406
|
+
this.verifyProfileAndOrganizationLinks = async () => {
|
|
7407
|
+
await test.test.step("Step 1: Open Profile popup and verify", this.openProfilePopup);
|
|
7408
|
+
await test.test.step("Step 2: Open My profile link and verify", async () => this.openAuthLinkAndVerify({
|
|
7409
|
+
linkSelector: PROFILE_SECTION_SELECTORS.myProfileButton,
|
|
7410
|
+
redirectLink: ROUTES.myProfile,
|
|
7411
|
+
}));
|
|
7412
|
+
await test.test.step("Step 3: Open Profile popup and verify", this.openProfilePopup);
|
|
7413
|
+
await test.test.step("Step 4: Open My organization link and verify", async () => this.openAuthLinkAndVerify({
|
|
7414
|
+
linkSelector: PROFILE_SECTION_SELECTORS.profileOrganizationSettingsButton,
|
|
7415
|
+
redirectLink: ROUTES.authSettings,
|
|
7416
|
+
}));
|
|
7417
|
+
};
|
|
7418
|
+
this.verifyLogout = async () => {
|
|
7419
|
+
await test.test.step("Step 1: Open Profile popup and verify", this.openProfilePopup);
|
|
7420
|
+
await test.test.step("Step 2: Click logout and verify", async () => {
|
|
7421
|
+
await this.page
|
|
7422
|
+
.getByTestId(PROFILE_SECTION_SELECTORS.logoutButton)
|
|
7423
|
+
.click();
|
|
7424
|
+
await test.expect(this.page).toHaveURL(NEETO_AUTH_BASE_URL());
|
|
7425
|
+
await test.expect(this.page).toHaveURL(new RegExp(ROUTES.loginLink));
|
|
7426
|
+
});
|
|
7427
|
+
};
|
|
7428
|
+
this.page = page;
|
|
7429
|
+
this.neetoPlaywrightUtilities = neetoPlaywrightUtilities;
|
|
7430
|
+
this.chatApiBaseURL = chatApiBaseURL;
|
|
7431
|
+
this.kbDocsBaseURL = kbDocsBaseURL;
|
|
7432
|
+
this.changelogBaseURL = changelogBaseURL;
|
|
7433
|
+
this.neetoChatWidget = this.page.locator(CHAT_WIDGET_SELECTORS.iframe);
|
|
7434
|
+
this.neetoChatFrame = this.neetoChatWidget.frameLocator(":scope"); // Converting locator to a framelocator
|
|
7435
|
+
this.neetoChatSpinner = this.neetoChatFrame.locator(CHAT_WIDGET_SELECTORS.spinner);
|
|
7436
|
+
this.profileSectionButton = this.page.getByTestId(PROFILE_SECTION_SELECTORS.profileSectionButton);
|
|
7437
|
+
this.t = playwrightI18nextFixture.getI18nInstance().t;
|
|
7438
|
+
}
|
|
7439
|
+
}
|
|
7440
|
+
|
|
7181
7441
|
const SIGNUP_SELECTORS = {
|
|
7182
7442
|
emailTextField: "signup-email-text-field",
|
|
7183
7443
|
firstNameTextField: "signup-profile-first-name-text-field",
|
|
@@ -7213,7 +7473,7 @@ class OrganizationPage {
|
|
|
7213
7473
|
await this.page.getByTestId(SIGNUP_SELECTORS.emailTextField).fill(email);
|
|
7214
7474
|
const signup = this.neetoPlaywrightUtilities.interceptMultipleResponses({
|
|
7215
7475
|
responseUrl: ROUTES.signup,
|
|
7216
|
-
baseUrl:
|
|
7476
|
+
baseUrl: NEETO_AUTH_BASE_URL(),
|
|
7217
7477
|
});
|
|
7218
7478
|
await this.page.getByTestId(SIGNUP_SELECTORS.submitButton).click();
|
|
7219
7479
|
await signup;
|
|
@@ -7248,7 +7508,7 @@ class OrganizationPage {
|
|
|
7248
7508
|
await this.page.getByTestId(COMMON_SELECTORS.checkbox).click();
|
|
7249
7509
|
const submitProfile = this.neetoPlaywrightUtilities.interceptMultipleResponses({
|
|
7250
7510
|
responseUrl: ROUTES.signup,
|
|
7251
|
-
baseUrl:
|
|
7511
|
+
baseUrl: NEETO_AUTH_BASE_URL(),
|
|
7252
7512
|
});
|
|
7253
7513
|
await this.page.getByTestId(SIGNUP_SELECTORS.profileSubmitButton).click();
|
|
7254
7514
|
await submitProfile;
|
|
@@ -7311,6 +7571,11 @@ class OrganizationPage {
|
|
|
7311
7571
|
}
|
|
7312
7572
|
}
|
|
7313
7573
|
|
|
7574
|
+
const USER_AGENTS = {
|
|
7575
|
+
windows: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36",
|
|
7576
|
+
mac: "Mozilla/5.0 (Macintosh; Intel Mac OS X 14_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
|
|
7577
|
+
};
|
|
7578
|
+
|
|
7314
7579
|
const NEETO_EDITOR_SELECTORS = {
|
|
7315
7580
|
boldOption: "neeto-editor-fixed-menu-bold-option",
|
|
7316
7581
|
italicOption: "neeto-editor-fixed-menu-italic-option",
|
|
@@ -7348,25 +7613,6 @@ const NEETO_FILTERS_SELECTORS = {
|
|
|
7348
7613
|
paneModalCrossIcon: "neeto-filters-close-button",
|
|
7349
7614
|
};
|
|
7350
7615
|
|
|
7351
|
-
const HELP_CENTER_SELECTORS = {
|
|
7352
|
-
helpButton: "help-button",
|
|
7353
|
-
documentationButton: "help-link-help-center-button",
|
|
7354
|
-
keyboardShortcutButton: "help-link-keyboard-shortcut-button",
|
|
7355
|
-
chatButton: "help-link-live-chat-button",
|
|
7356
|
-
whatsNewButton: "help-link-changelog-button",
|
|
7357
|
-
whatsNewWidgetInfo: "h1",
|
|
7358
|
-
whatsNewWidgetCloseButton: ".nc-widget-header__btn",
|
|
7359
|
-
keyboardShortcutPaneHeading: "keyboard-shortcuts-pane-title",
|
|
7360
|
-
keyboardShortcutPaneCrossIcon: "keyboard-shortcuts-pane-close-button",
|
|
7361
|
-
};
|
|
7362
|
-
const CHAT_WIDGET_SELECTORS = {
|
|
7363
|
-
chatWidgetHomeCard: "neeto-chat-widget-cta-title",
|
|
7364
|
-
widgetSubmitButton: "neeto-chat-widget-pre-chat-submit-btn",
|
|
7365
|
-
chatBubbleMessage: "neeto-chat-widget-chat-message-bubble",
|
|
7366
|
-
chatCloseButton: ".neeto-chat-widget-icon--close",
|
|
7367
|
-
widgetIframe: "#neetochat-iframe",
|
|
7368
|
-
};
|
|
7369
|
-
|
|
7370
7616
|
const LOGIN_SELECTORS = {
|
|
7371
7617
|
appleAuthenticationButton: "apple-authentication-button",
|
|
7372
7618
|
emailTextField: "login-email-text-field",
|
|
@@ -7969,8 +8215,9 @@ main.expand = expand;
|
|
|
7969
8215
|
|
|
7970
8216
|
// @ts-check
|
|
7971
8217
|
var _a, _b;
|
|
8218
|
+
process.env.TEST_ENV = (_a = process.env.TEST_ENV) !== null && _a !== void 0 ? _a : ENVIRONMENT.development;
|
|
7972
8219
|
const env = main$2.exports.config({
|
|
7973
|
-
path: `./e2e/config/.env.${
|
|
8220
|
+
path: `./e2e/config/.env.${process.env.TEST_ENV}`,
|
|
7974
8221
|
});
|
|
7975
8222
|
main.expand(env);
|
|
7976
8223
|
if (require$$0__namespace.existsSync("./e2e/config/.env.local")) {
|
|
@@ -8025,6 +8272,7 @@ const definePlaywrightConfig = (overrides) => {
|
|
|
8025
8272
|
};
|
|
8026
8273
|
|
|
8027
8274
|
exports.BASE_URL = BASE_URL;
|
|
8275
|
+
exports.CHANGELOG_WIDGET_SELECTORS = CHANGELOG_WIDGET_SELECTORS;
|
|
8028
8276
|
exports.CHAT_WIDGET_SELECTORS = CHAT_WIDGET_SELECTORS;
|
|
8029
8277
|
exports.COMMON_SELECTORS = COMMON_SELECTORS;
|
|
8030
8278
|
exports.CREDENTIALS = CREDENTIALS;
|
|
@@ -8032,22 +8280,27 @@ exports.CustomCommands = CustomCommands;
|
|
|
8032
8280
|
exports.ENVIRONMENT = ENVIRONMENT;
|
|
8033
8281
|
exports.GLOBAL_TRANSLATIONS_PATTERN = GLOBAL_TRANSLATIONS_PATTERN;
|
|
8034
8282
|
exports.HELP_CENTER_SELECTORS = HELP_CENTER_SELECTORS;
|
|
8283
|
+
exports.HelpAndProfilePage = HelpAndProfilePage;
|
|
8035
8284
|
exports.IS_STAGING_ENV = IS_STAGING_ENV;
|
|
8285
|
+
exports.KEYBOARD_SHORTCUTS_SELECTORS = KEYBOARD_SHORTCUTS_SELECTORS;
|
|
8036
8286
|
exports.LOGIN_SELECTORS = LOGIN_SELECTORS;
|
|
8037
8287
|
exports.MEMBER_FORM_SELECTORS = MEMBER_FORM_SELECTORS;
|
|
8038
8288
|
exports.MEMBER_SELECTORS = MEMBER_SELECTORS;
|
|
8039
8289
|
exports.MERGE_TAGS_SELECTORS = MERGE_TAGS_SELECTORS;
|
|
8040
8290
|
exports.MailosaurUtils = MailosaurUtils;
|
|
8291
|
+
exports.NEETO_AUTH_BASE_URL = NEETO_AUTH_BASE_URL;
|
|
8041
8292
|
exports.NEETO_EDITOR_SELECTORS = NEETO_EDITOR_SELECTORS;
|
|
8042
8293
|
exports.NEETO_FILTERS_SELECTORS = NEETO_FILTERS_SELECTORS;
|
|
8043
8294
|
exports.OTP_EMAIL_PATTERN = OTP_EMAIL_PATTERN;
|
|
8044
8295
|
exports.OrganizationPage = OrganizationPage;
|
|
8296
|
+
exports.PROFILE_SECTION_SELECTORS = PROFILE_SECTION_SELECTORS;
|
|
8045
8297
|
exports.PROJECT_TRANSLATIONS_PATH = PROJECT_TRANSLATIONS_PATH;
|
|
8046
8298
|
exports.ROLES_SELECTORS = ROLES_SELECTORS;
|
|
8047
8299
|
exports.ROUTES = ROUTES;
|
|
8048
8300
|
exports.SIGNUP_SELECTORS = SIGNUP_SELECTORS;
|
|
8049
8301
|
exports.STORAGE_STATE = STORAGE_STATE;
|
|
8050
8302
|
exports.TAGS_SELECTORS = TAGS_SELECTORS;
|
|
8303
|
+
exports.USER_AGENTS = USER_AGENTS;
|
|
8051
8304
|
exports.clearCredentials = clearCredentials;
|
|
8052
8305
|
exports.commands = commands;
|
|
8053
8306
|
exports.definePlaywrightConfig = definePlaywrightConfig;
|