@bigbinary/neeto-playwright-commons 1.15.0 → 1.15.1

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
@@ -21268,7 +21268,9 @@ class EmbedBase {
21268
21268
  .getByTestId(COMMON_SELECTORS.radioLabel(embedLabel))
21269
21269
  .check();
21270
21270
  };
21271
- this.verifyInlineCustomization = async ({ headingTestId, inlineEmbedInterceptParams, customizationOptions, }) => {
21271
+ this.verifyInlineCustomization = async ({ headingTestId,
21272
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
21273
+ inlineEmbedInterceptParams, customizationOptions, }) => {
21272
21274
  const embedHeightPercentage = `${customizationOptions.embedHeight}%`;
21273
21275
  const embedWidthPercentage = `${customizationOptions.embedWidth}%`;
21274
21276
  await this.page
@@ -21286,14 +21288,14 @@ class EmbedBase {
21286
21288
  `height: "${embedHeightPercentage}"`,
21287
21289
  `width: "${embedWidthPercentage}"`,
21288
21290
  ]);
21289
- const inlineEmbedPromise = this.neetoPlaywrightUtilities.interceptMultipleResponses(inlineEmbedInterceptParams);
21290
21291
  (await this.previewTab.isVisible()) && (await this.previewTab.click());
21291
- await inlineEmbedPromise;
21292
21292
  const iframe = this.page.locator("iframe");
21293
21293
  await iframe.waitFor({ state: "visible" });
21294
21294
  await test$1.expect(this.page.frameLocator("iframe").getByTestId(headingTestId)).toBeVisible({ timeout: 10000 });
21295
- const iframeHeight = await iframe.evaluate(node => node.getAttribute("height"));
21296
- const iframeWidth = await iframe.evaluate(node => node.getAttribute("width"));
21295
+ const [iframeHeight, iframeWidth] = await iframe.evaluate(node => [
21296
+ node.getAttribute("height"),
21297
+ node.getAttribute("width"),
21298
+ ]);
21297
21299
  // eslint-disable-next-line playwright/no-standalone-expect
21298
21300
  test$1.expect(iframeHeight).toStrictEqual(embedHeightPercentage);
21299
21301
  // eslint-disable-next-line playwright/no-standalone-expect
@@ -21350,12 +21352,14 @@ class EmbedBase {
21350
21352
  const floatingButton = this.page.getByRole("button", {
21351
21353
  name: customizationOptions.buttonText,
21352
21354
  });
21353
- await test$1.expect(floatingButton).toHaveCSS("color", hexToRGB(customizationOptions.buttonTextColorHex));
21354
- await test$1.expect(floatingButton).toHaveCSS("background-color", hexToRGB(customizationOptions.buttonColorHex));
21355
21355
  const classRegExp = customizationOptions.buttonPosition
21356
21356
  .toLocaleLowerCase()
21357
21357
  .replace(" ", ".*");
21358
- await test$1.expect(floatingButton).toHaveClass(RegExp(classRegExp));
21358
+ await Promise.all([
21359
+ test$1.expect(floatingButton).toHaveClass(RegExp(classRegExp)),
21360
+ test$1.expect(floatingButton).toHaveCSS("background-color", hexToRGB(customizationOptions.buttonColorHex)),
21361
+ test$1.expect(floatingButton).toHaveCSS("color", hexToRGB(customizationOptions.buttonTextColorHex)),
21362
+ ]);
21359
21363
  const floatingButtonIcon = floatingButton.locator("svg");
21360
21364
  if (customizationOptions.showIcon === true) {
21361
21365
  await test$1.expect(floatingButtonIcon).toBeVisible();
@@ -21370,8 +21374,10 @@ class EmbedBase {
21370
21374
  .fill(customizationOptions.customId);
21371
21375
  await test$1.expect(this.codeBlock).toContainText(`elementSelector: "#${customizationOptions.customId}"`);
21372
21376
  (await this.previewTab.isVisible()) && (await this.previewTab.click());
21373
- await test$1.expect(this.page.getByTestId(EMBED_SELECTORS.previewElementPopupButton)).toBeVisible();
21374
- await test$1.expect(this.page.locator(`#${customizationOptions.customId}`)).toBeVisible();
21377
+ await Promise.all([
21378
+ test$1.expect(this.page.getByTestId(EMBED_SELECTORS.previewElementPopupButton)).toBeVisible(),
21379
+ await test$1.expect(this.page.locator(`#${customizationOptions.customId}`)).toBeVisible(),
21380
+ ]);
21375
21381
  };
21376
21382
  this.expectMultipleTextsInCodeblock = async (containTextOptions) => {
21377
21383
  const codeBlock = this.page.getByTestId(EMBED_SELECTORS.codeBlock);