@bigbinary/neeto-playwright-commons 1.23.5 → 1.23.7
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 +30 -36
- package/index.cjs.js.map +1 -1
- package/index.d.ts +19 -2
- package/index.js +30 -36
- 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);
|
|
@@ -117895,6 +117887,7 @@ const SLACK_WEB_TEXTS = {
|
|
|
117895
117887
|
deleteChannel: "Delete channel",
|
|
117896
117888
|
};
|
|
117897
117889
|
const ZAPIER_WEB_TEXTS = {
|
|
117890
|
+
create: "Create",
|
|
117898
117891
|
account: "Account",
|
|
117899
117892
|
email: "Email",
|
|
117900
117893
|
continue: "Continue",
|
|
@@ -120912,9 +120905,7 @@ class ZapierPage extends IntegrationBase {
|
|
|
120912
120905
|
await apiKeyBox.click();
|
|
120913
120906
|
await apiKeyBox.pressSequentially(zapierApiKey, { delay: 100 });
|
|
120914
120907
|
await signInPage
|
|
120915
|
-
.getByRole("button", {
|
|
120916
|
-
name: RegExp(ZAPIER_WEB_TEXTS.yesContinueTo),
|
|
120917
|
-
})
|
|
120908
|
+
.getByRole("button", { name: RegExp(ZAPIER_WEB_TEXTS.yesContinueTo) })
|
|
120918
120909
|
.click();
|
|
120919
120910
|
await this.continueButton.click({ timeout: 30000 });
|
|
120920
120911
|
await test.expect(this.zapierWebPage
|
|
@@ -120924,17 +120915,20 @@ class ZapierPage extends IntegrationBase {
|
|
|
120924
120915
|
const testTriggerButton = this.zapierWebPage.getByRole("button", {
|
|
120925
120916
|
name: ZAPIER_WEB_TEXTS.testTrigger,
|
|
120926
120917
|
});
|
|
120927
|
-
await test.expect(this.zapierWebPage.locator(ZAPIER_SELECTORS.spinner)).
|
|
120928
|
-
timeout: 25000,
|
|
120929
|
-
});
|
|
120930
|
-
await testTriggerButton.click();
|
|
120931
|
-
await test.expect(this.zapierWebPage.getByText(ZAPIER_WEB_TEXTS.testCurrentlyInQueue)).toBeHidden({ timeout: 20000 });
|
|
120932
|
-
await test.expect(this.zapierWebPage.getByLabel(ZAPIER_WEB_TEXTS.statusLabel, {
|
|
120933
|
-
exact: true,
|
|
120934
|
-
})).toBeVisible({ timeout: 10000 });
|
|
120918
|
+
await test.expect(this.zapierWebPage.locator(ZAPIER_SELECTORS.spinner)).toHaveCount(0, { timeout: 30000 });
|
|
120935
120919
|
const continueWithRecordBtn = this.zapierWebPage.getByRole("button", {
|
|
120936
120920
|
name: ZAPIER_WEB_TEXTS.continueWithSelectedRecord,
|
|
120937
120921
|
});
|
|
120922
|
+
await test.expect(testTriggerButton.or(continueWithRecordBtn)).toBeVisible({
|
|
120923
|
+
timeout: 30000,
|
|
120924
|
+
});
|
|
120925
|
+
if (await testTriggerButton.isVisible()) {
|
|
120926
|
+
await testTriggerButton.click();
|
|
120927
|
+
await test.expect(this.zapierWebPage.getByText(ZAPIER_WEB_TEXTS.testCurrentlyInQueue)).toBeHidden({ timeout: 20000 });
|
|
120928
|
+
await test.expect(this.zapierWebPage.getByLabel(ZAPIER_WEB_TEXTS.statusLabel, {
|
|
120929
|
+
exact: true,
|
|
120930
|
+
})).toBeVisible({ timeout: 10000 });
|
|
120931
|
+
}
|
|
120938
120932
|
await continueWithRecordBtn.click({ timeout: 30000 });
|
|
120939
120933
|
await test.expect(continueWithRecordBtn).toBeHidden({ timeout: 15000 });
|
|
120940
120934
|
await this.continueButton.click({ timeout: 20000 });
|
|
@@ -120978,18 +120972,20 @@ class ZapierPage extends IntegrationBase {
|
|
|
120978
120972
|
.click();
|
|
120979
120973
|
}).toPass({ timeout: 40000 });
|
|
120980
120974
|
}
|
|
120981
|
-
await test.expect(connectionLocator).toHaveCount(0, {
|
|
120982
|
-
timeout: 10000,
|
|
120983
|
-
});
|
|
120975
|
+
await test.expect(connectionLocator).toHaveCount(0, { timeout: 10000 });
|
|
120984
120976
|
};
|
|
120985
120977
|
this.verifyZapIsTriggered = ({ productName, submittedEmail, zapTriggeredAfter, timeout = 2 * 60000, }) => this.mailerUtils.findMessage({ to: ZAPIER_TEST_EMAIL(productName), body: submittedEmail }, { timeout, receivedAfter: zapTriggeredAfter });
|
|
120986
120978
|
this.skipIfTaskLimitIsExhausted = async () => {
|
|
120987
|
-
var _a;
|
|
120988
120979
|
// Zapier provides 100 free task limit for free account; skip test if it's exhausted
|
|
120989
|
-
|
|
120990
|
-
|
|
120991
|
-
});
|
|
120992
|
-
await test.expect(
|
|
120980
|
+
var _a;
|
|
120981
|
+
const universalSidebar = this.zapierWebPage.locator(ZAPIER_SELECTORS.universalSidebar);
|
|
120982
|
+
await test.expect(universalSidebar).toBeVisible({ timeout: 30000 });
|
|
120983
|
+
await test.expect(async () => {
|
|
120984
|
+
await universalSidebar
|
|
120985
|
+
.getByRole("button", { name: ZAPIER_WEB_TEXTS.create })
|
|
120986
|
+
.hover();
|
|
120987
|
+
await test.expect(this.zapierWebPage.locator(ZAPIER_SELECTORS.sidebarFooter)).toBeVisible();
|
|
120988
|
+
}).toPass({ timeout: 30000 });
|
|
120993
120989
|
if (await this.zapierWebPage
|
|
120994
120990
|
.getByText(RegExp(ZAPIER_WEB_TEXTS.trialEndsRegExp))
|
|
120995
120991
|
.isVisible()) {
|
|
@@ -121032,9 +121028,7 @@ class ZapierPage extends IntegrationBase {
|
|
|
121032
121028
|
await this.page
|
|
121033
121029
|
.getByTestId(COMMON_SELECTORS.alertModalSubmitButton)
|
|
121034
121030
|
.click();
|
|
121035
|
-
await this.neetoPlaywrightUtilities.verifyToast({
|
|
121036
|
-
message: toastMessage,
|
|
121037
|
-
});
|
|
121031
|
+
await this.neetoPlaywrightUtilities.verifyToast({ message: toastMessage });
|
|
121038
121032
|
await this.verifyIntegrationStatus("disconnected");
|
|
121039
121033
|
};
|
|
121040
121034
|
this.generateAPIKey = async (apiKeyLabel) => {
|