@bigbinary/neeto-playwright-commons 1.8.13 → 1.8.15
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 +21 -66
- package/index.cjs.js.map +1 -1
- package/index.d.ts +1 -2
- package/index.js +21 -66
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -111,10 +111,8 @@ declare class HelpAndProfilePage {
|
|
|
111
111
|
profileSectionButton: Locator;
|
|
112
112
|
constructor({ page, neetoPlaywrightUtilities, chatApiBaseURL, kbDocsBaseURL, changelogBaseURL, }: HelpAndProfilePageInitializerProps);
|
|
113
113
|
private hoverOnBody;
|
|
114
|
-
openHelpCenter: () => Promise<void>;
|
|
115
114
|
openHelpCenterV2: () => Promise<void>;
|
|
116
115
|
private openLiveChatAndVerify;
|
|
117
|
-
openAndVerifyChatWidget: () => Promise<void>;
|
|
118
116
|
openAndVerifyChatWidgetV2: () => Promise<void>;
|
|
119
117
|
openAndVerifyHelpArticlesV2: () => Promise<void>;
|
|
120
118
|
private openChangelogPaneV2;
|
|
@@ -469,6 +467,7 @@ declare const ROLES_SELECTORS: {
|
|
|
469
467
|
permissionCheckbox: string;
|
|
470
468
|
editRoleButton: string;
|
|
471
469
|
deleteRoleButton: string;
|
|
470
|
+
permissionCard: string;
|
|
472
471
|
};
|
|
473
472
|
|
|
474
473
|
declare const SIGNUP_SELECTORS: {
|
package/index.js
CHANGED
|
@@ -7248,15 +7248,6 @@ const KEYBOARD_SHORTCUTS_SELECTORS = {
|
|
|
7248
7248
|
class HelpAndProfilePage {
|
|
7249
7249
|
constructor({ page, neetoPlaywrightUtilities, chatApiBaseURL, kbDocsBaseURL, changelogBaseURL, }) {
|
|
7250
7250
|
this.hoverOnBody = () => this.page.locator("body").hover();
|
|
7251
|
-
this.openHelpCenter = async () => {
|
|
7252
|
-
await expect(async () => {
|
|
7253
|
-
await this.hoverOnBody();
|
|
7254
|
-
const helpButton = this.page.getByTestId(CHAT_WIDGET_SELECTORS.helpButton);
|
|
7255
|
-
await helpButton.scrollIntoViewIfNeeded();
|
|
7256
|
-
await helpButton.hover();
|
|
7257
|
-
await expect(this.page.getByTestId(HELP_CENTER_SELECTORS.chatButton)).toBeVisible();
|
|
7258
|
-
}).toPass({ timeout: 15000 });
|
|
7259
|
-
};
|
|
7260
7251
|
this.openHelpCenterV2 = async () => {
|
|
7261
7252
|
await expect(async () => {
|
|
7262
7253
|
await this.hoverOnBody();
|
|
@@ -7267,74 +7258,36 @@ class HelpAndProfilePage {
|
|
|
7267
7258
|
}).toPass({ timeout: 15000 });
|
|
7268
7259
|
};
|
|
7269
7260
|
this.openLiveChatAndVerify = async () => {
|
|
7270
|
-
await
|
|
7271
|
-
|
|
7272
|
-
|
|
7273
|
-
|
|
7274
|
-
|
|
7275
|
-
|
|
7276
|
-
|
|
7277
|
-
times: 3,
|
|
7278
|
-
timeout: 20 * 1000, // Increased timeout accounting delays in page load
|
|
7279
|
-
});
|
|
7280
|
-
await this.page.reload();
|
|
7281
|
-
await chatInitializationApis;
|
|
7282
|
-
await test$1.step("Step 1: Open Help Center links", this.openHelpCenter);
|
|
7283
|
-
await test$1.step("Step 2: Open live chat and verify iframe", this.openLiveChatAndVerify);
|
|
7284
|
-
await test$1.step("Step 3: Close and reopen live chat frame", async () => {
|
|
7285
|
-
await this.page.getByTestId(CHAT_WIDGET_SELECTORS.closeChat).click();
|
|
7286
|
-
await expect(this.neetoChatWidget).toBeHidden();
|
|
7287
|
-
await this.openHelpCenter();
|
|
7288
|
-
await this.openLiveChatAndVerify();
|
|
7289
|
-
});
|
|
7290
|
-
await test$1.step("Step 4: Start new conversation", async () => {
|
|
7291
|
-
const newConversationButton = this.neetoChatFrame.getByRole("button", {
|
|
7292
|
-
name: CHAT_WIDGET_TEXTS.newConversation,
|
|
7293
|
-
});
|
|
7294
|
-
await expect(newConversationButton).toBeVisible(); // Adding additional toBeVisible to take advantage of the auto-retrying web-first assertion
|
|
7295
|
-
await newConversationButton.click();
|
|
7296
|
-
await expect(this.neetoChatSpinner).toBeHidden();
|
|
7297
|
-
});
|
|
7298
|
-
await test$1.step("Step 5: Fill and submit email", async () => {
|
|
7299
|
-
var _a, _b;
|
|
7300
|
-
await this.neetoChatFrame
|
|
7301
|
-
.getByTestId(CHAT_WIDGET_SELECTORS.preChatEmailInput)
|
|
7302
|
-
.fill((_b = (_a = readFileSyncIfExists()) === null || _a === void 0 ? void 0 : _a.user) === null || _b === void 0 ? void 0 : _b.email);
|
|
7303
|
-
await this.neetoChatFrame
|
|
7304
|
-
.getByTestId(CHAT_WIDGET_SELECTORS.preChatSubmitButton)
|
|
7305
|
-
.getByRole("button")
|
|
7306
|
-
.click();
|
|
7307
|
-
await expect(this.neetoChatSpinner).toBeHidden();
|
|
7308
|
-
});
|
|
7309
|
-
await test$1.step("Step 6: Verify conversation window", async () => {
|
|
7310
|
-
await expect(this.neetoChatFrame.getByTestId(CHAT_WIDGET_SELECTORS.chatBubble)).toHaveText(CHAT_WIDGET_TEXTS.welcomeChatBubble);
|
|
7311
|
-
});
|
|
7261
|
+
await expect(async () => {
|
|
7262
|
+
await this.openHelpCenterV2();
|
|
7263
|
+
await this.page.getByTestId(HELP_CENTER_SELECTORS.chatButton).click();
|
|
7264
|
+
await expect(this.neetoChatWidget).toBeVisible();
|
|
7265
|
+
await expect(this.neetoChatSpinner).toBeHidden({ timeout: 20 * 1000 });
|
|
7266
|
+
await expect(this.neetoChatWidget).toBeVisible();
|
|
7267
|
+
}).toPass({ timeout: 45000 });
|
|
7312
7268
|
};
|
|
7313
7269
|
this.openAndVerifyChatWidgetV2 = async () => {
|
|
7314
7270
|
const chatInitializationApis = this.neetoPlaywrightUtilities.interceptMultipleResponses({
|
|
7315
7271
|
baseUrl: this.chatApiBaseURL,
|
|
7316
7272
|
times: 3,
|
|
7317
|
-
timeout: 20 * 1000, // Increased timeout accounting delays in page load
|
|
7318
7273
|
});
|
|
7319
7274
|
await this.page.reload();
|
|
7320
7275
|
await chatInitializationApis;
|
|
7321
|
-
await test$1.step("Step 1: Open
|
|
7322
|
-
await test$1.step("Step 2:
|
|
7323
|
-
await test$1.step("Step 3: Close and reopen live chat frame", async () => {
|
|
7276
|
+
await test$1.step("Step 1: Open live chat and verify iframe", this.openLiveChatAndVerify);
|
|
7277
|
+
await test$1.step("Step 2: Close and reopen live chat frame", async () => {
|
|
7324
7278
|
await this.page.getByTestId(CHAT_WIDGET_SELECTORS.closeChat).click();
|
|
7325
|
-
await expect(this.neetoChatWidget).toBeHidden();
|
|
7326
|
-
await this.openHelpCenterV2();
|
|
7279
|
+
await expect(this.neetoChatWidget).toBeHidden({ timeout: 20000 });
|
|
7327
7280
|
await this.openLiveChatAndVerify();
|
|
7328
7281
|
});
|
|
7329
|
-
await test$1.step("Step
|
|
7282
|
+
await test$1.step("Step 3: Start new conversation", async () => {
|
|
7330
7283
|
const newConversationButton = this.neetoChatFrame.getByRole("button", {
|
|
7331
7284
|
name: CHAT_WIDGET_TEXTS.newConversation,
|
|
7332
7285
|
});
|
|
7333
|
-
await expect(newConversationButton).toBeVisible(); // Adding additional toBeVisible to take advantage of the auto-retrying web-first assertion
|
|
7286
|
+
await expect(newConversationButton).toBeVisible({ timeout: 20000 }); // Adding additional toBeVisible to take advantage of the auto-retrying web-first assertion
|
|
7334
7287
|
await newConversationButton.click();
|
|
7335
|
-
await expect(this.neetoChatSpinner).toBeHidden();
|
|
7288
|
+
await expect(this.neetoChatSpinner).toBeHidden({ timeout: 20000 });
|
|
7336
7289
|
});
|
|
7337
|
-
await test$1.step("Step
|
|
7290
|
+
await test$1.step("Step 4: Fill and submit email", async () => {
|
|
7338
7291
|
var _a, _b;
|
|
7339
7292
|
await this.neetoChatFrame
|
|
7340
7293
|
.getByTestId(CHAT_WIDGET_SELECTORS.preChatEmailInput)
|
|
@@ -7343,9 +7296,9 @@ class HelpAndProfilePage {
|
|
|
7343
7296
|
.getByTestId(CHAT_WIDGET_SELECTORS.preChatSubmitButton)
|
|
7344
7297
|
.getByRole("button")
|
|
7345
7298
|
.click();
|
|
7346
|
-
await expect(this.neetoChatSpinner).toBeHidden();
|
|
7299
|
+
await expect(this.neetoChatSpinner).toBeHidden({ timeout: 20000 });
|
|
7347
7300
|
});
|
|
7348
|
-
await test$1.step("Step
|
|
7301
|
+
await test$1.step("Step 5: Verify conversation window", async () => {
|
|
7349
7302
|
await expect(this.neetoChatFrame.getByTestId(CHAT_WIDGET_SELECTORS.chatBubble)).toHaveText(CHAT_WIDGET_TEXTS.welcomeChatBubble);
|
|
7350
7303
|
});
|
|
7351
7304
|
};
|
|
@@ -7485,9 +7438,10 @@ class HelpAndProfilePage {
|
|
|
7485
7438
|
await this.page
|
|
7486
7439
|
.getByTestId(PROFILE_SECTION_SELECTORS.logoutButton)
|
|
7487
7440
|
.click();
|
|
7488
|
-
|
|
7489
|
-
|
|
7490
|
-
|
|
7441
|
+
process.env.TEST_ENV === ENVIRONMENT.staging &&
|
|
7442
|
+
(await expect(this.page).toHaveURL(new RegExp(NEETO_AUTH_BASE_URL()), {
|
|
7443
|
+
timeout: 15000,
|
|
7444
|
+
}));
|
|
7491
7445
|
await expect(this.page).toHaveURL(new RegExp(ROUTES.loginLink), {
|
|
7492
7446
|
timeout: 15000,
|
|
7493
7447
|
});
|
|
@@ -8029,6 +7983,7 @@ const ROLES_SELECTORS = {
|
|
|
8029
7983
|
permissionCheckbox: "ntm-roles-permission-checkbox",
|
|
8030
7984
|
editRoleButton: "ntm-roles-table-edit-role-button",
|
|
8031
7985
|
deleteRoleButton: " ntm-roles-table-delete-role-button",
|
|
7986
|
+
permissionCard: "ntm-roles-permission-card",
|
|
8032
7987
|
};
|
|
8033
7988
|
|
|
8034
7989
|
const TAGS_SELECTORS = {
|