@bigbinary/neeto-playwright-commons 1.8.41 → 1.8.43

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
@@ -12465,7 +12465,9 @@ class EmbedBase {
12465
12465
  await test$1.expect(this.page.frameLocator("iframe").getByTestId(headingTestId)).toBeVisible({ timeout: 10000 });
12466
12466
  const iframeHeight = await iframe.evaluate(node => node.getAttribute("height"));
12467
12467
  const iframeWidth = await iframe.evaluate(node => node.getAttribute("width"));
12468
+ // eslint-disable-next-line playwright/no-standalone-expect
12468
12469
  test$1.expect(iframeHeight).toStrictEqual(embedHeightPercentage);
12470
+ // eslint-disable-next-line playwright/no-standalone-expect
12469
12471
  test$1.expect(iframeWidth).toStrictEqual(embedWidthPercentage);
12470
12472
  };
12471
12473
  this.verifyFloatingPopupCustomization = async (customizationOptions) => {
@@ -12500,13 +12502,20 @@ class EmbedBase {
12500
12502
  .getByTestId(EMBED_SELECTORS.colorpickerEditableInput)
12501
12503
  .getByRole("textbox")
12502
12504
  .fill(customizationOptions.buttonTextColorHex);
12503
- await this.page.getByTestId(EMBED_SELECTORS.showIconCheckbox).click();
12505
+ const showIconCheckbox = this.page.getByTestId(EMBED_SELECTORS.showIconCheckbox);
12506
+ if (customizationOptions.showIcon === true) {
12507
+ await showIconCheckbox.check();
12508
+ await test$1.expect(this.codeBlock).toContainText("showIcon: true");
12509
+ }
12510
+ else if (customizationOptions.showIcon === false) {
12511
+ await showIconCheckbox.uncheck();
12512
+ await test$1.expect(this.codeBlock).toContainText("showIcon: false");
12513
+ }
12504
12514
  await this.expectMultipleTextsInCodeblock([
12505
12515
  `btnColor: "${customizationOptions.buttonColorHex}"`,
12506
12516
  `btnTextColor: "${customizationOptions.buttonTextColorHex}"`,
12507
12517
  `btnPosition: "${toCamelCase(customizationOptions.buttonPosition)}"`,
12508
12518
  `btnText: "${customizationOptions.buttonText}"`,
12509
- "showIcon: false",
12510
12519
  ]);
12511
12520
  await this.previewTab.click();
12512
12521
  const floatingButton = this.page.getByRole("button", {
@@ -12518,7 +12527,13 @@ class EmbedBase {
12518
12527
  .toLocaleLowerCase()
12519
12528
  .replace(" ", ".*");
12520
12529
  await test$1.expect(floatingButton).toHaveClass(RegExp(classRegExp));
12521
- await test$1.expect(floatingButton.locator("svg")).toBeHidden();
12530
+ const floatingButtonIcon = floatingButton.locator("svg");
12531
+ if (customizationOptions.showIcon === true) {
12532
+ await test$1.expect(floatingButtonIcon).toBeVisible();
12533
+ }
12534
+ else if (customizationOptions.showIcon === false) {
12535
+ await test$1.expect(floatingButtonIcon).toBeHidden();
12536
+ }
12522
12537
  };
12523
12538
  this.verifyElementClickCustomization = async (customizationOptions) => {
12524
12539
  await this.page
@@ -13590,6 +13605,7 @@ const loginWithoutSSO = async ({ page, neetoPlaywrightUtilities, loginPath = "/"
13590
13605
  };
13591
13606
  const login = async ({ page, neetoPlaywrightUtilities, loginPath, }) => !IS_STAGING_ENV &&
13592
13607
  (await loginWithoutSSO({ page, neetoPlaywrightUtilities, loginPath }));
13608
+ const generateRandomBypassEmail = () => `cpt${process.env.OTP_BYPASS_KEY}+${faker.faker.number.int()}@bigbinary.com`;
13593
13609
 
13594
13610
  const addMemberViaRequest = ({ email, role = MEMBER_TEXTS.agent, appName, neetoPlaywrightUtilities, }) => neetoPlaywrightUtilities.apiRequest({
13595
13611
  method: "post",
@@ -147166,6 +147182,7 @@ exports.CHAT_WIDGET_TEXTS = CHAT_WIDGET_TEXTS;
147166
147182
  exports.COMMON_SELECTORS = COMMON_SELECTORS;
147167
147183
  exports.CREDENTIALS = CREDENTIALS;
147168
147184
  exports.CustomCommands = CustomCommands;
147185
+ exports.EMBED_SELECTORS = EMBED_SELECTORS;
147169
147186
  exports.ENVIRONMENT = ENVIRONMENT;
147170
147187
  exports.EmbedBase = EmbedBase;
147171
147188
  exports.GLOBAL_TRANSLATIONS_PATTERN = GLOBAL_TRANSLATIONS_PATTERN;
@@ -147203,6 +147220,7 @@ exports.TAGS_SELECTORS = TAGS_SELECTORS;
147203
147220
  exports.THIRD_PARTY_ROUTES = THIRD_PARTY_ROUTES;
147204
147221
  exports.USER_AGENTS = USER_AGENTS;
147205
147222
  exports.WebhooksPage = WebhooksPage;
147223
+ exports.basicHTMLContent = basicHTMLContent;
147206
147224
  exports.clearCredentials = clearCredentials;
147207
147225
  exports.commands = commands;
147208
147226
  exports.cpuThrottlingUsingCDP = cpuThrottlingUsingCDP;
@@ -147210,10 +147228,12 @@ exports.decodeQRCodeFromFile = decodeQRCodeFromFile;
147210
147228
  exports.definePlaywrightConfig = definePlaywrightConfig;
147211
147229
  exports.executeWithThrottledResources = executeWithThrottledResources;
147212
147230
  exports.extractSubdomainFromError = extractSubdomainFromError;
147231
+ exports.generateRandomBypassEmail = generateRandomBypassEmail;
147213
147232
  exports.generateStagingData = generateStagingData;
147214
147233
  exports.getByDataQA = getByDataQA;
147215
147234
  exports.getGlobalUserState = getGlobalUserState;
147216
147235
  exports.headerUtils = headerUtils;
147236
+ exports.hexToRGB = hexToRGB;
147217
147237
  exports.hyphenize = hyphenize;
147218
147238
  exports.i18nFixture = i18nFixture;
147219
147239
  exports.initializeCredentials = initializeCredentials;