@bigbinary/neeto-playwright-commons 1.9.24 → 1.9.26
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 +22 -22
- package/index.cjs.js.map +1 -1
- package/index.d.ts +151 -13
- package/index.js +22 -22
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -13931,6 +13931,8 @@ const SLACK_SELECTORS = {
|
|
|
13931
13931
|
const SLACK_DATA_QA_SELECTORS = {
|
|
13932
13932
|
sectionHeadingButton: "section_heading_button__channels",
|
|
13933
13933
|
coachMarkCloseButton: "coachmark-close-button",
|
|
13934
|
+
messagePaneBannerCloseIcon: "message_pane_banner_close_icon",
|
|
13935
|
+
permissionBannerCloseIcon: "banner_close_btn",
|
|
13934
13936
|
channelSectionSubmenuCreate: "channel_section_submenu_create",
|
|
13935
13937
|
channelSectionMenuCreateChannel: "channel_section_menu__create_channel",
|
|
13936
13938
|
skModalContent: "sk-modal-content",
|
|
@@ -13953,10 +13955,11 @@ class SlackPage extends IntegrationBase {
|
|
|
13953
13955
|
integration: "slack",
|
|
13954
13956
|
integrationRouteIndex,
|
|
13955
13957
|
});
|
|
13956
|
-
this.
|
|
13958
|
+
this.setupCloseHandlers = async (slackWebappPage = this.page) => {
|
|
13957
13959
|
const slackWebappPageDataQa = getByDataQA(slackWebappPage);
|
|
13958
|
-
|
|
13959
|
-
await
|
|
13960
|
+
await slackWebappPage.addLocatorHandler(slackWebappPageDataQa(SLACK_DATA_QA_SELECTORS.coachMarkCloseButton), () => slackWebappPageDataQa(SLACK_DATA_QA_SELECTORS.coachMarkCloseButton).click());
|
|
13961
|
+
await slackWebappPage.addLocatorHandler(slackWebappPageDataQa(SLACK_DATA_QA_SELECTORS.messagePaneBannerCloseIcon), () => slackWebappPageDataQa(SLACK_DATA_QA_SELECTORS.messagePaneBannerCloseIcon).click());
|
|
13962
|
+
await slackWebappPage.addLocatorHandler(slackWebappPageDataQa(SLACK_DATA_QA_SELECTORS.permissionBannerCloseIcon), () => slackWebappPageDataQa(SLACK_DATA_QA_SELECTORS.permissionBannerCloseIcon).click());
|
|
13960
13963
|
};
|
|
13961
13964
|
this.connectAndVerifyIntegration = async (redirectUrl, customSteps, channelToConfigure = SLACK_DEFAULT_CHANNEL) => {
|
|
13962
13965
|
await this.connect();
|
|
@@ -14062,7 +14065,7 @@ class SlackPage extends IntegrationBase {
|
|
|
14062
14065
|
await slackWebappPage
|
|
14063
14066
|
.locator(SLACK_SELECTORS.redirectOpenInBrowser)
|
|
14064
14067
|
.click();
|
|
14065
|
-
await this.
|
|
14068
|
+
await this.setupCloseHandlers(slackWebappPage);
|
|
14066
14069
|
}
|
|
14067
14070
|
else {
|
|
14068
14071
|
throw new Error("ENV variable SLACK_LOGIN_EMAIL or SLACK_LOGIN_PASSWORD or SLACK_WORKSPACE is not defined.");
|
|
@@ -14085,9 +14088,6 @@ class SlackPage extends IntegrationBase {
|
|
|
14085
14088
|
.click();
|
|
14086
14089
|
};
|
|
14087
14090
|
this.createNewSlackChannel = async ({ channelName, kind = "public", }) => {
|
|
14088
|
-
const closeCoachMarkButton = this.slackWebappPageDataQa(SLACK_DATA_QA_SELECTORS.coachMarkCloseButton);
|
|
14089
|
-
(await closeCoachMarkButton.isVisible()) &&
|
|
14090
|
-
(await closeCoachMarkButton.click());
|
|
14091
14091
|
await this.slackWebappPageDataQa(SLACK_DATA_QA_SELECTORS.sectionHeadingButton).click();
|
|
14092
14092
|
await this.slackWebappPageDataQa(SLACK_DATA_QA_SELECTORS.channelSectionSubmenuCreate).click();
|
|
14093
14093
|
await this.slackWebappPageDataQa(SLACK_DATA_QA_SELECTORS.channelSectionMenuCreateChannel).click();
|
|
@@ -14621,7 +14621,7 @@ class EditorPage {
|
|
|
14621
14621
|
await this.neetoPlaywrightUtilities.interceptMultipleResponses({
|
|
14622
14622
|
responseUrl: ROUTES.attachment,
|
|
14623
14623
|
});
|
|
14624
|
-
await this.neetoPlaywrightUtilities.
|
|
14624
|
+
await this.neetoPlaywrightUtilities.verifyToast();
|
|
14625
14625
|
await test$1.expect(this.attachmentPreview).toBeVisible();
|
|
14626
14626
|
await this.attachmentPreview
|
|
14627
14627
|
.getByTestId(COMMON_SELECTORS.dropdownIcon)
|
|
@@ -14633,7 +14633,7 @@ class EditorPage {
|
|
|
14633
14633
|
.getByTestId(COMMON_SELECTORS.alertModalSubmitButton)
|
|
14634
14634
|
.click();
|
|
14635
14635
|
}
|
|
14636
|
-
await this.neetoPlaywrightUtilities.
|
|
14636
|
+
await this.neetoPlaywrightUtilities.verifyToast({
|
|
14637
14637
|
message: ATTACHMENT_DELETION_TOASTR_MESSAGE,
|
|
14638
14638
|
});
|
|
14639
14639
|
if (await this.imageUploadOption.isVisible()) {
|
|
@@ -14646,7 +14646,7 @@ class EditorPage {
|
|
|
14646
14646
|
const imagePath = Path__namespace.join(__dirname, filePath);
|
|
14647
14647
|
await fileUploader.setFiles(imagePath);
|
|
14648
14648
|
await test$1.expect(this.imageWrapper).toBeVisible({ timeout: 15000 });
|
|
14649
|
-
await this.neetoPlaywrightUtilities.
|
|
14649
|
+
await this.neetoPlaywrightUtilities.verifyToast();
|
|
14650
14650
|
await this.imageWrapper
|
|
14651
14651
|
.getByTestId(COMMON_SELECTORS.dropdownIcon)
|
|
14652
14652
|
.click();
|
|
@@ -14683,7 +14683,7 @@ class EditorPage {
|
|
|
14683
14683
|
.getByTestId(COMMON_SELECTORS.selectOption(this.t("neetoRules.labels.feedback")))
|
|
14684
14684
|
.click();
|
|
14685
14685
|
await this.page.getByTestId(NEETO_EDITOR_SELECTORS.applyButton).click();
|
|
14686
|
-
await this.neetoPlaywrightUtilities.
|
|
14686
|
+
await this.neetoPlaywrightUtilities.verifyToast({
|
|
14687
14687
|
message: cannedResponseSuccessMessage,
|
|
14688
14688
|
});
|
|
14689
14689
|
}
|
|
@@ -15436,7 +15436,7 @@ class TagsPage {
|
|
|
15436
15436
|
});
|
|
15437
15437
|
await this.page.getByTestId(TAGS_SELECTORS.submitButton).click();
|
|
15438
15438
|
await waitForSave;
|
|
15439
|
-
await this.neetoPlaywrightUtilities.
|
|
15439
|
+
await this.neetoPlaywrightUtilities.verifyToast();
|
|
15440
15440
|
await this.searchAndVerifyTags(tagName);
|
|
15441
15441
|
};
|
|
15442
15442
|
this.filterTagsViaUI = async (tagName) => {
|
|
@@ -15468,7 +15468,7 @@ class TagsPage {
|
|
|
15468
15468
|
.getByTestId(TAGS_SELECTORS.tagNameTextField)
|
|
15469
15469
|
.fill(newTagName);
|
|
15470
15470
|
await this.page.getByTestId(TAGS_SELECTORS.submitButton).click();
|
|
15471
|
-
await this.neetoPlaywrightUtilities.
|
|
15471
|
+
await this.neetoPlaywrightUtilities.verifyToast();
|
|
15472
15472
|
await test$1.expect(this.page.getByRole("row", { name: tagName })).toBeHidden();
|
|
15473
15473
|
await test$1.expect(this.page.getByRole("row", { name: newTagName })).toBeVisible();
|
|
15474
15474
|
};
|
|
@@ -15481,18 +15481,18 @@ class TagsPage {
|
|
|
15481
15481
|
await this.page
|
|
15482
15482
|
.getByTestId(COMMON_SELECTORS.alertModalSubmitButton)
|
|
15483
15483
|
.click();
|
|
15484
|
-
await this.neetoPlaywrightUtilities.
|
|
15484
|
+
await this.neetoPlaywrightUtilities.verifyToast();
|
|
15485
15485
|
await test$1.expect(this.page.getByRole("row", { name: tagName })).toBeHidden();
|
|
15486
15486
|
};
|
|
15487
|
-
this.
|
|
15488
|
-
url:
|
|
15487
|
+
this.addTagsViaRequest = ({ name, description = "", tagsRequestUrl, }) => this.neetoPlaywrightUtilities.apiRequest({
|
|
15488
|
+
url: tagsRequestUrl,
|
|
15489
15489
|
body: { name, description },
|
|
15490
15490
|
method: "post",
|
|
15491
15491
|
});
|
|
15492
|
-
this.navigateToMergeTagsPage = async (
|
|
15492
|
+
this.navigateToMergeTagsPage = async () => {
|
|
15493
15493
|
await this.page.getByTestId(MERGE_TAGS_SELECTORS.mergeTagsButton).click();
|
|
15494
15494
|
await this.neetoPlaywrightUtilities.waitForPageLoad();
|
|
15495
|
-
await test$1.expect(this.page.getByTestId(COMMON_SELECTORS.heading)).toHaveText(
|
|
15495
|
+
await test$1.expect(this.page.getByTestId(COMMON_SELECTORS.heading)).toHaveText(this.t("neetoTags.common.mergeTag_other"));
|
|
15496
15496
|
};
|
|
15497
15497
|
this.searchAndSelect = async ({ selector, tagName, rowSelector, }) => {
|
|
15498
15498
|
await this.page.getByTestId(selector).fill(tagName);
|
|
@@ -15501,7 +15501,7 @@ class TagsPage {
|
|
|
15501
15501
|
.filter({ hasText: tagName })
|
|
15502
15502
|
.click();
|
|
15503
15503
|
};
|
|
15504
|
-
this.
|
|
15504
|
+
this.mergeAndVerifyTagsViaUI = async ({ sourceTagName, destinationTagName, tagsBreadcrumbSelector, }) => {
|
|
15505
15505
|
await this.searchAndSelect({
|
|
15506
15506
|
selector: MERGE_TAGS_SELECTORS.sourceSearchTextField,
|
|
15507
15507
|
tagName: sourceTagName,
|
|
@@ -15513,10 +15513,10 @@ class TagsPage {
|
|
|
15513
15513
|
rowSelector: MERGE_TAGS_SELECTORS.destinationTagRow,
|
|
15514
15514
|
});
|
|
15515
15515
|
await this.page.getByTestId(MERGE_TAGS_SELECTORS.mergeButton).click();
|
|
15516
|
-
await test$1.expect(this.page.getByTestId(COMMON_SELECTORS.modalHeader)).toHaveText(
|
|
15516
|
+
await test$1.expect(this.page.getByTestId(COMMON_SELECTORS.modalHeader)).toHaveText(this.t("neetoTags.common.mergeTag_other"));
|
|
15517
15517
|
await this.page.getByTestId(MERGE_TAGS_SELECTORS.proceedButton).click();
|
|
15518
|
-
await this.neetoPlaywrightUtilities.
|
|
15519
|
-
await this.page.getByTestId(
|
|
15518
|
+
await this.neetoPlaywrightUtilities.verifyToast();
|
|
15519
|
+
await this.page.getByTestId(tagsBreadcrumbSelector).click();
|
|
15520
15520
|
await test$1.expect(this.page.getByText(sourceTagName)).toBeHidden();
|
|
15521
15521
|
await test$1.expect(this.page.getByText(destinationTagName)).toBeVisible();
|
|
15522
15522
|
};
|