@bigbinary/neeto-playwright-commons 1.17.5 → 1.17.6

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.d.ts CHANGED
@@ -694,10 +694,68 @@ declare class MailerUtils {
694
694
  */
695
695
  generateRandomEmail: () => string;
696
696
  }
697
+ interface BaseThemeStyle {
698
+ primaryColor: Hex;
699
+ secondaryColor: Hex;
700
+ primaryTextColor: Hex;
701
+ secondaryTextColor: Hex;
702
+ backgroundColor: Hex;
703
+ cardBackgroundColor: Hex;
704
+ cardTextColor: Hex;
705
+ linkColor: Hex;
706
+ }
707
+ type BaseThemeStyleType = keyof BaseThemeStyle;
708
+ type Hex = Lowercase<`#${string}`>;
709
+ /**
710
+ *
711
+ * This function converts a hexadecimal color code to its RGBA equivalent.
712
+ *
713
+ * @example
714
+ *
715
+ * import { hexToRGBA } from "@bigbinary/neeto-playwright-commons";
716
+ *
717
+ * // Convert hexadecimal color code to RGB
718
+ * const rgbaColor = hexToRGBA("#ffffff29");
719
+ *
720
+ * console.log(rgbaColor); // Output: 'rgba(255, 255, 255, 0.16)'
721
+ *
722
+ * // Convert another hexadecimal color code to RGB
723
+ * const anotherRGBAColor = hexToRGBA("#00ff00ff");
724
+ *
725
+ * console.log(anotherRGBAColor); // Output: 'rgba(0, 255, 0, 1)'
726
+ * @endexample
727
+ */
728
+ declare const hexToRGBA: (hex: string) => string;
729
+ declare class ColorPickerUtils {
730
+ private page;
731
+ constructor(page: Page);
732
+ pickColor: (styleType: BaseThemeStyleType, color: Hex) => Promise<void>;
733
+ /**
734
+ *
735
+ * This function converts a hexadecimal color code to its RGBA equivalent.
736
+ *
737
+ * @example
738
+ *
739
+ * import { hexToRGBA } from "@bigbinary/neeto-playwright-commons";
740
+ *
741
+ * // Convert hexadecimal color code to RGB
742
+ * const rgbaColor = hexToRGBA("#ffffff29");
743
+ *
744
+ * console.log(rgbaColor); // Output: 'rgba(255, 255, 255, 0.16)'
745
+ *
746
+ * // Convert another hexadecimal color code to RGB
747
+ * const anotherRGBAColor = hexToRGBA("#00ff00ff");
748
+ *
749
+ * console.log(anotherRGBAColor); // Output: 'rgba(0, 255, 0, 1)'
750
+ * @endexample
751
+ */
752
+ hexToRGBA: (hex: string) => string;
753
+ }
697
754
  interface CustomFixture {
698
755
  neetoPlaywrightUtilities: CustomCommands;
699
756
  page: Page;
700
757
  mailerUtils: MailerUtils;
758
+ colorPicker: ColorPickerUtils;
701
759
  }
702
760
  type Commands = Fixtures<CustomFixture, PlaywrightWorkerArgs & PlaywrightWorkerOptions, PlaywrightTestArgs & PlaywrightTestOptions, PlaywrightWorkerArgs & PlaywrightWorkerOptions>;
703
761
  declare const commands: Commands;
@@ -4509,6 +4567,8 @@ declare const FONT_SIZE_SELECTORS: {
4509
4567
  *
4510
4568
  * colorpickerEditableInput: Selector for the color picker editable input.
4511
4569
  *
4570
+ * colorpickerEditableInputTextbox: Selector for the color picker editable input textbox.
4571
+ *
4512
4572
  * showIconCheckbox: Selector for the show icon checkbox.
4513
4573
  *
4514
4574
  * elementIdInput: Selector for the element ID input field.
@@ -4534,6 +4594,7 @@ declare const EMBED_SELECTORS: {
4534
4594
  buttonTextColorLabel: string;
4535
4595
  colorPickerTarget: string;
4536
4596
  colorpickerEditableInput: string;
4597
+ colorpickerEditableInputTextbox: string;
4537
4598
  showIconCheckbox: string;
4538
4599
  elementIdInput: string;
4539
4600
  previewElementPopupButton: string;
@@ -5450,6 +5511,21 @@ declare const TABLE_SELECTORS: {
5450
5511
  columnHeaderTitle: (columnName: string) => string;
5451
5512
  columnMenuButton: string;
5452
5513
  };
5514
+ /**
5515
+ *
5516
+ * Selectors for theme components.
5517
+ *
5518
+ * @example
5519
+ *
5520
+ * import { THEMES_SELECTORS } from "@bigbinary/neeto-playwright-commons";
5521
+ * @endexample
5522
+ * colorPickerDropdownContainer(colorHex: string): Selector for the color picker dropdown container.
5523
+ *
5524
+ */
5525
+ declare const THEMES_SELECTORS: {
5526
+ colorPickerDropdownContainer: (colorHex: string) => string;
5527
+ themeStyle: (styleType: BaseThemeStyleType) => string;
5528
+ };
5453
5529
  /**
5454
5530
  *
5455
5531
  * Function to initialize credentials of the current user in the storageState.
@@ -6200,28 +6276,6 @@ declare const currencyUtils: {
6200
6276
  * @endexample
6201
6277
  */
6202
6278
  declare const isGithubIssueOpen: (issueLinks: string[]) => Promise<boolean>;
6203
- /**
6204
- *
6205
- * This function converts a hexadecimal color code to its RGBA equivalent.
6206
- *
6207
- * hex: A string representing the hexadecimal color code to be converted to RGBA.
6208
- *
6209
- * @example
6210
- *
6211
- * import { hexToRGBA } from "@bigbinary/neeto-playwright-commons";
6212
- *
6213
- * // Convert hexadecimal color code to RGB
6214
- * const rgbaColor = hexToRGBA("#ffffff29");
6215
- *
6216
- * console.log(rgbaColor); // Output: 'rgba(255, 255, 255, 0.16)'
6217
- *
6218
- * // Convert another hexadecimal color code to RGB
6219
- * const anotherRGBAColor = hexToRGBA("#00ff00ff");
6220
- *
6221
- * console.log(anotherRGBAColor); // Output: 'rgba(0, 255, 0, 1)'
6222
- * @endexample
6223
- */
6224
- declare const hexToRGBA: (hex: string) => string;
6225
6279
  /**
6226
6280
  *
6227
6281
  * Simulates typing with a delay.
@@ -6294,4 +6348,4 @@ interface Overrides {
6294
6348
  * @endexample
6295
6349
  */
6296
6350
  declare const definePlaywrightConfig: (overrides: Overrides) => _playwright_test.PlaywrightTestConfig<{}, {}>;
6297
- export { API_ROUTES, AUDIT_LOGS_TEXTS, ApiKeysPage, AuditLogsPage, BASE_URL, 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, 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 };
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 };