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