@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.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -4099,6 +4099,7 @@ const SLACK_SELECTORS = {
|
|
|
4099
4099
|
markdownElement: "bk_markdown_element",
|
|
4100
4100
|
virtualListItem: "virtual-list-item",
|
|
4101
4101
|
channelItems: '[role="treeitem"][data-qa="virtual-list-item"]',
|
|
4102
|
+
installButton: dataQa("oauth_submit_button"),
|
|
4102
4103
|
};
|
|
4103
4104
|
const SLACK_DATA_QA_SELECTORS = {
|
|
4104
4105
|
sectionHeadingButton: "section_heading_button__channels",
|
|
@@ -191412,7 +191413,11 @@ class IntegrationBase {
|
|
|
191412
191413
|
await expect(this.page.getByRole("heading", {
|
|
191413
191414
|
name: this.connectHeader,
|
|
191414
191415
|
})).toBeVisible();
|
|
191415
|
-
await this.
|
|
191416
|
+
await this.neetoPlaywrightUtilities.clickButtonAndAwaitLoad({
|
|
191417
|
+
locator: this.page.getByTestId(INTEGRATION_SELECTORS.connectButton),
|
|
191418
|
+
timeout: 15000,
|
|
191419
|
+
});
|
|
191420
|
+
await this.page.waitForLoadState("load", { timeout: 25000 });
|
|
191416
191421
|
};
|
|
191417
191422
|
this.verifyIntegrationStatus = async (status = "connected", visibilityTimeout = 15000) => {
|
|
191418
191423
|
await this.gotoIntegrationIndex();
|
|
@@ -191643,16 +191648,19 @@ class SlackPage extends IntegrationBase {
|
|
|
191643
191648
|
const allowButton = this.page.getByRole("button", {
|
|
191644
191649
|
name: SLACK_WEB_TEXTS.allow,
|
|
191645
191650
|
});
|
|
191651
|
+
const installButton = this.page.locator(SLACK_SELECTORS.installButton);
|
|
191646
191652
|
if (await loginButton.isVisible()) {
|
|
191647
191653
|
await loginButton.click({ delay: 5000 });
|
|
191648
191654
|
await this.page.waitForURL(RegExp("(.*)slack.com/.*"));
|
|
191649
191655
|
}
|
|
191650
191656
|
await this.page.waitForLoadState("domcontentloaded", { timeout: 25000 });
|
|
191651
|
-
await expect(allowButton).toBeEnabled({
|
|
191657
|
+
await expect(allowButton.or(installButton)).toBeEnabled({
|
|
191658
|
+
timeout: 45000,
|
|
191659
|
+
});
|
|
191652
191660
|
const currentWorkspace = (await this.page
|
|
191653
191661
|
.locator(SLACK_SELECTORS.teamPicketButtonContent)
|
|
191654
191662
|
.textContent()) || "";
|
|
191655
|
-
await allowButton.click();
|
|
191663
|
+
await allowButton.or(installButton).click();
|
|
191656
191664
|
await this.page.waitForURL(redirectUrl);
|
|
191657
191665
|
await this.neetoPlaywrightUtilities.waitForPageLoad({
|
|
191658
191666
|
visibilityTimeout: 10000,
|