@bigbinary/neeto-playwright-commons 1.24.8 → 1.24.9

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
@@ -5658,7 +5658,7 @@ class CustomCommands {
5658
5658
  await test.expect(breadcrumbHeader).toHaveCount(titlesAndRoutes.length);
5659
5659
  await Promise.all(titlesAndRoutes.map(({ title, route }) => test.expect(breadcrumbHeader.getByRole("link", { name: title, exact: true })).toHaveAttribute("href", route)));
5660
5660
  };
5661
- this.uploadFileViaDispatchV2 = async ({ droppableZone = this.page.getByTestId(COMMON_SELECTORS.fileUploadBody), dispatchEvent = "drop", timeout = 30000, file, }) => {
5661
+ this.uploadFileViaDispatchV2 = async ({ droppableZone = this.page.getByTestId(COMMON_SELECTORS.fileUploadBody), dispatchEvent = "drop", timeout = 45000, file, }) => {
5662
5662
  const serializedFile = await serializeFileForBrowser(file);
5663
5663
  const dataTransfer = await Promise.race([
5664
5664
  droppableZone.evaluateHandle(async (_, { name, type, buffer, lastModified }) => {
@@ -117681,6 +117681,7 @@ const filterUtils = {
117681
117681
  class TeamMembers {
117682
117682
  constructor({ page, neetoPlaywrightUtilities, }) {
117683
117683
  this.navigateToTeamMembers = async () => {
117684
+ await this.neetoPlaywrightUtilities.waitForPageLoad();
117684
117685
  await this.page.getByTestId(MEMBER_SELECTORS.membersTab).click();
117685
117686
  await this.neetoPlaywrightUtilities.waitForPageLoad();
117686
117687
  };
@@ -117709,13 +117710,17 @@ class TeamMembers {
117709
117710
  await this.neetoPlaywrightUtilities.waitForPageLoad();
117710
117711
  };
117711
117712
  this.submit = async () => {
117713
+ const pane = this.page.getByTestId(COMMON_SELECTORS.paneBody);
117714
+ const submitBtn = this.page.getByTestId(MEMBER_SELECTORS.submitButton);
117715
+ const buttonSpinner = submitBtn.getByTestId(COMMON_SELECTORS.uiSpinner);
117716
+ await test.expect(submitBtn).toBeVisible({ timeout: 10000 });
117712
117717
  await test.expect(async () => {
117713
- await this.neetoPlaywrightUtilities.clickButtonAndAwaitLoad({
117714
- locator: this.page.getByTestId(MEMBER_SELECTORS.submitButton),
117715
- timeout: 10000,
117716
- });
117717
- await test.expect(this.page.getByTestId(COMMON_SELECTORS.paneBody)).toBeHidden();
117718
- }).toPass({ timeout: 40000 });
117718
+ if (await pane.isHidden())
117719
+ return;
117720
+ (await buttonSpinner.isHidden()) && (await submitBtn.click());
117721
+ await test.expect(buttonSpinner).toBeHidden({ timeout: 10000 });
117722
+ await test.expect(pane).toBeHidden();
117723
+ }).toPass({ timeout: 60000 });
117719
117724
  await this.neetoPlaywrightUtilities.verifyToast();
117720
117725
  };
117721
117726
  this.searchAndVerifyMemberByEmail = async ({ email }) => {
@@ -117872,7 +117877,9 @@ class TeamMembers {
117872
117877
  this.applyFilter = async () => {
117873
117878
  await test.expect(this.page.getByTestId(NEETO_FILTERS_SELECTORS.neetoFiltersBarClearButton)).toBeVisible();
117874
117879
  await this.neetoPlaywrightUtilities.waitForPageLoad();
117875
- await test.expect(this.page.locator(COMMON_SELECTORS.tableSpinner)).toBeHidden();
117880
+ await test.expect(this.page.locator(COMMON_SELECTORS.tableSpinner)).toBeHidden({
117881
+ timeout: 30000,
117882
+ });
117876
117883
  await this.page
117877
117884
  .getByTestId(NEETO_FILTERS_SELECTORS.filterDoneButton)
117878
117885
  .click();