@bigbinary/neeto-playwright-commons 1.22.44 → 1.22.46

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 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.page.getByTestId(INTEGRATION_SELECTORS.connectButton).click();
191436
+ await this.neetoPlaywrightUtilities.clickButtonAndAwaitLoad({
191437
+ locator: this.page.getByTestId(INTEGRATION_SELECTORS.connectButton),
191438
+ timeout: 15000,
191439
+ });
191440
+ await this.page.waitForLoadState("domcontentloaded", { timeout: 35000 });
191436
191441
  };
191437
191442
  this.verifyIntegrationStatus = async (status = "connected", visibilityTimeout = 15000) => {
191438
191443
  await this.gotoIntegrationIndex();
@@ -191456,6 +191461,7 @@ class IntegrationBase {
191456
191461
  this.gotoIntegrationIndex = async () => {
191457
191462
  if (neetoCist.isNotEmpty(this.integrationRouteIndex)) {
191458
191463
  await this.page.goto(this.integrationRouteIndex, { timeout: 20000 });
191464
+ await test$1.expect(this.page.getByTestId(COMMON_SELECTORS.floatingActionMenuButton)).toBeVisible({ timeout: 25000 });
191459
191465
  await this.neetoPlaywrightUtilities.waitForPageLoad();
191460
191466
  }
191461
191467
  };
@@ -191660,23 +191666,24 @@ class SlackPage extends IntegrationBase {
191660
191666
  const loginButton = this.page.getByRole("button", {
191661
191667
  name: this.t("neetoSlack.slack.connect.loginButton"),
191662
191668
  });
191669
+ const installButton = this.page.locator(SLACK_SELECTORS.installButton);
191663
191670
  const allowButton = this.page.getByRole("button", {
191664
191671
  name: SLACK_WEB_TEXTS.allow,
191665
191672
  });
191673
+ const button = installButton.or(allowButton);
191666
191674
  if (await loginButton.isVisible()) {
191667
191675
  await loginButton.click({ delay: 5000 });
191668
191676
  await this.page.waitForURL(RegExp("(.*)slack.com/.*"));
191669
191677
  }
191670
191678
  await this.page.waitForLoadState("domcontentloaded", { timeout: 25000 });
191671
- await test$1.expect(allowButton).toBeEnabled({ timeout: 45000 });
191679
+ await test$1.expect(button).toBeVisible({ timeout: 25000 });
191680
+ await test$1.expect(button).toBeEnabled({ timeout: 25000 });
191672
191681
  const currentWorkspace = (await this.page
191673
191682
  .locator(SLACK_SELECTORS.teamPicketButtonContent)
191674
191683
  .textContent()) || "";
191675
- await allowButton.click();
191684
+ await button.click({ timeout: 25000 });
191676
191685
  await this.page.waitForURL(redirectUrl);
191677
- await this.neetoPlaywrightUtilities.waitForPageLoad({
191678
- visibilityTimeout: 10000,
191679
- });
191686
+ await this.neetoPlaywrightUtilities.waitForPageLoad();
191680
191687
  await test$1.expect(this.page.getByRole("heading", {
191681
191688
  name: this.t("neetoSlack.slack.configure.title", {
191682
191689
  teamName: currentWorkspace,
@@ -193289,8 +193296,10 @@ class OrganizationPage {
193289
193296
  await this.page.getByTestId(COMMON_SELECTORS.checkbox).click();
193290
193297
  const profileSubmitButton = this.page.getByTestId(SIGNUP_SELECTORS.profileSubmitButton);
193291
193298
  await profileSubmitButton.click();
193292
- await test$1.expect(profileSubmitButton).toBeHidden({ timeout: 60000 });
193293
- await this.neetoPlaywrightUtilities.waitForPageLoad();
193299
+ await test$1.expect(profileSubmitButton).toBeHidden({ timeout: 2 * 60000 });
193300
+ await this.neetoPlaywrightUtilities.waitForPageLoad({
193301
+ visibilityTimeout: 45000,
193302
+ });
193294
193303
  };
193295
193304
  this.loginAndOnboard = async ({ email, firstName, lastName, country, handleOnboarding, baseURL = process.env.BASE_URL, fetchOtpFromEmail, }) => {
193296
193305
  await this.page.goto(`${baseURL}${ROUTES.admin}`, { timeout: 20000 });
@@ -193724,10 +193733,11 @@ class RolesPage {
193724
193733
  if (neetoCist.isNotEqualDeep(roleAccessableLinks, adminAccessableLinks)) {
193725
193734
  for (const link of adminAccessableLinks) {
193726
193735
  await this.page.goto(link);
193736
+ await test$1.expect
193737
+ .soft(this.page.getByTestId(COMMON_SELECTORS.floatingActionMenuButton))
193738
+ .toBeVisible({ timeout: 15000 });
193727
193739
  await this.neetoPlaywrightUtilities.waitForPageLoad();
193728
- await test$1.expect(this.page.locator(COMMON_SELECTORS.tableSpinner)).toBeHidden({
193729
- timeout: 15000,
193730
- });
193740
+ await test$1.expect(this.page.locator(COMMON_SELECTORS.tableSpinner)).toBeHidden({ timeout: 35000 });
193731
193741
  const unauthorizedHeading = this.page.getByRole("heading", {
193732
193742
  name: this.t("neetoMolecules.errorPage.unauthorized"),
193733
193743
  });