@bigbinary/neeto-playwright-commons 1.17.6 → 1.17.8
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 +15 -11
- package/index.cjs.js.map +1 -1
- package/index.d.ts +18 -4
- package/index.js +15 -11
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -113,6 +113,9 @@ declare class CustomCommands {
|
|
|
113
113
|
* @endexample
|
|
114
114
|
*/
|
|
115
115
|
initializeCsrfToken: () => Promise<string | null>;
|
|
116
|
+
/**
|
|
117
|
+
* @deprecated Use UI assertions instead.
|
|
118
|
+
*/
|
|
116
119
|
/**
|
|
117
120
|
*
|
|
118
121
|
* Command to wait until a response with URL responseUrl is found. Optionally,
|
|
@@ -694,6 +697,7 @@ declare class MailerUtils {
|
|
|
694
697
|
*/
|
|
695
698
|
generateRandomEmail: () => string;
|
|
696
699
|
}
|
|
700
|
+
type Hex = Lowercase<`#${string}`>;
|
|
697
701
|
interface BaseThemeStyle {
|
|
698
702
|
primaryColor: Hex;
|
|
699
703
|
secondaryColor: Hex;
|
|
@@ -705,7 +709,16 @@ interface BaseThemeStyle {
|
|
|
705
709
|
linkColor: Hex;
|
|
706
710
|
}
|
|
707
711
|
type BaseThemeStyleType = keyof BaseThemeStyle;
|
|
708
|
-
|
|
712
|
+
interface IntroPageThemeStyle {
|
|
713
|
+
titleColor: Hex;
|
|
714
|
+
descriptionColor: Hex;
|
|
715
|
+
cardBackgroundColor: Hex;
|
|
716
|
+
pageBackgroundColor: Hex;
|
|
717
|
+
meetingCardBackgroundColor: Hex;
|
|
718
|
+
meetingCardTextColor: Hex;
|
|
719
|
+
}
|
|
720
|
+
type IntroPageThemeStyleType = keyof IntroPageThemeStyle;
|
|
721
|
+
type ThemeCategory = "base" | "intro";
|
|
709
722
|
/**
|
|
710
723
|
*
|
|
711
724
|
* This function converts a hexadecimal color code to its RGBA equivalent.
|
|
@@ -729,7 +742,7 @@ declare const hexToRGBA: (hex: string) => string;
|
|
|
729
742
|
declare class ColorPickerUtils {
|
|
730
743
|
private page;
|
|
731
744
|
constructor(page: Page);
|
|
732
|
-
pickColor: (
|
|
745
|
+
pickColor: (themeLocator: Locator, color: Hex) => Promise<void>;
|
|
733
746
|
/**
|
|
734
747
|
*
|
|
735
748
|
* This function converts a hexadecimal color code to its RGBA equivalent.
|
|
@@ -5524,7 +5537,8 @@ declare const TABLE_SELECTORS: {
|
|
|
5524
5537
|
*/
|
|
5525
5538
|
declare const THEMES_SELECTORS: {
|
|
5526
5539
|
colorPickerDropdownContainer: (colorHex: string) => string;
|
|
5527
|
-
|
|
5540
|
+
baseThemeStyle: (styleType: string) => string;
|
|
5541
|
+
introPageThemeStyle: (styleType: string) => string;
|
|
5528
5542
|
};
|
|
5529
5543
|
/**
|
|
5530
5544
|
*
|
|
@@ -6348,4 +6362,4 @@ interface Overrides {
|
|
|
6348
6362
|
* @endexample
|
|
6349
6363
|
*/
|
|
6350
6364
|
declare const definePlaywrightConfig: (overrides: Overrides) => _playwright_test.PlaywrightTestConfig<{}, {}>;
|
|
6351
|
-
export { API_ROUTES, AUDIT_LOGS_TEXTS, ApiKeysPage, AuditLogsPage, BASE_URL, type BaseThemeStyleType, CHANGELOG_WIDGET_SELECTORS, CHAT_WIDGET_SELECTORS, CHAT_WIDGET_TEXTS, COLOR, COMMON_SELECTORS, COMMON_TEXTS, CREDENTIALS, CustomCommands, type CustomFixture, DATE_TEXTS, DESCRIPTION_EDITOR_TEXTS, EMBED_SELECTORS, EMOJI_LABEL, EMPTY_STORAGE_STATE, ENGAGE_TEXTS, ENVIRONMENT, EXPANDED_FONT_SIZE, EditorPage, EmbedBase, FONT_SIZE_SELECTORS, GLOBAL_TRANSLATIONS_PATTERN, GOOGLE_CALENDAR_DATE_FORMAT, GOOGLE_LOGIN_SELECTORS, GOOGLE_LOGIN_TEXTS, GooglePage, HELP_CENTER_SELECTORS, HelpAndProfilePage, INTEGRATIONS_TEXTS, INTEGRATION_SELECTORS, IS_STAGING_ENV, ImageUploader, IntegrationBase, KEYBOARD_SHORTCUTS_SELECTORS, LIST_MODIFIER_SELECTORS, LIST_MODIFIER_TAGS, LOGIN_SELECTORS, MEMBER_FORM_SELECTORS, MEMBER_SELECTORS, MEMBER_TEXTS, MERGE_TAGS_SELECTORS, MailerUtils, Member, NEETO_AUTH_BASE_URL, NEETO_EDITOR_SELECTORS, NEETO_FILTERS_SELECTORS, NEETO_IMAGE_UPLOADER_SELECTORS, NEETO_ROUTES, NEETO_TEXT_MODIFIER_SELECTORS, OTP_EMAIL_PATTERN, OrganizationPage, PLURAL, PROFILE_SECTION_SELECTORS, PROJECT_TRANSLATIONS_PATH, ROLES_SELECTORS, ROUTES, RolesPage, SELECT_COUNTRY, SIGNUP_SELECTORS, SINGULAR, SLACK_DATA_QA_SELECTORS, SLACK_DEFAULT_CHANNEL, SLACK_SELECTORS, SLACK_WEB_TEXTS, STORAGE_STATE, SidebarSection, SlackPage, TABLE_SELECTORS, TAB_SELECTORS, TAGS_SELECTORS, TEXT_MODIFIER_ROLES, TEXT_MODIFIER_SELECTORS, TEXT_MODIFIER_TAGS, THANK_YOU_SELECTORS, THEMES_SELECTORS, THIRD_PARTY_ROUTES, TOASTR_MESSAGES, TagsPage, TeamMembers, ThankYouPage, USER_AGENTS, WEBHOOK_SELECTORS, WebhooksPage, ZAPIER_LIMIT_EXHAUSTED_MESSAGE, ZAPIER_SELECTORS, ZAPIER_TEST_EMAIL, ZAPIER_WEB_TEXTS, ZapierPage, basicHTMLContent, clearCredentials, commands, cpuThrottlingUsingCDP, currencyUtils, decodeQRCodeFromFile, definePlaywrightConfig, executeWithThrottledResources, extractSubdomainFromError, filterUtils, generateRandomBypassEmail, generateStagingData, getByDataQA, getGlobalUserState, getImagePathAndName, getListCount, headerUtils, hexToRGB, hexToRGBA, hyphenize, i18nFixture, initializeCredentials, initializeTotp, isGithubIssueOpen, joinHyphenCase, joinString, login, loginWithoutSSO, networkConditions, networkThrottlingUsingCDP, readFileSyncIfExists, removeCredentialFile, shouldSkipSetupAndTeardown, simulateClickWithDelay, simulateTypingWithDelay, skipTest, squish, _default as stealthTest, tableUtils, toCamelCase, updateCredentials, writeDataToFile };
|
|
6365
|
+
export { API_ROUTES, AUDIT_LOGS_TEXTS, ApiKeysPage, AuditLogsPage, BASE_URL, type BaseThemeStyle, type BaseThemeStyleType, CHANGELOG_WIDGET_SELECTORS, CHAT_WIDGET_SELECTORS, CHAT_WIDGET_TEXTS, COLOR, COMMON_SELECTORS, COMMON_TEXTS, CREDENTIALS, CustomCommands, type CustomFixture, DATE_TEXTS, DESCRIPTION_EDITOR_TEXTS, EMBED_SELECTORS, EMOJI_LABEL, EMPTY_STORAGE_STATE, ENGAGE_TEXTS, ENVIRONMENT, EXPANDED_FONT_SIZE, EditorPage, EmbedBase, FONT_SIZE_SELECTORS, GLOBAL_TRANSLATIONS_PATTERN, GOOGLE_CALENDAR_DATE_FORMAT, GOOGLE_LOGIN_SELECTORS, GOOGLE_LOGIN_TEXTS, GooglePage, HELP_CENTER_SELECTORS, HelpAndProfilePage, INTEGRATIONS_TEXTS, INTEGRATION_SELECTORS, IS_STAGING_ENV, ImageUploader, IntegrationBase, type IntroPageThemeStyle, type IntroPageThemeStyleType, KEYBOARD_SHORTCUTS_SELECTORS, LIST_MODIFIER_SELECTORS, LIST_MODIFIER_TAGS, LOGIN_SELECTORS, MEMBER_FORM_SELECTORS, MEMBER_SELECTORS, MEMBER_TEXTS, MERGE_TAGS_SELECTORS, MailerUtils, Member, NEETO_AUTH_BASE_URL, NEETO_EDITOR_SELECTORS, NEETO_FILTERS_SELECTORS, NEETO_IMAGE_UPLOADER_SELECTORS, NEETO_ROUTES, NEETO_TEXT_MODIFIER_SELECTORS, OTP_EMAIL_PATTERN, OrganizationPage, PLURAL, PROFILE_SECTION_SELECTORS, PROJECT_TRANSLATIONS_PATH, ROLES_SELECTORS, ROUTES, RolesPage, SELECT_COUNTRY, SIGNUP_SELECTORS, SINGULAR, SLACK_DATA_QA_SELECTORS, SLACK_DEFAULT_CHANNEL, SLACK_SELECTORS, SLACK_WEB_TEXTS, STORAGE_STATE, SidebarSection, SlackPage, TABLE_SELECTORS, TAB_SELECTORS, TAGS_SELECTORS, TEXT_MODIFIER_ROLES, TEXT_MODIFIER_SELECTORS, TEXT_MODIFIER_TAGS, THANK_YOU_SELECTORS, THEMES_SELECTORS, THIRD_PARTY_ROUTES, TOASTR_MESSAGES, TagsPage, TeamMembers, ThankYouPage, type ThemeCategory, USER_AGENTS, WEBHOOK_SELECTORS, WebhooksPage, ZAPIER_LIMIT_EXHAUSTED_MESSAGE, ZAPIER_SELECTORS, ZAPIER_TEST_EMAIL, ZAPIER_WEB_TEXTS, ZapierPage, basicHTMLContent, clearCredentials, commands, cpuThrottlingUsingCDP, currencyUtils, decodeQRCodeFromFile, definePlaywrightConfig, executeWithThrottledResources, extractSubdomainFromError, filterUtils, generateRandomBypassEmail, generateStagingData, getByDataQA, getGlobalUserState, getImagePathAndName, getListCount, headerUtils, hexToRGB, hexToRGBA, hyphenize, i18nFixture, initializeCredentials, initializeTotp, isGithubIssueOpen, joinHyphenCase, joinString, login, loginWithoutSSO, networkConditions, networkThrottlingUsingCDP, readFileSyncIfExists, removeCredentialFile, shouldSkipSetupAndTeardown, simulateClickWithDelay, simulateTypingWithDelay, skipTest, squish, _default as stealthTest, tableUtils, toCamelCase, updateCredentials, writeDataToFile };
|
package/index.js
CHANGED
|
@@ -778,7 +778,8 @@ const TABLE_SELECTORS = {
|
|
|
778
778
|
|
|
779
779
|
const THEMES_SELECTORS = {
|
|
780
780
|
colorPickerDropdownContainer: (colorHex) => `${colorHex}-dropdown-container`,
|
|
781
|
-
|
|
781
|
+
baseThemeStyle: (styleType) => `theme-style-${hyphenate(styleType)}`,
|
|
782
|
+
introPageThemeStyle: (styleType) => `intro-page-theme-style-${hyphenate(styleType)}`,
|
|
782
783
|
};
|
|
783
784
|
|
|
784
785
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
@@ -3884,6 +3885,9 @@ class CustomCommands {
|
|
|
3884
3885
|
.getAttribute("content");
|
|
3885
3886
|
return this.csrfToken;
|
|
3886
3887
|
};
|
|
3888
|
+
/**
|
|
3889
|
+
* @deprecated Use UI assertions instead.
|
|
3890
|
+
*/
|
|
3887
3891
|
this.interceptMultipleResponses = ({ responseUrl = "", responseStatus = 200, times = 1, baseUrl, customPageContext, timeout = 35000, } = {}) => {
|
|
3888
3892
|
const pageContext = customPageContext !== null && customPageContext !== void 0 ? customPageContext : this.page;
|
|
3889
3893
|
return Promise.all([...new Array(times)].map(() => pageContext.waitForResponse((response) => {
|
|
@@ -12261,19 +12265,19 @@ const hexToRGBA = (hex) => {
|
|
|
12261
12265
|
class ColorPickerUtils {
|
|
12262
12266
|
constructor(page) {
|
|
12263
12267
|
this.page = page;
|
|
12264
|
-
this.pickColor = async (
|
|
12268
|
+
this.pickColor = async (themeLocator, color) => {
|
|
12265
12269
|
const colorPickerInput = this.page
|
|
12266
12270
|
.getByTestId(EMBED_SELECTORS.colorpickerEditableInput)
|
|
12267
12271
|
.getByTestId(EMBED_SELECTORS.colorpickerEditableInputTextbox);
|
|
12268
|
-
|
|
12269
|
-
|
|
12270
|
-
.
|
|
12271
|
-
.
|
|
12272
|
-
|
|
12273
|
-
|
|
12274
|
-
|
|
12275
|
-
|
|
12276
|
-
|
|
12272
|
+
const colorPickerButton = themeLocator.getByTestId(EMBED_SELECTORS.colorPickerTarget);
|
|
12273
|
+
await expect(async () => {
|
|
12274
|
+
await colorPickerButton.click();
|
|
12275
|
+
await expect(colorPickerInput).toBeVisible();
|
|
12276
|
+
await colorPickerInput.fill(color.replace("#", ""));
|
|
12277
|
+
await expect(this.page.getByTestId(THEMES_SELECTORS.colorPickerDropdownContainer(color))).toBeVisible();
|
|
12278
|
+
await colorPickerInput.press("Escape");
|
|
12279
|
+
await expect(colorPickerInput).toBeHidden();
|
|
12280
|
+
}).toPass({ timeout: 40000 });
|
|
12277
12281
|
};
|
|
12278
12282
|
this.hexToRGBA = (hex) => {
|
|
12279
12283
|
let r = 0, g = 0, b = 0, a = 1;
|