@bigbinary/neeto-playwright-commons 1.14.1 → 1.14.2

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
@@ -21329,7 +21329,7 @@ class EmbedBase {
21329
21329
  `width: "${embedWidthPercentage}"`,
21330
21330
  ]);
21331
21331
  const inlineEmbedPromise = this.neetoPlaywrightUtilities.interceptMultipleResponses(inlineEmbedInterceptParams);
21332
- await this.previewTab.click();
21332
+ (await this.previewTab.isVisible()) && (await this.previewTab.click());
21333
21333
  await inlineEmbedPromise;
21334
21334
  const iframe = this.page.locator("iframe");
21335
21335
  await iframe.waitFor({ state: "visible" });
@@ -21388,7 +21388,7 @@ class EmbedBase {
21388
21388
  `btnPosition: "${toCamelCase(customizationOptions.buttonPosition)}"`,
21389
21389
  `btnText: "${customizationOptions.buttonText}"`,
21390
21390
  ]);
21391
- await this.previewTab.click();
21391
+ (await this.previewTab.isVisible()) && (await this.previewTab.click());
21392
21392
  const floatingButton = this.page.getByRole("button", {
21393
21393
  name: customizationOptions.buttonText,
21394
21394
  });
@@ -21411,7 +21411,7 @@ class EmbedBase {
21411
21411
  .getByTestId(EMBED_SELECTORS.elementIdInput)
21412
21412
  .fill(customizationOptions.customId);
21413
21413
  await test$1.expect(this.codeBlock).toContainText(`elementSelector: "#${customizationOptions.customId}"`);
21414
- await this.previewTab.click();
21414
+ (await this.previewTab.isVisible()) && (await this.previewTab.click());
21415
21415
  await test$1.expect(this.page.getByTestId(EMBED_SELECTORS.previewElementPopupButton)).toBeVisible();
21416
21416
  await test$1.expect(this.page.locator(`#${customizationOptions.customId}`)).toBeVisible();
21417
21417
  };