@bigbinary/neeto-playwright-commons 1.9.21 → 1.9.23
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 +24 -0
- package/index.cjs.js.map +1 -1
- package/index.d.ts +35 -1
- package/index.js +24 -0
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -359,6 +359,7 @@ const COMMON_SELECTORS = {
|
|
|
359
359
|
actionSelectIndicator: "action-select-indicator",
|
|
360
360
|
takeActionDropdown: "take-action-dropdown-icon",
|
|
361
361
|
columnsSearchInput: "neeto-ui-columns-search",
|
|
362
|
+
errorToastIcon: "error-toast-icon",
|
|
362
363
|
};
|
|
363
364
|
|
|
364
365
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
@@ -3473,6 +3474,9 @@ class CustomCommands {
|
|
|
3473
3474
|
const startTime = Date.now();
|
|
3474
3475
|
await this.recursiveMethod(callback, condition, timeout, startTime);
|
|
3475
3476
|
};
|
|
3477
|
+
/**
|
|
3478
|
+
* @deprecated Use verifyToast instead.
|
|
3479
|
+
*/
|
|
3476
3480
|
this.verifySuccessToast = async ({ message = "", closeAfterVerification = true, } = {}) => {
|
|
3477
3481
|
if (!ramda.isEmpty(message)) {
|
|
3478
3482
|
await test$1.expect(this.page.getByTestId(COMMON_SELECTORS.toastMessage)).toContainText(message);
|
|
@@ -3484,6 +3488,22 @@ class CustomCommands {
|
|
|
3484
3488
|
(await this.page.getByTestId(COMMON_SELECTORS.toastCloseButton).click());
|
|
3485
3489
|
await test$1.expect(this.page.locator(COMMON_SELECTORS.toastIcon)).toBeHidden();
|
|
3486
3490
|
};
|
|
3491
|
+
this.verifyToast = async ({ message = "", toastType = "success", closeAfterVerification = true, } = {}) => {
|
|
3492
|
+
if (toastType === "error") {
|
|
3493
|
+
await test$1.expect(this.page.getByTestId(COMMON_SELECTORS.errorToastIcon)).toBeVisible({ timeout: 10000 });
|
|
3494
|
+
}
|
|
3495
|
+
const toastrCloseButton = this.page.getByTestId(COMMON_SELECTORS.toastCloseButton);
|
|
3496
|
+
if (!ramda.isEmpty(message)) {
|
|
3497
|
+
await test$1.expect(this.page.getByTestId(COMMON_SELECTORS.toastMessage)).toContainText(message, { timeout: 10000 });
|
|
3498
|
+
}
|
|
3499
|
+
else {
|
|
3500
|
+
await test$1.expect(this.page.locator(COMMON_SELECTORS.toastIcon)).toContainText("👍");
|
|
3501
|
+
}
|
|
3502
|
+
if (closeAfterVerification && (await toastrCloseButton.isVisible())) {
|
|
3503
|
+
await toastrCloseButton.click();
|
|
3504
|
+
await test$1.expect(toastrCloseButton).toBeHidden();
|
|
3505
|
+
}
|
|
3506
|
+
};
|
|
3487
3507
|
this.reloadAndWait = async (requestCount, customPageContext, interceptMultipleResponsesProps = {}) => {
|
|
3488
3508
|
const pageContext = customPageContext !== null && customPageContext !== void 0 ? customPageContext : this.page;
|
|
3489
3509
|
const reloadRequests = this.interceptMultipleResponses({
|
|
@@ -13910,6 +13930,7 @@ const SLACK_SELECTORS = {
|
|
|
13910
13930
|
};
|
|
13911
13931
|
const SLACK_DATA_QA_SELECTORS = {
|
|
13912
13932
|
sectionHeadingButton: "section_heading_button__channels",
|
|
13933
|
+
coachMarkCloseButton: "coachmark-close-button",
|
|
13913
13934
|
channelSectionSubmenuCreate: "channel_section_submenu_create",
|
|
13914
13935
|
channelSectionMenuCreateChannel: "channel_section_menu__create_channel",
|
|
13915
13936
|
skModalContent: "sk-modal-content",
|
|
@@ -14058,6 +14079,9 @@ class SlackPage extends IntegrationBase {
|
|
|
14058
14079
|
.click();
|
|
14059
14080
|
};
|
|
14060
14081
|
this.createNewSlackChannel = async ({ channelName, kind = "public", }) => {
|
|
14082
|
+
const closeCoachMarkButton = this.slackWebappPageDataQa(SLACK_DATA_QA_SELECTORS.coachMarkCloseButton);
|
|
14083
|
+
(await closeCoachMarkButton.isVisible()) &&
|
|
14084
|
+
(await closeCoachMarkButton.click());
|
|
14061
14085
|
await this.slackWebappPageDataQa(SLACK_DATA_QA_SELECTORS.sectionHeadingButton).click();
|
|
14062
14086
|
await this.slackWebappPageDataQa(SLACK_DATA_QA_SELECTORS.channelSectionSubmenuCreate).click();
|
|
14063
14087
|
await this.slackWebappPageDataQa(SLACK_DATA_QA_SELECTORS.channelSectionMenuCreateChannel).click();
|