@bigbinary/neeto-playwright-commons 1.8.41 → 1.8.42
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 +21 -3
- package/index.cjs.js.map +1 -1
- package/index.d.ts +28 -1
- package/index.js +19 -4
- package/index.js.map +1 -1
- package/package.json +1 -1
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
|
-
|
|
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
|
-
|
|
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
|
|
@@ -147166,6 +147181,7 @@ exports.CHAT_WIDGET_TEXTS = CHAT_WIDGET_TEXTS;
|
|
|
147166
147181
|
exports.COMMON_SELECTORS = COMMON_SELECTORS;
|
|
147167
147182
|
exports.CREDENTIALS = CREDENTIALS;
|
|
147168
147183
|
exports.CustomCommands = CustomCommands;
|
|
147184
|
+
exports.EMBED_SELECTORS = EMBED_SELECTORS;
|
|
147169
147185
|
exports.ENVIRONMENT = ENVIRONMENT;
|
|
147170
147186
|
exports.EmbedBase = EmbedBase;
|
|
147171
147187
|
exports.GLOBAL_TRANSLATIONS_PATTERN = GLOBAL_TRANSLATIONS_PATTERN;
|
|
@@ -147203,6 +147219,7 @@ exports.TAGS_SELECTORS = TAGS_SELECTORS;
|
|
|
147203
147219
|
exports.THIRD_PARTY_ROUTES = THIRD_PARTY_ROUTES;
|
|
147204
147220
|
exports.USER_AGENTS = USER_AGENTS;
|
|
147205
147221
|
exports.WebhooksPage = WebhooksPage;
|
|
147222
|
+
exports.basicHTMLContent = basicHTMLContent;
|
|
147206
147223
|
exports.clearCredentials = clearCredentials;
|
|
147207
147224
|
exports.commands = commands;
|
|
147208
147225
|
exports.cpuThrottlingUsingCDP = cpuThrottlingUsingCDP;
|
|
@@ -147214,6 +147231,7 @@ exports.generateStagingData = generateStagingData;
|
|
|
147214
147231
|
exports.getByDataQA = getByDataQA;
|
|
147215
147232
|
exports.getGlobalUserState = getGlobalUserState;
|
|
147216
147233
|
exports.headerUtils = headerUtils;
|
|
147234
|
+
exports.hexToRGB = hexToRGB;
|
|
147217
147235
|
exports.hyphenize = hyphenize;
|
|
147218
147236
|
exports.i18nFixture = i18nFixture;
|
|
147219
147237
|
exports.initializeCredentials = initializeCredentials;
|