@bigbinary/neeto-playwright-commons 1.13.13 → 1.13.15

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
@@ -3902,13 +3902,13 @@ class CustomCommands {
3902
3902
  (await this.page.getByTestId(COMMON_SELECTORS.toastCloseButton).click());
3903
3903
  await test$1.expect(this.page.locator(COMMON_SELECTORS.toastIcon)).toBeHidden();
3904
3904
  };
3905
- this.verifyToast = async ({ message = "", toastType = "success", closeAfterVerification = true, timeout = 10000, } = {}) => {
3906
- const toastrCloseButton = this.page.getByTestId(COMMON_SELECTORS.toastCloseButton);
3905
+ this.verifyToast = async ({ message = "", toastType = "success", closeAfterVerification = true, timeout = 10000, customPageContext = this.page, } = {}) => {
3906
+ const toastrCloseButton = customPageContext.getByTestId(COMMON_SELECTORS.toastCloseButton);
3907
3907
  if (!ramda.isEmpty(message)) {
3908
- await test$1.expect(this.page.getByTestId(COMMON_SELECTORS.toastMessage(toastType))).toContainText(message, { timeout });
3908
+ await test$1.expect(customPageContext.getByTestId(COMMON_SELECTORS.toastMessage(toastType))).toContainText(message, { timeout });
3909
3909
  }
3910
3910
  else {
3911
- await test$1.expect(this.page.locator(COMMON_SELECTORS.toastIcon)).toContainText("👍", { timeout });
3911
+ await test$1.expect(customPageContext.locator(COMMON_SELECTORS.toastIcon)).toContainText("👍", { timeout });
3912
3912
  }
3913
3913
  if (closeAfterVerification && (await toastrCloseButton.isVisible())) {
3914
3914
  await toastrCloseButton.click();
@@ -21268,10 +21268,15 @@ class EmbedBase {
21268
21268
  this.clickOnPopupButton = async (popUpButtonSelectorOptions) => {
21269
21269
  const popUpButton = this.embedTestPage.getByRole(this.embedTestPageType === "floatingPopup" ? "button" : "link", popUpButtonSelectorOptions);
21270
21270
  await test$1.expect(popUpButton).toBeVisible();
21271
- await popUpButton.click();
21272
- await test$1.expect(this.embedTestPage.locator(EMBED_SELECTORS.loader(this.appName))).toBeHidden({
21273
- timeout: 40000,
21274
- });
21271
+ await test$1.expect(async () => {
21272
+ await popUpButton.click();
21273
+ await test$1.expect(this.embedTestPage.locator(EMBED_SELECTORS.loader(this.appName))).toBeHidden({
21274
+ timeout: 40000,
21275
+ });
21276
+ await test$1.expect(this.embedTestPage.locator(EMBED_SELECTORS.iframe(this.appName))).toBeVisible({
21277
+ timeout: 10000,
21278
+ });
21279
+ }).toPass({ timeout: 2 * 60 * 1000 });
21275
21280
  };
21276
21281
  this.copyEmbedScript = async ({ embedLabel }) => {
21277
21282
  await this.page
@@ -23716,12 +23721,14 @@ class SlackPage extends IntegrationBase {
23716
23721
  .textContent()) || "";
23717
23722
  await allowButton.click();
23718
23723
  await this.page.waitForURL(redirectUrl);
23719
- await test$1.expect(this.page.getByTestId(COMMON_SELECTORS.pageLoader)).toBeHidden({ timeout: 10000 });
23724
+ await this.neetoPlaywrightUtilities.waitForPageLoad({
23725
+ visibilityTimeout: 10000,
23726
+ });
23720
23727
  await test$1.expect(this.page.getByRole("heading", {
23721
23728
  name: this.t("neetoSlack.slack.configure.title", {
23722
23729
  teamName: currentWorkspace,
23723
23730
  }),
23724
- })).toBeVisible();
23731
+ })).toBeVisible({ timeout: 10000 });
23725
23732
  await this.neetoPlaywrightUtilities.selectOptionFromDropdown({
23726
23733
  value: channelToConfigure,
23727
23734
  });
@@ -24694,7 +24701,12 @@ class TeamMembers {
24694
24701
  }
24695
24702
  // eslint-disable-next-line playwright/no-standalone-expect
24696
24703
  await test$1.expect(async () => {
24697
- await this.page.getByTestId(MEMBER_SELECTORS.submitButton).click();
24704
+ const submitButton = this.page.getByTestId(MEMBER_SELECTORS.submitButton);
24705
+ await submitButton.click();
24706
+ // eslint-disable-next-line playwright/no-standalone-expect
24707
+ await test$1.expect(submitButton.locator(COMMON_SELECTORS.buttonSpinner)).toBeHidden({
24708
+ timeout: 15000,
24709
+ });
24698
24710
  // eslint-disable-next-line playwright/no-standalone-expect
24699
24711
  await test$1.expect(this.page.getByTestId(COMMON_SELECTORS.paneBody)).toBeHidden();
24700
24712
  }).toPass({ timeout: 40000 });
@@ -24912,7 +24924,7 @@ class OrganizationPage {
24912
24924
  const isNeetoAuth = appNameInLowerCase === "neetoauth";
24913
24925
  isNeetoAuth
24914
24926
  ? await this.page.goto(ROUTES.neetoAuthSignup, { timeout: 20000 })
24915
- : await this.page.goto(`${ROUTES.neetoAuthSignup}?redirect_uri=${appNameInLowerCase}.net`, { timeout: 20000 });
24927
+ : await this.page.goto(`${ROUTES.neetoAuthSignup}?redirect_uri=${appNameInLowerCase}.net/admin`, { timeout: 20000 });
24916
24928
  await this.page.getByTestId(SIGNUP_SELECTORS.emailTextField).fill(email);
24917
24929
  const signup = this.neetoPlaywrightUtilities.interceptMultipleResponses({
24918
24930
  responseUrl: ROUTES.signup,
@@ -25007,7 +25019,6 @@ class OrganizationPage {
25007
25019
  const unregisteredEmailError = this.page.getByTestId(SIGNUP_SELECTORS.unregisterdEmailError);
25008
25020
  await test$1.expect(async () => {
25009
25021
  await this.page.getByTestId(LOGIN_SELECTORS.submitButton).click();
25010
- await test$1.expect(unregisteredEmailError).toBeHidden();
25011
25022
  await this.neetoPlaywrightUtilities.waitForPageLoad();
25012
25023
  await test$1.expect(unregisteredEmailError).toBeHidden();
25013
25024
  }).toPass({ timeout: loginTimeout });