@bigbinary/neeto-playwright-commons 1.22.44 → 1.22.45
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 +11 -3
- package/index.cjs.js.map +1 -1
- package/index.d.ts +1 -0
- package/index.js +11 -3
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -4119,6 +4119,7 @@ const SLACK_SELECTORS = {
|
|
|
4119
4119
|
markdownElement: "bk_markdown_element",
|
|
4120
4120
|
virtualListItem: "virtual-list-item",
|
|
4121
4121
|
channelItems: '[role="treeitem"][data-qa="virtual-list-item"]',
|
|
4122
|
+
installButton: dataQa("oauth_submit_button"),
|
|
4122
4123
|
};
|
|
4123
4124
|
const SLACK_DATA_QA_SELECTORS = {
|
|
4124
4125
|
sectionHeadingButton: "section_heading_button__channels",
|
|
@@ -191432,7 +191433,11 @@ class IntegrationBase {
|
|
|
191432
191433
|
await test$1.expect(this.page.getByRole("heading", {
|
|
191433
191434
|
name: this.connectHeader,
|
|
191434
191435
|
})).toBeVisible();
|
|
191435
|
-
await this.
|
|
191436
|
+
await this.neetoPlaywrightUtilities.clickButtonAndAwaitLoad({
|
|
191437
|
+
locator: this.page.getByTestId(INTEGRATION_SELECTORS.connectButton),
|
|
191438
|
+
timeout: 15000,
|
|
191439
|
+
});
|
|
191440
|
+
await this.page.waitForLoadState("load", { timeout: 25000 });
|
|
191436
191441
|
};
|
|
191437
191442
|
this.verifyIntegrationStatus = async (status = "connected", visibilityTimeout = 15000) => {
|
|
191438
191443
|
await this.gotoIntegrationIndex();
|
|
@@ -191663,16 +191668,19 @@ class SlackPage extends IntegrationBase {
|
|
|
191663
191668
|
const allowButton = this.page.getByRole("button", {
|
|
191664
191669
|
name: SLACK_WEB_TEXTS.allow,
|
|
191665
191670
|
});
|
|
191671
|
+
const installButton = this.page.locator(SLACK_SELECTORS.installButton);
|
|
191666
191672
|
if (await loginButton.isVisible()) {
|
|
191667
191673
|
await loginButton.click({ delay: 5000 });
|
|
191668
191674
|
await this.page.waitForURL(RegExp("(.*)slack.com/.*"));
|
|
191669
191675
|
}
|
|
191670
191676
|
await this.page.waitForLoadState("domcontentloaded", { timeout: 25000 });
|
|
191671
|
-
await test$1.expect(allowButton).toBeEnabled({
|
|
191677
|
+
await test$1.expect(allowButton.or(installButton)).toBeEnabled({
|
|
191678
|
+
timeout: 45000,
|
|
191679
|
+
});
|
|
191672
191680
|
const currentWorkspace = (await this.page
|
|
191673
191681
|
.locator(SLACK_SELECTORS.teamPicketButtonContent)
|
|
191674
191682
|
.textContent()) || "";
|
|
191675
|
-
await allowButton.click();
|
|
191683
|
+
await allowButton.or(installButton).click();
|
|
191676
191684
|
await this.page.waitForURL(redirectUrl);
|
|
191677
191685
|
await this.neetoPlaywrightUtilities.waitForPageLoad({
|
|
191678
191686
|
visibilityTimeout: 10000,
|