@bigbinary/neeto-playwright-commons 1.27.0 → 1.27.2

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
@@ -963,6 +963,7 @@ declare class SlackApi {
963
963
  fetchMessages: (channelId: string, unixTimestamp: number) => Promise<playwright_core.APIResponse | undefined>;
964
964
  createChannel: (channelName: string) => Promise<playwright_core.APIResponse | undefined>;
965
965
  addUser: (channelId: string, userId: string) => Promise<playwright_core.APIResponse | undefined>;
966
+ mockChannelDeleted: (channelId: string) => Promise<playwright_core.APIResponse | undefined>;
966
967
  }
967
968
  declare class WebhookSiteApi {
968
969
  private readonly request;
@@ -2173,7 +2174,6 @@ declare class HelpAndProfilePage {
2173
2174
  kbDocsBaseURL,
2174
2175
  changelogBaseURL
2175
2176
  }: HelpAndProfilePageInitializerProps);
2176
- private hoverOnBody;
2177
2177
  /**
2178
2178
  *
2179
2179
  * Opens the Help Center and expects the chat button within it to be visible.
@@ -2689,6 +2689,9 @@ interface CreateNewSlackChannelParams {
2689
2689
  declare class SlackPage extends IntegrationBase {
2690
2690
  slackWebappPage: Page;
2691
2691
  slackWebappPageDataQa: (dataQa: string | [string, string]) => Locator;
2692
+ allowButton: Locator;
2693
+ callbackUrl: string;
2694
+ currentWorkspace: string;
2692
2695
  constructor({
2693
2696
  page,
2694
2697
  neetoPlaywrightUtilities,
@@ -2706,15 +2709,40 @@ declare class SlackPage extends IntegrationBase {
2706
2709
  * @endexample
2707
2710
  */
2708
2711
  setupCloseHandlers: (slackWebappPage?: Page) => Promise<void>;
2712
+ private initializeSlackPermissionPage;
2709
2713
  /**
2710
2714
  *
2711
- * Connects to slack integration and verifies the connection. It takes the following parameters:
2715
+ * Navigates the page to the captured Slack OAuth callback URL. Uses HTTP in place of HTTPS for local/dev. Call captureCallbackUrl before starting the OAuth flow so the callback URL is set. Used when running test against
2712
2716
  *
2713
- * redirectUrl: URL to redirect after connecting.
2717
+ * dev env.
2718
+ *
2719
+ * @example
2720
+ *
2721
+ * await slackPage.navigateToCallbackUrl();
2722
+ * @endexample
2723
+ */
2724
+ navigateToCallbackUrl: () => Promise<void>;
2725
+ /**
2726
+ *
2727
+ * Registers a request listener that captures the Slack OAuth callback URL when a request to /neeto_slack/api/v2/slack/callbacks is made. The URL is stored for use by navigateToCallbackUrl. Call this before starting the OAuth flow (e.g. before clicking the Slack "Allow" button in dev).
2728
+ *
2729
+ * @example
2730
+ *
2731
+ * slackPage.captureCallbackUrl();
2732
+ * @endexample
2733
+ */
2734
+ captureCallbackUrl: () => Page;
2735
+ private connectAndVerifyInDev;
2736
+ private connectAndVerifyInStaging;
2737
+ /**
2738
+ *
2739
+ * Completes the Slack OAuth flow and verifies the integration is connected. In dev, captures the callback URL and navigates to it; in staging, relies on redirect. Then configures the given channel and runs optional custom steps.
2740
+ *
2741
+ * redirectUrl: URL or pattern to wait for after OAuth redirect.
2714
2742
  *
2715
2743
  * customSteps (optional): Custom steps to perform after connection.
2716
2744
  *
2717
- * channelToConfigure (optional): Channel to configure.
2745
+ * channelToConfigure (optional): Slack channel to select in the configure step. Defaults to SLACK_DEFAULT_CHANNEL.
2718
2746
  *
2719
2747
  * @example
2720
2748
  *
@@ -2726,6 +2754,7 @@ declare class SlackPage extends IntegrationBase {
2726
2754
  * @endexample
2727
2755
  */
2728
2756
  connectAndVerifyIntegration: (redirectUrl: RedirectUrl, customSteps?: AsyncNoArgsFunction, channelToConfigure?: string) => Promise<void>;
2757
+ private completeSlackChannelSetup;
2729
2758
  /**
2730
2759
  *
2731
2760
  * Disconnects from Slack integration and verifies disconnection.
@@ -2898,17 +2927,6 @@ declare class WebhooksPage {
2898
2927
  /**
2899
2928
  * @deprecated This method is deprecated. Use getTokenViaAPI instead.
2900
2929
  */
2901
- /**
2902
- *
2903
- * Retrieves the webhook URL and token from a third-party site.
2904
- *
2905
- * Object containing webhook site URL and token.
2906
- *
2907
- * @example
2908
- *
2909
- * const { webhookSiteURL, webhookToken } = await webhooksPage.getWebhookURL();
2910
- * @endexample
2911
- */
2912
2930
  getWebhookURL: () => Promise<{
2913
2931
  webhookSiteURL: string;
2914
2932
  webhookToken: string | undefined;
@@ -4580,19 +4598,20 @@ declare class ApiKeysPage {
4580
4598
  neetoPlaywrightUtilities: CustomCommands;
4581
4599
  t: TFunction;
4582
4600
  constructor(page: Page, neetoPlaywrightUtilities: CustomCommands);
4601
+ private enableExpiryDate;
4583
4602
  /**
4584
4603
  *
4585
4604
  * Used to fill in the details for creating or editing an API key.
4586
4605
  *
4587
4606
  * label (required): The name for the API key.
4588
4607
  *
4589
- * expiryDate (optional): The day of the month for the expiry date, formatted as "dd".
4608
+ * expiryDate (optional): The expiry date for the API key, formatted as "DD/MM/YYYY".
4590
4609
  *
4591
4610
  * @example
4592
4611
  *
4593
4612
  * await apiKeysPage.fillApiKeyDetails({
4594
4613
  * label: "API Key",
4595
- * expiryDate: "15"
4614
+ * expiryDate: "08/11/2025"
4596
4615
  * });
4597
4616
  * @endexample
4598
4617
  */
@@ -4723,23 +4742,6 @@ declare class AuditLogsPage {
4723
4742
  messageBuilders: MessageBuilders;
4724
4743
  private admin;
4725
4744
  constructor(page: Page, neetoPlaywrightUtilities: CustomCommands, product?: NeetoProducts | undefined);
4726
- verifyAuditLogs: <T extends ActionDataKey>({
4727
- action,
4728
- adminName,
4729
- data
4730
- }: VerifyAuditLogProps<T>) => Promise<void>;
4731
- private assertAuditLogContent;
4732
- /**
4733
- * @deprecated This method is deprecated. Use verifyAuditLogs instead.
4734
- */
4735
- verifyDataInPane: ({}: {}) => void;
4736
- /**
4737
- * @deprecated This method is deprecated. Use verifyAuditLogs instead.
4738
- */
4739
- verifyAuditLog: ({}: {}) => Promise<void>;
4740
- /**
4741
- * @deprecated This method is deprecated. Use verifyAuditLogs instead.
4742
- */
4743
4745
  /**
4744
4746
  *
4745
4747
  * Verifies an audit log entry by building the expected message based on the action type and data, then checking that the audit log content matches the expected message and current date.
@@ -4752,13 +4754,30 @@ declare class AuditLogsPage {
4752
4754
  *
4753
4755
  * @example
4754
4756
  *
4755
- * await auditLogsPage.verifyAuditLogEntry({
4757
+ * await auditLogsPage.verifyAuditLogs({
4756
4758
  * action: ACTIONS.inviteUsers,
4757
4759
  * adminName: "Oliver Smith",
4758
4760
  * data: { emails: ["user1@example.com", "user2@example.com"] },
4759
4761
  * });
4760
4762
  * @endexample
4761
4763
  */
4764
+ verifyAuditLogs: <T extends ActionDataKey>({
4765
+ action,
4766
+ adminName,
4767
+ data
4768
+ }: VerifyAuditLogProps<T>) => Promise<void>;
4769
+ private assertAuditLogContent;
4770
+ /**
4771
+ * @deprecated This method is deprecated. Use verifyAuditLogs instead.
4772
+ */
4773
+ verifyDataInPane: ({}: {}) => void;
4774
+ /**
4775
+ * @deprecated This method is deprecated. Use verifyAuditLogs instead.
4776
+ */
4777
+ verifyAuditLog: ({}: {}) => Promise<void>;
4778
+ /**
4779
+ * @deprecated This method is deprecated. Use verifyAuditLogs instead.
4780
+ */
4762
4781
  verifyAuditLogEntry: ({}: {}) => Promise<void>;
4763
4782
  }
4764
4783
  interface CustomDomainPageProps {
@@ -5533,6 +5552,13 @@ declare const networkConditions: Record<"Slow 3G" | "Fast 3G" | "No Throttling",
5533
5552
  declare const TEAM_MEMBER_TEXTS: {
5534
5553
  emailSubject: string;
5535
5554
  };
5555
+ declare const KEYBOARD_SHORTCUT_TEST_CASES: readonly [{
5556
+ readonly os: "windows";
5557
+ readonly agent: string;
5558
+ }, {
5559
+ readonly os: "mac";
5560
+ readonly agent: string;
5561
+ }];
5536
5562
  /**
5537
5563
  *
5538
5564
  * newConversation: Text for initiating a new conversation.
@@ -6712,6 +6738,7 @@ declare const NEETO_FILTERS_SELECTORS: {
6712
6738
  *
6713
6739
  */
6714
6740
  declare const HELP_CENTER_SELECTORS: {
6741
+ helpMenuBtn: string;
6715
6742
  helpButton: string;
6716
6743
  documentationButton: string;
6717
6744
  keyboardShortcutButton: string;
@@ -7882,6 +7909,23 @@ declare const readFileSyncIfExists: ReadFileSyncIfExists;
7882
7909
  * @example
7883
7910
  *
7884
7911
  * const user = getGlobalUserState()
7912
+ *
7913
+ * console.log(userProps);
7914
+ *
7915
+ * Output:
7916
+ * {
7917
+ * firstName: 'André',
7918
+ * lastName: "O'Reilly",
7919
+ * otp: 111111,
7920
+ * domain: 'neetoform.net',
7921
+ * currentUserName: "André O'Reilly",
7922
+ * businessName: 'cpt-form-0903-0828-11339',
7923
+ * subdomainName: 'cpt-form-0903-0828-11339',
7924
+ * email: 'cpts9gnqty9+form+0903-0828-11339@bigbinary.com',
7925
+ * isLoggedIn: 'true',
7926
+ * baseUrl: 'https://cpt-form-0903-0828-11339.neetoform.net'
7927
+ * }
7928
+ *
7885
7929
  * @endexample
7886
7930
  */
7887
7931
  declare const getGlobalUserState: () => Record<string, string>;
@@ -7928,19 +7972,6 @@ declare const clearCredentials: ClearCredentials;
7928
7972
  /**
7929
7973
  * @deprecated Use hyphenate from neeto-cist instead.
7930
7974
  */
7931
- /**
7932
- *
7933
- * Used to hyphenize the strings. It takes the following parameters:
7934
- *
7935
- * input: The string that need to hyphenized.
7936
- *
7937
- * @example
7938
- *
7939
- * import {hyphenize} from "@bigbinary/neeto-playwright-commons"
7940
- * const name = hyphenize("hello world")
7941
- * console.log(name) // hello-world
7942
- * @endexample
7943
- */
7944
7975
  declare const hyphenize: Hyphenize;
7945
7976
  /**
7946
7977
  *
@@ -8806,5 +8837,5 @@ interface Overrides {
8806
8837
  * @endexample
8807
8838
  */
8808
8839
  declare const definePlaywrightConfig: (overrides: Overrides) => PlaywrightTestConfig<{}, {}>;
8809
- export { ACTIONS, ADMIN_PANEL_SELECTORS, API_KEYS_SELECTORS, API_ROUTES, AUDIT_LOGS_SELECTORS, AdminPanelPage, ApiKeysApi, ApiKeysPage, AuditLogsPage, BASE_URL, CALENDAR_LABELS, CERTIFICATE_LIMIT_EXCEEDED_MESSAGE, CERTIFICATE_LIMIT_EXCEEDED_REGEXP, CHANGELOG_WIDGET_SELECTORS, CHAT_WIDGET_SELECTORS, CHAT_WIDGET_TEXTS, COLOR, COMMON_SELECTORS, COMMON_TEXTS, COMMUNITY_TEXTS, CREDENTIALS, CURRENT_TIME_RANGES, CUSTOM_DOMAIN_SELECTORS, CUSTOM_DOMAIN_SUFFIX, CustomCommands, CustomDomainApi, CustomDomainPage, DATE_FORMATS, DATE_PICKER_SELECTORS, DATE_RANGES, DATE_TEXTS, DEFAULT_WEBHOOKS_RESPONSE_TEXT, DESCRIPTION_EDITOR_TEXTS, EMBED_SELECTORS, EMOJI_LABEL, EMPTY_STORAGE_STATE, ENGAGE_TEXTS, ENVIRONMENT, EXAMPLE_URL, EXPANDED_FONT_SIZE, EXPORT_FILE_TYPES, EditorPage, EmbedBase, FILE_FORMATS, FONT_SIZE_SELECTORS, GLOBAL_TRANSLATIONS_PATTERN, GOOGLE_ANALYTICS_SELECTORS, GOOGLE_CALENDAR_DATE_FORMAT, GOOGLE_LOGIN_SELECTORS, GOOGLE_LOGIN_TEXTS, GOOGLE_SHEETS_SELECTORS, GooglePage, HELP_CENTER_SELECTORS, HelpAndProfilePage, INTEGRATIONS_TEXTS, INTEGRATION_SELECTORS, IPRestrictionsPage, IP_RESTRICTIONS_SELECTORS, IS_DEV_ENV, IS_STAGING_ENV, ImageUploader, IntegrationBase, IpRestrictionsApi, KEYBOARD_SHORTCUTS_SELECTORS, LIST_MODIFIER_SELECTORS, LIST_MODIFIER_TAGS, LOGIN_SELECTORS, MEMBER_FORM_SELECTORS, MEMBER_SELECTORS, MEMBER_TEXTS, MERGE_TAGS_SELECTORS, MICROSOFT_LOGIN_SELECTORS, MICROSOFT_LOGIN_TEXTS, MailerUtils, Member, MemberApis, MicrosoftPage, NEETO_AUTH_BASE_URL, NEETO_EDITOR_SELECTORS, NEETO_FILTERS_SELECTORS, NEETO_IMAGE_UPLOADER_SELECTORS, NEETO_ROUTES, NEETO_SEO_SELECTORS, NEETO_TEXT_MODIFIER_SELECTORS, NeetoTowerApi, ONBOARDING_SELECTORS, ORGANIZATION_TEXTS, OTP_EMAIL_PATTERN, OrganizationPage, PAST_TIME_RANGES, PHONE_NUMBER_FORMATS, PLURAL, PROFILE_LINKS, PROFILE_SECTION_SELECTORS, PROJECT_NAMES, PROJECT_TRANSLATIONS_PATH, ROLES_SELECTORS, ROUTES, RailsEmailRakeClient, RailsEmailUtils, RoleApis, RolesPage, SIGNUP_SELECTORS, SINGULAR, SLACK_DATA_QA_SELECTORS, SLACK_DEFAULT_CHANNEL, SLACK_SELECTORS, SLACK_WEB_TEXTS, STATUS_TEXTS, STORAGE_STATE, SecurityApi, SidebarSection, SlackApi, SlackPage, TABLE_SELECTORS, TAB_SELECTORS, TAGS_SELECTORS, TEAM_MEMBER_TEXTS, TEXT_MODIFIER_ROLES, TEXT_MODIFIER_SELECTORS, TEXT_MODIFIER_TAGS, THANK_YOU_SELECTORS, THEMES_SELECTORS, THEMES_TEXTS, THIRD_PARTY_ROUTES, TIME_RANGES, TOASTR_MESSAGES, TWILIO_SELECTORS, TagsApi, TagsPage, TeamMembers, ThankYouApi, ThankYouPage, TwilioApi, USER_AGENTS, WEBHOOK_SELECTORS, WebhookSiteApi, WebhooksPage, ZAPIER_LIMIT_EXHAUSTED_MESSAGE, ZAPIER_SELECTORS, ZAPIER_TEST_EMAIL, ZAPIER_WEB_TEXTS, ZapierPage, baseURLGenerator, basicHTMLContent, clearCredentials, commands, cpuThrottlingUsingCDP, createOrganizationViaRake, currencyUtils, dataQa, decodeQRCodeFromFile, definePlaywrightConfig, executeWithThrottledResources, extractSubdomainFromError, fillCredentialsAndSubmit, filterUtils, generatePhoneNumber, generatePhoneNumberDetails, generateRandomBypassEmail, generateRandomFile, generateStagingData, getByDataQA, getClipboardContent, getFormattedPhoneNumber, getFullUrl, getGlobalUserProps, getGlobalUserState, getImagePathAndName, getIsoCodeFromPhoneCode, getListCount, globalShortcuts, grantClipboardPermissions, headerUtils, hexToRGB, hexToRGBA, hyphenize, i18nFixture, initializeCredentials, initializeTestData, initializeTotp, isGithubIssueOpen, joinHyphenCase, joinString, login, loginWithoutSSO, networkConditions, networkThrottlingUsingCDP, readFileSyncIfExists, removeCredentialFile, serializeFileForBrowser, shouldSkipCustomDomainSetup, shouldSkipSetupAndTeardown, simulateClickWithDelay, simulateTypingWithDelay, skipTest, squish, _default as stealthTest, tableUtils, toCamelCase, updateCredentials, writeDataToFile };
8840
+ export { ACTIONS, ADMIN_PANEL_SELECTORS, API_KEYS_SELECTORS, API_ROUTES, AUDIT_LOGS_SELECTORS, AdminPanelPage, ApiKeysApi, ApiKeysPage, AuditLogsPage, BASE_URL, CALENDAR_LABELS, CERTIFICATE_LIMIT_EXCEEDED_MESSAGE, CERTIFICATE_LIMIT_EXCEEDED_REGEXP, CHANGELOG_WIDGET_SELECTORS, CHAT_WIDGET_SELECTORS, CHAT_WIDGET_TEXTS, COLOR, COMMON_SELECTORS, COMMON_TEXTS, COMMUNITY_TEXTS, CREDENTIALS, CURRENT_TIME_RANGES, CUSTOM_DOMAIN_SELECTORS, CUSTOM_DOMAIN_SUFFIX, CustomCommands, CustomDomainApi, CustomDomainPage, DATE_FORMATS, DATE_PICKER_SELECTORS, DATE_RANGES, DATE_TEXTS, DEFAULT_WEBHOOKS_RESPONSE_TEXT, DESCRIPTION_EDITOR_TEXTS, EMBED_SELECTORS, EMOJI_LABEL, EMPTY_STORAGE_STATE, ENGAGE_TEXTS, ENVIRONMENT, EXAMPLE_URL, EXPANDED_FONT_SIZE, EXPORT_FILE_TYPES, EditorPage, EmbedBase, FILE_FORMATS, FONT_SIZE_SELECTORS, GLOBAL_TRANSLATIONS_PATTERN, GOOGLE_ANALYTICS_SELECTORS, GOOGLE_CALENDAR_DATE_FORMAT, GOOGLE_LOGIN_SELECTORS, GOOGLE_LOGIN_TEXTS, GOOGLE_SHEETS_SELECTORS, GooglePage, HELP_CENTER_SELECTORS, HelpAndProfilePage, INTEGRATIONS_TEXTS, INTEGRATION_SELECTORS, IPRestrictionsPage, IP_RESTRICTIONS_SELECTORS, IS_DEV_ENV, IS_STAGING_ENV, ImageUploader, IntegrationBase, IpRestrictionsApi, KEYBOARD_SHORTCUTS_SELECTORS, KEYBOARD_SHORTCUT_TEST_CASES, LIST_MODIFIER_SELECTORS, LIST_MODIFIER_TAGS, LOGIN_SELECTORS, MEMBER_FORM_SELECTORS, MEMBER_SELECTORS, MEMBER_TEXTS, MERGE_TAGS_SELECTORS, MICROSOFT_LOGIN_SELECTORS, MICROSOFT_LOGIN_TEXTS, MailerUtils, Member, MemberApis, MicrosoftPage, NEETO_AUTH_BASE_URL, NEETO_EDITOR_SELECTORS, NEETO_FILTERS_SELECTORS, NEETO_IMAGE_UPLOADER_SELECTORS, NEETO_ROUTES, NEETO_SEO_SELECTORS, NEETO_TEXT_MODIFIER_SELECTORS, NeetoTowerApi, ONBOARDING_SELECTORS, ORGANIZATION_TEXTS, OTP_EMAIL_PATTERN, OrganizationPage, PAST_TIME_RANGES, PHONE_NUMBER_FORMATS, PLURAL, PROFILE_LINKS, PROFILE_SECTION_SELECTORS, PROJECT_NAMES, PROJECT_TRANSLATIONS_PATH, ROLES_SELECTORS, ROUTES, RailsEmailRakeClient, RailsEmailUtils, RoleApis, RolesPage, SIGNUP_SELECTORS, SINGULAR, SLACK_DATA_QA_SELECTORS, SLACK_DEFAULT_CHANNEL, SLACK_SELECTORS, SLACK_WEB_TEXTS, STATUS_TEXTS, STORAGE_STATE, SecurityApi, SidebarSection, SlackApi, SlackPage, TABLE_SELECTORS, TAB_SELECTORS, TAGS_SELECTORS, TEAM_MEMBER_TEXTS, TEXT_MODIFIER_ROLES, TEXT_MODIFIER_SELECTORS, TEXT_MODIFIER_TAGS, THANK_YOU_SELECTORS, THEMES_SELECTORS, THEMES_TEXTS, THIRD_PARTY_ROUTES, TIME_RANGES, TOASTR_MESSAGES, TWILIO_SELECTORS, TagsApi, TagsPage, TeamMembers, ThankYouApi, ThankYouPage, TwilioApi, USER_AGENTS, WEBHOOK_SELECTORS, WebhookSiteApi, WebhooksPage, ZAPIER_LIMIT_EXHAUSTED_MESSAGE, ZAPIER_SELECTORS, ZAPIER_TEST_EMAIL, ZAPIER_WEB_TEXTS, ZapierPage, baseURLGenerator, basicHTMLContent, clearCredentials, commands, cpuThrottlingUsingCDP, createOrganizationViaRake, currencyUtils, dataQa, decodeQRCodeFromFile, definePlaywrightConfig, executeWithThrottledResources, extractSubdomainFromError, fillCredentialsAndSubmit, filterUtils, generatePhoneNumber, generatePhoneNumberDetails, generateRandomBypassEmail, generateRandomFile, generateStagingData, getByDataQA, getClipboardContent, getFormattedPhoneNumber, getFullUrl, getGlobalUserProps, getGlobalUserState, getImagePathAndName, getIsoCodeFromPhoneCode, getListCount, globalShortcuts, grantClipboardPermissions, headerUtils, hexToRGB, hexToRGBA, hyphenize, i18nFixture, initializeCredentials, initializeTestData, initializeTotp, isGithubIssueOpen, joinHyphenCase, joinString, login, loginWithoutSSO, networkConditions, networkThrottlingUsingCDP, readFileSyncIfExists, removeCredentialFile, serializeFileForBrowser, shouldSkipCustomDomainSetup, shouldSkipSetupAndTeardown, simulateClickWithDelay, simulateTypingWithDelay, skipTest, squish, _default as stealthTest, tableUtils, toCamelCase, updateCredentials, writeDataToFile };
8810
8841
  export type { BaseThemeStyle, BaseThemeStyleType, ColumnMenuAction, CountryProps, CustomFixture, IntroPageThemeStyle, IntroPageThemeStyleType, ProjectName, ThemeCategory, ValueOf };