@bigbinary/neeto-playwright-commons 1.22.30 → 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({
@@ -192459,9 +192469,10 @@ class EditorPage {
192459
192469
  this.verifyImageUploadOption = async ({ imageUrl, filePath, isButtonInMoreMenu, shouldRemoveImage = false, }) => {
192460
192470
  isButtonInMoreMenu && (await this.moreMenuSelector.click());
192461
192471
  await this.imageUploadOption.click();
192472
+ await test$1.expect(this.page.getByTestId(NEETO_IMAGE_UPLOADER_SELECTORS.restrictionMessage)).toBeVisible();
192462
192473
  const fileUploaderPromise = this.page.waitForEvent("filechooser");
192463
192474
  await this.page
192464
- .getByTestId(NEETO_EDITOR_SELECTORS.imageUploadButton)
192475
+ .getByTestId(NEETO_IMAGE_UPLOADER_SELECTORS.browseText)
192465
192476
  .click();
192466
192477
  const fileUploader = await fileUploaderPromise;
192467
192478
  const imagePath = Path__namespace.join(__dirname, filePath);
@@ -192472,18 +192483,6 @@ class EditorPage {
192472
192483
  await test$1.expect(this.imageWrapper).toBeHidden({
192473
192484
  timeout: 15000,
192474
192485
  });
192475
- isButtonInMoreMenu && (await this.moreMenuSelector.click());
192476
- await this.imageUploadOption.click();
192477
- await this.page
192478
- .getByTestId(NEETO_EDITOR_SELECTORS.imageUploadLinkButton)
192479
- .click();
192480
- await this.page
192481
- .getByTestId(NEETO_EDITOR_SELECTORS.imageUploadLinkInput)
192482
- .fill(imageUrl);
192483
- await this.page
192484
- .getByTestId(NEETO_EDITOR_SELECTORS.imageUploadLinkSubmitButton)
192485
- .click();
192486
- await test$1.expect(this.imageWrapper).toBeVisible({ timeout: 15000 });
192487
192486
  if (shouldRemoveImage) {
192488
192487
  await this.imageWrapper
192489
192488
  .getByTestId(COMMON_SELECTORS.dropdownIcon)