@bigbinary/neeto-playwright-commons 1.23.4 → 1.23.6
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 +12 -19
- package/index.cjs.js.map +1 -1
- package/index.d.ts +20 -2
- package/index.js +12 -19
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -5398,9 +5398,7 @@ class CustomCommands {
|
|
|
5398
5398
|
const toastrLocator = ramda.isEmpty(message)
|
|
5399
5399
|
? customPageContext.locator(COMMON_SELECTORS.toastIcon)
|
|
5400
5400
|
: customPageContext.getByTestId(COMMON_SELECTORS.toastMessage(toastType));
|
|
5401
|
-
await test.expect(toastrLocator).toContainText(ramda.isEmpty(message) ? "👍" : message, {
|
|
5402
|
-
timeout,
|
|
5403
|
-
});
|
|
5401
|
+
await test.expect(toastrLocator).toContainText(ramda.isEmpty(message) ? "👍" : message, { timeout });
|
|
5404
5402
|
if (!closeAfterVerification && (await toastrCloseButton.isHidden()))
|
|
5405
5403
|
return;
|
|
5406
5404
|
const buttonHandle = await toastrCloseButton.elementHandle();
|
|
@@ -5452,9 +5450,7 @@ class CustomCommands {
|
|
|
5452
5450
|
};
|
|
5453
5451
|
const formattedUrl = ramda.isEmpty(params)
|
|
5454
5452
|
? url
|
|
5455
|
-
: `${url}?${qs.stringify(params, {
|
|
5456
|
-
arrayFormat: "brackets",
|
|
5457
|
-
})}`;
|
|
5453
|
+
: `${url}?${qs.stringify(params, { arrayFormat: "brackets" })}`;
|
|
5458
5454
|
return await this.request[method](formattedUrl, requestOptions);
|
|
5459
5455
|
};
|
|
5460
5456
|
this.selectOptionFromDropdown = async ({ label = "nui", value, page = this.page, options = {}, }) => {
|
|
@@ -5527,16 +5523,15 @@ class CustomCommands {
|
|
|
5527
5523
|
}).toPass({ timeout: 10000 });
|
|
5528
5524
|
this.verifyTooltip = async ({ triggerElement, content, customPageContext = this.page, }) => {
|
|
5529
5525
|
await this.hoverOnElement(triggerElement, customPageContext);
|
|
5530
|
-
await
|
|
5526
|
+
const resolvedContent = typeof content === "function" ? await content() : content;
|
|
5527
|
+
await test.expect(customPageContext.getByTestId(COMMON_SELECTORS.tooltip)).toContainText(resolvedContent);
|
|
5531
5528
|
await this.hideTooltip(triggerElement, customPageContext);
|
|
5532
5529
|
};
|
|
5533
5530
|
this.verifyHelpPopover = async ({ triggerElement = this.page.getByTestId(COMMON_SELECTORS.helpPopoverButton), title, content, helpURL, customPageContext = this.page, }) => {
|
|
5534
5531
|
const tooltipBox = customPageContext.getByTestId(COMMON_SELECTORS.tooltip);
|
|
5535
5532
|
await triggerElement.hover();
|
|
5536
5533
|
title &&
|
|
5537
|
-
(await test.expect(tooltipBox.getByRole("heading", {
|
|
5538
|
-
name: title,
|
|
5539
|
-
})).toBeVisible());
|
|
5534
|
+
(await test.expect(tooltipBox.getByRole("heading", { name: title })).toBeVisible());
|
|
5540
5535
|
content && (await test.expect(tooltipBox).toContainText(content));
|
|
5541
5536
|
helpURL &&
|
|
5542
5537
|
(await test.expect(tooltipBox.getByTestId(COMMON_SELECTORS.helpPopoverLinkButton)).toHaveAttribute("href", new RegExp(helpURL, "i")));
|
|
@@ -5609,10 +5604,7 @@ class CustomCommands {
|
|
|
5609
5604
|
this.verifyBreadcrumbs = async (titlesAndRoutes) => {
|
|
5610
5605
|
const breadcrumbHeader = this.page.getByTestId(COMMON_SELECTORS.breadcrumbHeader);
|
|
5611
5606
|
await test.expect(breadcrumbHeader).toHaveCount(titlesAndRoutes.length);
|
|
5612
|
-
await Promise.all(titlesAndRoutes.map(({ title, route }) => test.expect(breadcrumbHeader.getByRole("link", {
|
|
5613
|
-
name: title,
|
|
5614
|
-
exact: true,
|
|
5615
|
-
})).toHaveAttribute("href", route)));
|
|
5607
|
+
await Promise.all(titlesAndRoutes.map(({ title, route }) => test.expect(breadcrumbHeader.getByRole("link", { name: title, exact: true })).toHaveAttribute("href", route)));
|
|
5616
5608
|
};
|
|
5617
5609
|
this.uploadFileViaDispatchV2 = async ({ droppableZone = this.page.getByTestId(COMMON_SELECTORS.fileUploadBody), dispatchEvent = "drop", file, }) => {
|
|
5618
5610
|
const serializedFile = await serializeFileForBrowser(file);
|
|
@@ -118272,13 +118264,13 @@ class HelpAndProfilePage {
|
|
|
118272
118264
|
await test.test.step("2: Click logout and verify", async () => {
|
|
118273
118265
|
await this.page
|
|
118274
118266
|
.getByTestId(PROFILE_SECTION_SELECTORS.logoutButton)
|
|
118275
|
-
.click({ timeout:
|
|
118267
|
+
.click({ timeout: 60000 });
|
|
118276
118268
|
process.env.TEST_ENV === ENVIRONMENT.staging &&
|
|
118277
118269
|
(await test.expect(this.page).toHaveURL(new RegExp(NEETO_AUTH_BASE_URL()), {
|
|
118278
|
-
timeout:
|
|
118270
|
+
timeout: 60000,
|
|
118279
118271
|
}));
|
|
118280
118272
|
await test.expect(this.page).toHaveURL(new RegExp(ROUTES.loginLink), {
|
|
118281
|
-
timeout:
|
|
118273
|
+
timeout: 35000,
|
|
118282
118274
|
});
|
|
118283
118275
|
});
|
|
118284
118276
|
};
|
|
@@ -121089,7 +121081,7 @@ class Member {
|
|
|
121089
121081
|
}, { timeout: 60000 })
|
|
121090
121082
|
.toBe(true);
|
|
121091
121083
|
};
|
|
121092
|
-
this.editMemberViaRequest = async ({ email, firstName, lastName, newRole, subscriptionPlan, }) => {
|
|
121084
|
+
this.editMemberViaRequest = async ({ email, newEmail, firstName, lastName, newRole, subscriptionPlan, }) => {
|
|
121093
121085
|
const responseBody = (await this.memberApis
|
|
121094
121086
|
.fetch({ search: email })
|
|
121095
121087
|
.then(response => response === null || response === void 0 ? void 0 : response.json()));
|
|
@@ -121099,7 +121091,8 @@ class Member {
|
|
|
121099
121091
|
active: true,
|
|
121100
121092
|
firstName,
|
|
121101
121093
|
lastName,
|
|
121102
|
-
|
|
121094
|
+
organizationRole: newRole,
|
|
121095
|
+
email: newEmail,
|
|
121103
121096
|
subscriptionPlan,
|
|
121104
121097
|
})));
|
|
121105
121098
|
};
|