@bigbinary/neeto-playwright-commons 1.22.29 → 1.22.31

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
@@ -4611,6 +4611,16 @@ class CustomCommands {
4611
4611
  test$1.expect(cardLocator.getByTestId(ADMIN_PANEL_SELECTORS.settingsItemDescription)).toHaveText(description),
4612
4612
  test$1.expect(this.page.getByTestId(COMMON_SELECTORS.sidebarSubLink(title))).toHaveCSS("background-color", COLOR.transparent),
4613
4613
  ]);
4614
+ this.executeWithErrorHandling = async (asyncFn) => {
4615
+ try {
4616
+ const result = await asyncFn();
4617
+ return { success: true, result };
4618
+ }
4619
+ catch (error) {
4620
+ const errorInstance = error instanceof Error ? error : new Error(String(error));
4621
+ return { success: false, error: errorInstance.message };
4622
+ }
4623
+ };
4614
4624
  this.clickButtonAndAwaitLoad = async ({ locator, timeout, }) => {
4615
4625
  await locator.click({ timeout });
4616
4626
  await test$1.expect(locator.getByTestId(COMMON_SELECTORS.uiSpinner)).toBeHidden({
@@ -179872,6 +179882,7 @@ const commands = {
179872
179882
  await page.goto("/", { timeout: 35000 });
179873
179883
  await page.waitForLoadState();
179874
179884
  await use(page);
179885
+ await page.close();
179875
179886
  },
179876
179887
  mailerUtils: async ({ neetoPlaywrightUtilities }, use) => {
179877
179888
  const mailerUtils = new MailerUtils(neetoPlaywrightUtilities);
@@ -192458,9 +192469,10 @@ class EditorPage {
192458
192469
  this.verifyImageUploadOption = async ({ imageUrl, filePath, isButtonInMoreMenu, shouldRemoveImage = false, }) => {
192459
192470
  isButtonInMoreMenu && (await this.moreMenuSelector.click());
192460
192471
  await this.imageUploadOption.click();
192472
+ await test$1.expect(this.page.getByTestId(NEETO_IMAGE_UPLOADER_SELECTORS.restrictionMessage)).toBeVisible();
192461
192473
  const fileUploaderPromise = this.page.waitForEvent("filechooser");
192462
192474
  await this.page
192463
- .getByTestId(NEETO_EDITOR_SELECTORS.imageUploadButton)
192475
+ .getByTestId(NEETO_IMAGE_UPLOADER_SELECTORS.browseText)
192464
192476
  .click();
192465
192477
  const fileUploader = await fileUploaderPromise;
192466
192478
  const imagePath = Path__namespace.join(__dirname, filePath);
@@ -192471,18 +192483,6 @@ class EditorPage {
192471
192483
  await test$1.expect(this.imageWrapper).toBeHidden({
192472
192484
  timeout: 15000,
192473
192485
  });
192474
- isButtonInMoreMenu && (await this.moreMenuSelector.click());
192475
- await this.imageUploadOption.click();
192476
- await this.page
192477
- .getByTestId(NEETO_EDITOR_SELECTORS.imageUploadLinkButton)
192478
- .click();
192479
- await this.page
192480
- .getByTestId(NEETO_EDITOR_SELECTORS.imageUploadLinkInput)
192481
- .fill(imageUrl);
192482
- await this.page
192483
- .getByTestId(NEETO_EDITOR_SELECTORS.imageUploadLinkSubmitButton)
192484
- .click();
192485
- await test$1.expect(this.imageWrapper).toBeVisible({ timeout: 15000 });
192486
192486
  if (shouldRemoveImage) {
192487
192487
  await this.imageWrapper
192488
192488
  .getByTestId(COMMON_SELECTORS.dropdownIcon)