@bigbinary/neeto-playwright-commons 1.11.11 → 1.11.13

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
@@ -506,6 +506,80 @@ declare const generateStagingData: (product?: string) => {
506
506
  };
507
507
  declare const _default: _playwright_test.TestType<_playwright_test.PlaywrightTestArgs & _playwright_test.PlaywrightTestOptions & Browser, _playwright_test.PlaywrightWorkerArgs & _playwright_test.PlaywrightWorkerOptions>;
508
508
  declare const i18nFixture: Fixtures<I18nPlaywrightFixture, PlaywrightWorkerArgs & PlaywrightWorkerOptions, PlaywrightTestArgs & PlaywrightTestOptions, PlaywrightWorkerArgs & PlaywrightWorkerOptions>;
509
+ declare class ThankYouPage {
510
+ page: Page;
511
+ neetoPlaywrightUtilities: CustomCommands;
512
+ t: TFunction;
513
+ constructor(page: Page, neetoPlaywrightUtilities: CustomCommands);
514
+ /**
515
+ *
516
+ * Used to navigate to the thank you page.
517
+ *
518
+ * @example
519
+ *
520
+ * await thankYouPage.navigateToThankYouPage();
521
+ * @endexample
522
+ */
523
+ navigateToThankYouPage: () => Promise<void>;
524
+ /**
525
+ *
526
+ * Used to save the changes made on the thank you page.
527
+ *
528
+ * @example
529
+ *
530
+ * await thankYouPage.saveChanges();
531
+ * @endexample
532
+ */
533
+ saveChanges: () => Promise<void>;
534
+ /**
535
+ *
536
+ * Used to verify the preview of the uploaded image.
537
+ *
538
+ * imagePath (required): The relative path to the image file.
539
+ *
540
+ * imageName (required): The name of the image file.
541
+ *
542
+ * @example
543
+ *
544
+ * await thankYouPage.verifyThankYouImage( imagePath, imageName );
545
+ * @endexample
546
+ */
547
+ verifyThankYouImage: (imagePath: string, imageName: string) => Promise<void>;
548
+ /**
549
+ *
550
+ * Used to verify the Neeto editor menu.
551
+ *
552
+ * @example
553
+ *
554
+ * await thankYouPage.verifyEditorMenu();
555
+ * @endexample
556
+ */
557
+ verifyEditorMenu: () => Promise<void>;
558
+ /**
559
+ *
560
+ * Used to verify the preview of the message.
561
+ *
562
+ * thankYouMessage (required): The message to be displayed on the thank you page.
563
+ *
564
+ * @example
565
+ *
566
+ * await thankYouPage.verifyThankYouMessage( thankYouMessage );
567
+ * @endexample
568
+ */
569
+ verifyThankYouMessage: (thankYouMessage: string) => Promise<void>;
570
+ /**
571
+ *
572
+ * Used to add an external redirect link.
573
+ *
574
+ * customRedirectUrl (required): The URL to which users will be redirected after submission or booking.
575
+ *
576
+ * @example
577
+ *
578
+ * await thankYouPage.addRedirectUrl( customRedirectUrl );
579
+ * @endexample
580
+ */
581
+ addRedirectUrl: (customRedirectUrl: string) => Promise<void>;
582
+ }
509
583
  type EmbedType = "inline" | "floatingPopup" | "elementClick";
510
584
  type GetByRoleOptions = {
511
585
  checked?: boolean;
@@ -1422,7 +1496,7 @@ declare class ZapierPage extends IntegrationBase {
1422
1496
  * await zapierPage.reconnectAccountAndPublish("your-zapier-api-key");
1423
1497
  * @endexample
1424
1498
  */
1425
- reconnectAccountAndPublish: (zapierApiKey: string) => Promise<void>;
1499
+ reconnectAccountAndPublish: (zapierApiKey: string, appName: string) => Promise<void>;
1426
1500
  /**
1427
1501
  *
1428
1502
  * Deletes all connections in zapier. It takes the following parameters:
@@ -2785,6 +2859,7 @@ declare const ROUTES: {
2785
2859
  };
2786
2860
  attachment: string;
2787
2861
  dashboard: string;
2862
+ neetoThankYou: string;
2788
2863
  };
2789
2864
  /**
2790
2865
  *
@@ -4031,6 +4106,7 @@ declare const ZAPIER_SELECTORS: {
4031
4106
  universalSidebar: string;
4032
4107
  sidebarFooter: string;
4033
4108
  contextualSideBar: string;
4109
+ iconContainer: string;
4034
4110
  };
4035
4111
  /**
4036
4112
  *
@@ -4130,6 +4206,85 @@ declare const NEETO_IMAGE_UPLOADER_SELECTORS: {
4130
4206
  widthInputField: string;
4131
4207
  heightInputField: string;
4132
4208
  };
4209
+ /**
4210
+ *
4211
+ * Selectors for thank you page components.
4212
+ *
4213
+ * @example
4214
+ *
4215
+ * import { THANK_YOU_SELECTORS } from "@bigbinary/neeto-playwright-commons";
4216
+ * @endexample
4217
+ * settingsLink: Selector for the settings link.
4218
+ *
4219
+ * showSocialShareIconsSwitch: Selector for the show social share icon switch.
4220
+ *
4221
+ * showLinkToSubmitAnotherResponseSwitch: Selector for the show link to submit another response switch.
4222
+ *
4223
+ * submitAnotherResponseLinkTextInputField: Selector for the submit another response link text input field.
4224
+ *
4225
+ * previewEditorContent: Selector for the preview editor content.
4226
+ *
4227
+ * redirectToExternalLinkRadioLabel: Selector for the redirect to external link radio label.
4228
+ *
4229
+ * saveChangesButton: Selector for the save changes button.
4230
+ *
4231
+ * cancelButton: Selector for the cancel button.
4232
+ *
4233
+ * thankYouPageImage: Selector for the thank you page image.
4234
+ *
4235
+ * thankYouPageContent: Selector for the thank you page content.
4236
+ *
4237
+ * thankYouPageResubmitLink: Selector for the thank you page resubmit link.
4238
+ *
4239
+ * linkInputField: Selector for the link input field.
4240
+ *
4241
+ */
4242
+ declare const THANK_YOU_SELECTORS: {
4243
+ settingsLink: string;
4244
+ showSocialShareIconsSwitch: string;
4245
+ showLinkToSubmitAnotherResponseSwitch: string;
4246
+ submitAnotherResponseLinkTextInputField: string;
4247
+ previewEditorContent: string;
4248
+ redirectToExternalLinkRadioLabel: () => string;
4249
+ thankYouConfigurationLabel: (label?: string) => string;
4250
+ saveChangesButton: string;
4251
+ cancelButton: string;
4252
+ thankYouPageImage: string;
4253
+ thankYouPageMessage: string;
4254
+ thankYouPageContent: string;
4255
+ thankYouPageResubmitLink: string;
4256
+ linkInputField: string;
4257
+ previewImage: string;
4258
+ };
4259
+ /**
4260
+ *
4261
+ * Selectors for tab components.
4262
+ *
4263
+ * @example
4264
+ *
4265
+ * import { TAB_SELECTORS } from "@bigbinary/neeto-playwright-commons";
4266
+ * @endexample
4267
+ * configureTab: Selector for the configure tab.
4268
+ *
4269
+ * buildTab: Selector for the build tab.
4270
+ *
4271
+ * themeTab: Selector for the theme tab.
4272
+ *
4273
+ * shareTab: Selector for the share tab.
4274
+ *
4275
+ * submissionsTab: Selector for the submissions tab.
4276
+ *
4277
+ * paymentsTab: Selector for the payments tab.
4278
+ *
4279
+ */
4280
+ declare const TAB_SELECTORS: {
4281
+ configureTab: string;
4282
+ buildTab: string;
4283
+ themeTab: string;
4284
+ shareTab: string;
4285
+ submissionsTab: string;
4286
+ paymentsTab: string;
4287
+ };
4133
4288
  /**
4134
4289
  *
4135
4290
  * newConversation: Text for initiating a new conversation.
@@ -4235,7 +4390,11 @@ declare const SLACK_WEB_TEXTS: {
4235
4390
  *
4236
4391
  * welcomeText(zapierLoginEmail): Method to generate welcome text for Zapier login.
4237
4392
  *
4238
- * connectNeetoFormStaging: Text for connecting to NeetoForm Staging.
4393
+ * connectStagingApp: Text for connecting to Staging application.
4394
+ *
4395
+ * zapierWorkflowTriggered: Text subject for the Outbound email.
4396
+ *
4397
+ * confirmPublishing: Text to confirm the publishing of the updated Zap.
4239
4398
  *
4240
4399
  */
4241
4400
  declare const ZAPIER_WEB_TEXTS: {
@@ -4261,7 +4420,9 @@ declare const ZAPIER_WEB_TEXTS: {
4261
4420
  trialEndsRegExp: string;
4262
4421
  testCurrentlyInQueue: string;
4263
4422
  welcomeText: (zapierLoginEmail: string) => string;
4264
- connectNeetoFormStaging: string;
4423
+ connectStagingApp: (appName: string) => string;
4424
+ zapierWorkflowTriggered: string;
4425
+ confirmPublishing: string;
4265
4426
  };
4266
4427
  /**
4267
4428
  *
@@ -5209,4 +5370,4 @@ interface Overrides {
5209
5370
  * @endexample
5210
5371
  */
5211
5372
  declare const definePlaywrightConfig: (overrides: Overrides) => _playwright_test.PlaywrightTestConfig<{}, {}>;
5212
- export { API_ROUTES, BASE_URL, CHANGELOG_WIDGET_SELECTORS, CHAT_WIDGET_SELECTORS, CHAT_WIDGET_TEXTS, COMMON_SELECTORS, CREDENTIALS, CustomCommands, type CustomFixture, DESCRIPTION_EDITOR_TEXTS, EMBED_SELECTORS, EMOJI_LABEL, ENVIRONMENT, EXPANDED_FONT_SIZE, EditorPage, EmbedBase, FONT_SIZE_SELECTORS, GLOBAL_TRANSLATIONS_PATTERN, GOOGLE_CALENDAR_DATE_FORMAT, 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, MailosaurUtils, 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, SELECT_COUNTRY, SIGNUP_SELECTORS, SINGULAR, SLACK_DATA_QA_SELECTORS, SLACK_DEFAULT_CHANNEL, SLACK_SELECTORS, SLACK_WEB_TEXTS, STORAGE_STATE, SidebarSection, SlackPage, TAGS_SELECTORS, TEXT_MODIFIER_ROLES, TEXT_MODIFIER_SELECTORS, TEXT_MODIFIER_TAGS, THIRD_PARTY_ROUTES, TOASTR_MESSAGES, TagsPage, TeamMembers, USER_AGENTS, 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, hyphenize, i18nFixture, initializeCredentials, initializeTotp, joinHyphenCase, joinString, login, loginWithoutSSO, memberUtils, networkConditions, networkThrottlingUsingCDP, readFileSyncIfExists, removeCredentialFile, shouldSkipSetupAndTeardown, skipTest, squish, _default as stealthTest, tableUtils, toCamelCase, updateCredentials, writeDataToFile };
5373
+ export { API_ROUTES, BASE_URL, CHANGELOG_WIDGET_SELECTORS, CHAT_WIDGET_SELECTORS, CHAT_WIDGET_TEXTS, COMMON_SELECTORS, CREDENTIALS, CustomCommands, type CustomFixture, DESCRIPTION_EDITOR_TEXTS, EMBED_SELECTORS, EMOJI_LABEL, ENVIRONMENT, EXPANDED_FONT_SIZE, EditorPage, EmbedBase, FONT_SIZE_SELECTORS, GLOBAL_TRANSLATIONS_PATTERN, GOOGLE_CALENDAR_DATE_FORMAT, 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, MailosaurUtils, 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, SELECT_COUNTRY, SIGNUP_SELECTORS, SINGULAR, SLACK_DATA_QA_SELECTORS, SLACK_DEFAULT_CHANNEL, SLACK_SELECTORS, SLACK_WEB_TEXTS, STORAGE_STATE, SidebarSection, SlackPage, 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, 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, hyphenize, i18nFixture, initializeCredentials, initializeTotp, joinHyphenCase, joinString, login, loginWithoutSSO, memberUtils, networkConditions, networkThrottlingUsingCDP, readFileSyncIfExists, removeCredentialFile, shouldSkipSetupAndTeardown, skipTest, squish, _default as stealthTest, tableUtils, toCamelCase, updateCredentials, writeDataToFile };
package/index.js CHANGED
@@ -15,7 +15,7 @@ import stealth$1 from 'puppeteer-extra-plugin-stealth';
15
15
  import Stream$4 from 'stream';
16
16
  import require$$0$4 from 'events';
17
17
  import { getI18nInstance, initI18n } from 'playwright-i18next-fixture';
18
- import { isNotPresent, isNotEmpty, humanize, hyphenate, isPresent, dynamicArray } from '@bigbinary/neeto-cist';
18
+ import { hyphenate, isNotPresent, isNotEmpty, humanize, isPresent, dynamicArray } from '@bigbinary/neeto-cist';
19
19
  import http$1 from 'http';
20
20
  import Url from 'url';
21
21
  import require$$0$5 from 'punycode';
@@ -53,6 +53,7 @@ const ROUTES = {
53
53
  },
54
54
  attachment: `/neeto_editor${BASE_URL}/direct_uploads/attach`,
55
55
  dashboard: "/dashboard",
56
+ neetoThankYou: "/neeto_thank_you_engine",
56
57
  };
57
58
  const API_ROUTES = {
58
59
  teamMembers: {
@@ -12634,6 +12635,173 @@ const i18nFixture = {
12634
12635
  },
12635
12636
  };
12636
12637
 
12638
+ const THANK_YOU_SELECTORS = {
12639
+ settingsLink: "thank-you-settings-link",
12640
+ showSocialShareIconsSwitch: "show-social-share-icons-switch",
12641
+ showLinkToSubmitAnotherResponseSwitch: "show-link-to-submit-another-response-switch",
12642
+ submitAnotherResponseLinkTextInputField: "submit-another-response-link-text-input-field",
12643
+ previewEditorContent: "preview-editor-content",
12644
+ redirectToExternalLinkRadioLabel: () => "neeto-thank-you-configuration-redirect-to-url-label",
12645
+ thankYouConfigurationLabel: (label = "custom-message") => `neeto-thank-you-configuration-${label}-label`,
12646
+ saveChangesButton: "neeto-thank-you-configuration-save-button",
12647
+ cancelButton: "neeto-thank-you-configuration-cancel-button",
12648
+ thankYouPageImage: "thank-you-page-image",
12649
+ thankYouPageMessage: "thank-you-page-message",
12650
+ thankYouPageContent: "thank-you-page-content",
12651
+ thankYouPageResubmitLink: "thank-you-page-resubmit-link",
12652
+ linkInputField: "link-input-field",
12653
+ previewImage: "preview-image",
12654
+ };
12655
+
12656
+ const optionSelector = (option) => `neeto-editor-fixed-menu-${option}-option`;
12657
+ const fixedMenuSelector = (selector) => `neeto-editor-fixed-menu-${selector}`;
12658
+
12659
+ const NEETO_EDITOR_SELECTORS = {
12660
+ fontSize: optionSelector("font-size"),
12661
+ boldOption: optionSelector("bold"),
12662
+ italicOption: optionSelector("italic"),
12663
+ underlineOption: optionSelector("underline"),
12664
+ strikeOption: optionSelector("strike"),
12665
+ codeBlockOption: optionSelector("code"),
12666
+ highlightOption: optionSelector("highlight"),
12667
+ emojiOption: optionSelector("emoji"),
12668
+ emojiDropdownIcon: "emoji-dropdown-icon",
12669
+ linkInput: fixedMenuSelector("link-option-input"),
12670
+ linkSubmitButton: fixedMenuSelector("link-option-link-button"),
12671
+ commandList: (index) => `neeto-editor-command-list-item-${index}`,
12672
+ imageUploadUrlSubmitButton: "neeto-editor-media-upload-url-submit",
12673
+ imageUploadUrlInputTextField: "neeto-editor-media-upload-url-input",
12674
+ uploadInput: "neeto-editor-media-uploader-input",
12675
+ editorMenuBarWrapper: fixedMenuSelector("wrapper"),
12676
+ undoOption: optionSelector("undo"),
12677
+ redoOption: optionSelector("redo"),
12678
+ imageWrapper: "neeto-editor-image-wrapper",
12679
+ contentField: "neeto-editor-content",
12680
+ addLinkButton: optionSelector("link"),
12681
+ addLinkTextField: "neeto-editor-add-link-text-input",
12682
+ addURLTextField: "neeto-editor-add-link-url-input",
12683
+ submitLinkButton: "neeto-editor-add-link",
12684
+ fixedMenuArrow: fixedMenuSelector("arrow"),
12685
+ cannedResponseOption: optionSelector("canned-responses"),
12686
+ cannedResponseSelectContainer: "select-a-canned-response-select-container",
12687
+ fixedMenuWrapper: fixedMenuSelector("wrapper"),
12688
+ linkOption: optionSelector("link"),
12689
+ addLinkUrlInput: "neeto-editor-add-link-url-input",
12690
+ addLinkDoneButton: "neeto-editor-add-link",
12691
+ unlinkButton: "neeto-editor-link-popover-unlink",
12692
+ editorAttachmentsButton: optionSelector("attachments"),
12693
+ attachmentPreviewDeleteButton: "neeto-editor-preview-delete-button",
12694
+ imageUploadOption: optionSelector("image-upload"),
12695
+ imageUploadLinkInput: "neeto-editor-media-upload-url-input",
12696
+ imageUploadButton: "neeto-editor-media-uploader-dnd",
12697
+ imageUploadLinkSubmitButton: "neeto-editor-media-upload-url-submit",
12698
+ applyButton: "apply-button",
12699
+ videoEmbedOption: optionSelector("video-embed"),
12700
+ videoEmbedInput: "neeto-editor-embed-input",
12701
+ videoEmbedSubmit: "neeto-editor-embed-cancel",
12702
+ videoWrapper: "neeto-editor-video-wrapper",
12703
+ paragraphOption: fixedMenuSelector("font-size-option-body2"),
12704
+ attachmentPreview: "ne-attachments-wrapper",
12705
+ imageUploadLinkButton: "neeto-editor-media-uploader-link-tab",
12706
+ errorText: "neeto-editor-error-text",
12707
+ content: "editor-content",
12708
+ imageUploadDeleteButton: "neeto-editor-image-menu-Delete",
12709
+ dynamicVariablesButton: "dynamic-variables-button",
12710
+ emojiContainer: "neeto-editor-emoji-picker",
12711
+ dynamicVariableSelector: (variable) => `dynamic-variables-list-item-${hyphenate(variable)}`,
12712
+ };
12713
+ const NEETO_TEXT_MODIFIER_SELECTORS = {
12714
+ strike: optionSelector("strike"),
12715
+ underline: optionSelector("underline"),
12716
+ highlight: optionSelector("highlight"),
12717
+ };
12718
+ const TEXT_MODIFIER_SELECTORS = {
12719
+ bold: optionSelector("bold"),
12720
+ italic: optionSelector("italic"),
12721
+ code: optionSelector("code"),
12722
+ blockquote: optionSelector("blockquote"),
12723
+ codeBlock: optionSelector("codeBlock"),
12724
+ };
12725
+ const LIST_MODIFIER_SELECTORS = {
12726
+ bulletList: optionSelector("bulletList"),
12727
+ orderedList: optionSelector("orderedList"),
12728
+ };
12729
+ const FONT_SIZE_SELECTORS = {
12730
+ h1: fixedMenuSelector("font-size-option-h1"),
12731
+ h2: fixedMenuSelector("font-size-option-h2"),
12732
+ h3: fixedMenuSelector("font-size-option-h3"),
12733
+ h4: fixedMenuSelector("font-size-option-h4"),
12734
+ h5: fixedMenuSelector("font-size-option-h5"),
12735
+ };
12736
+
12737
+ const TAB_SELECTORS = {
12738
+ configureTab: "configure-tab",
12739
+ buildTab: "build-tab",
12740
+ themeTab: "theme-tab",
12741
+ shareTab: "share-tab",
12742
+ submissionsTab: "submissions-tab",
12743
+ paymentsTab: "payments-tab",
12744
+ };
12745
+
12746
+ class ThankYouPage {
12747
+ constructor(page, neetoPlaywrightUtilities) {
12748
+ this.navigateToThankYouPage = async () => {
12749
+ await this.page.getByTestId(TAB_SELECTORS.configureTab).click();
12750
+ const fetchConfiguration = this.neetoPlaywrightUtilities.interceptMultipleResponses({
12751
+ responseUrl: ROUTES.neetoThankYou,
12752
+ });
12753
+ await this.page.getByTestId(THANK_YOU_SELECTORS.settingsLink).click();
12754
+ await fetchConfiguration;
12755
+ };
12756
+ this.saveChanges = async () => {
12757
+ const saveChangesButton = this.page.getByTestId(THANK_YOU_SELECTORS.saveChangesButton);
12758
+ await saveChangesButton.click();
12759
+ await this.neetoPlaywrightUtilities.verifyToast();
12760
+ await expect(saveChangesButton).toBeDisabled();
12761
+ };
12762
+ this.verifyThankYouImage = async (imagePath, imageName) => {
12763
+ await expect(this.page.getByTestId(THANK_YOU_SELECTORS.thankYouConfigurationLabel())).toBeChecked();
12764
+ await this.neetoPlaywrightUtilities.uploadImage(imagePath);
12765
+ await expect(this.page.getByTestId(NEETO_IMAGE_UPLOADER_SELECTORS.progressBar)).toBeHidden();
12766
+ await expect(this.page.getByTestId(NEETO_IMAGE_UPLOADER_SELECTORS.uploadedImage)).toHaveAttribute("src", RegExp(imageName), { timeout: 15000 });
12767
+ await expect(this.page.getByTestId(THANK_YOU_SELECTORS.previewImage)).toHaveAttribute("src", RegExp(imageName), { timeout: 15000 });
12768
+ };
12769
+ this.verifyEditorMenu = async () => {
12770
+ await Promise.all([
12771
+ NEETO_EDITOR_SELECTORS.fontSize,
12772
+ NEETO_EDITOR_SELECTORS.boldOption,
12773
+ NEETO_EDITOR_SELECTORS.italicOption,
12774
+ NEETO_EDITOR_SELECTORS.underlineOption,
12775
+ NEETO_EDITOR_SELECTORS.linkOption,
12776
+ NEETO_EDITOR_SELECTORS.strikeOption,
12777
+ LIST_MODIFIER_SELECTORS.bulletList,
12778
+ LIST_MODIFIER_SELECTORS.orderedList,
12779
+ TEXT_MODIFIER_SELECTORS.code,
12780
+ ].map(editorElement => expect(this.page
12781
+ .getByTestId(NEETO_EDITOR_SELECTORS.fixedMenuWrapper)
12782
+ .getByTestId(editorElement)).toBeVisible()));
12783
+ };
12784
+ this.verifyThankYouMessage = async (thankYouMessage) => {
12785
+ await this.page.getByTestId(NEETO_EDITOR_SELECTORS.contentField).clear();
12786
+ await this.page
12787
+ .getByTestId(NEETO_EDITOR_SELECTORS.contentField)
12788
+ .fill(thankYouMessage);
12789
+ await expect(this.page.getByTestId(THANK_YOU_SELECTORS.previewEditorContent)).toContainText(thankYouMessage);
12790
+ };
12791
+ this.addRedirectUrl = async (customRedirectUrl) => {
12792
+ await this.page
12793
+ .getByTestId(THANK_YOU_SELECTORS.thankYouConfigurationLabel("redirect-to-url"))
12794
+ .click();
12795
+ await this.page
12796
+ .getByTestId(THANK_YOU_SELECTORS.linkInputField)
12797
+ .fill(customRedirectUrl);
12798
+ };
12799
+ this.page = page;
12800
+ this.neetoPlaywrightUtilities = neetoPlaywrightUtilities;
12801
+ this.t = getI18nInstance().t;
12802
+ }
12803
+ }
12804
+
12637
12805
  const EMBED_SELECTORS = {
12638
12806
  iframe: (appName) => `#${appName}-iframe`,
12639
12807
  modal: (appName) => `#${appName}-modal`,
@@ -12901,7 +13069,9 @@ const ZAPIER_WEB_TEXTS = {
12901
13069
  trialEndsRegExp: "Trial ends on",
12902
13070
  testCurrentlyInQueue: "Test currently in queue",
12903
13071
  welcomeText: (zapierLoginEmail) => `Welcome back ${zapierLoginEmail}`,
12904
- connectNeetoFormStaging: "Connect neetoForm Staging",
13072
+ connectStagingApp: (appName) => `Connect ${appName} Staging`,
13073
+ zapierWorkflowTriggered: "Zapier Workflow Triggered",
13074
+ confirmPublishing: "Confirm Publishing",
12905
13075
  };
12906
13076
  const TOASTR_MESSAGES = {
12907
13077
  zapierApiKeyGenerated: "Zapier API key is generated successfully!",
@@ -15473,6 +15643,7 @@ const ZAPIER_SELECTORS = {
15473
15643
  universalSidebar: "[data-testid='universalSidebar']",
15474
15644
  sidebarFooter: "css=[class$=InAppSidebarFooter__footerWrapper]",
15475
15645
  contextualSideBar: "[data-testid='contextual-sidebar']",
15646
+ iconContainer: "[data-testid='iconContainer']",
15476
15647
  };
15477
15648
 
15478
15649
  class ZapierPage extends IntegrationBase {
@@ -15506,7 +15677,7 @@ class ZapierPage extends IntegrationBase {
15506
15677
  });
15507
15678
  await this.zapierWebPage.close();
15508
15679
  };
15509
- this.reconnectAccountAndPublish = async (zapierApiKey) => {
15680
+ this.reconnectAccountAndPublish = async (zapierApiKey, appName) => {
15510
15681
  var _a;
15511
15682
  await this.zapierWebPage.goto(THIRD_PARTY_ROUTES.zapier.zapEditor(process.env.ZAP_ID));
15512
15683
  await this.zapierWebPage
@@ -15520,7 +15691,9 @@ class ZapierPage extends IntegrationBase {
15520
15691
  }
15521
15692
  const signInPagePromise = this.zapierWebPage.waitForEvent("popup");
15522
15693
  await this.zapierWebPage
15523
- .getByRole("button", { name: ZAPIER_WEB_TEXTS.connectNeetoFormStaging })
15694
+ .getByRole("button", {
15695
+ name: ZAPIER_WEB_TEXTS.connectStagingApp(appName),
15696
+ })
15524
15697
  .click();
15525
15698
  const signInPage = await signInPagePromise;
15526
15699
  await signInPage.waitForLoadState();
@@ -15560,9 +15733,10 @@ class ZapierPage extends IntegrationBase {
15560
15733
  .getByRole("button", {
15561
15734
  name: ZAPIER_WEB_TEXTS.continueWithSelectedRecord,
15562
15735
  })
15563
- .click({ timeout: 20000 });
15564
- await this.continueButton.click();
15565
- await this.continueButton.click();
15736
+ .click({ timeout: 30000 });
15737
+ await this.continueButton.click({ timeout: 20000 });
15738
+ await expect(this.zapierWebPage.getByText(ZAPIER_WEB_TEXTS.zapierWorkflowTriggered)).toBeVisible();
15739
+ await this.continueButton.click({ timeout: 20000 });
15566
15740
  await this.zapierWebPage
15567
15741
  .getByLabel(ZAPIER_WEB_TEXTS.publish, { exact: true })
15568
15742
  .or(this.zapierWebPage
@@ -15570,11 +15744,16 @@ class ZapierPage extends IntegrationBase {
15570
15744
  .getByRole("button", { name: ZAPIER_WEB_TEXTS.publish }))
15571
15745
  .click({ timeout: 20000 });
15572
15746
  await this.zapierWebPage
15747
+ .getByRole("button", { name: ZAPIER_WEB_TEXTS.confirmPublishing })
15748
+ .or(this.zapierWebPage
15573
15749
  .locator(ZAPIER_SELECTORS.modal)
15574
15750
  .getByLabel(ZAPIER_WEB_TEXTS.publish)
15575
15751
  .or(this.zapierWebPage
15576
15752
  .locator(ZAPIER_SELECTORS.modal)
15577
- .getByRole("button", { name: ZAPIER_WEB_TEXTS.publish, exact: true }))
15753
+ .getByRole("button", {
15754
+ name: ZAPIER_WEB_TEXTS.publish,
15755
+ exact: true,
15756
+ })))
15578
15757
  .click();
15579
15758
  await this.zapierWebPage
15580
15759
  .getByLabel(ZAPIER_WEB_TEXTS.publishingZapHeading)
@@ -15713,87 +15892,6 @@ const LIST_MODIFIER_TAGS = {
15713
15892
  orderedList: "ol",
15714
15893
  };
15715
15894
 
15716
- const optionSelector = (option) => `neeto-editor-fixed-menu-${option}-option`;
15717
- const fixedMenuSelector = (selector) => `neeto-editor-fixed-menu-${selector}`;
15718
-
15719
- const NEETO_EDITOR_SELECTORS = {
15720
- fontSize: optionSelector("font-size"),
15721
- boldOption: optionSelector("bold"),
15722
- italicOption: optionSelector("italic"),
15723
- underlineOption: optionSelector("underline"),
15724
- strikeOption: optionSelector("strike"),
15725
- codeBlockOption: optionSelector("code"),
15726
- highlightOption: optionSelector("highlight"),
15727
- emojiOption: optionSelector("emoji"),
15728
- emojiDropdownIcon: "emoji-dropdown-icon",
15729
- linkInput: fixedMenuSelector("link-option-input"),
15730
- linkSubmitButton: fixedMenuSelector("link-option-link-button"),
15731
- commandList: (index) => `neeto-editor-command-list-item-${index}`,
15732
- imageUploadUrlSubmitButton: "neeto-editor-media-upload-url-submit",
15733
- imageUploadUrlInputTextField: "neeto-editor-media-upload-url-input",
15734
- uploadInput: "neeto-editor-media-uploader-input",
15735
- editorMenuBarWrapper: fixedMenuSelector("wrapper"),
15736
- undoOption: optionSelector("undo"),
15737
- redoOption: optionSelector("redo"),
15738
- imageWrapper: "neeto-editor-image-wrapper",
15739
- contentField: "neeto-editor-content",
15740
- addLinkButton: optionSelector("link"),
15741
- addLinkTextField: "neeto-editor-add-link-text-input",
15742
- addURLTextField: "neeto-editor-add-link-url-input",
15743
- submitLinkButton: "neeto-editor-add-link",
15744
- fixedMenuArrow: fixedMenuSelector("arrow"),
15745
- cannedResponseOption: optionSelector("canned-responses"),
15746
- cannedResponseSelectContainer: "select-a-canned-response-select-container",
15747
- fixedMenuWrapper: fixedMenuSelector("wrapper"),
15748
- linkOption: optionSelector("link"),
15749
- addLinkUrlInput: "neeto-editor-add-link-url-input",
15750
- addLinkDoneButton: "neeto-editor-add-link",
15751
- unlinkButton: "neeto-editor-link-popover-unlink",
15752
- editorAttachmentsButton: optionSelector("attachments"),
15753
- attachmentPreviewDeleteButton: "neeto-editor-preview-delete-button",
15754
- imageUploadOption: optionSelector("image-upload"),
15755
- imageUploadLinkInput: "neeto-editor-media-upload-url-input",
15756
- imageUploadButton: "neeto-editor-media-uploader-dnd",
15757
- imageUploadLinkSubmitButton: "neeto-editor-media-upload-url-submit",
15758
- applyButton: "apply-button",
15759
- videoEmbedOption: optionSelector("video-embed"),
15760
- videoEmbedInput: "neeto-editor-embed-input",
15761
- videoEmbedSubmit: "neeto-editor-embed-cancel",
15762
- videoWrapper: "neeto-editor-video-wrapper",
15763
- paragraphOption: fixedMenuSelector("font-size-option-body2"),
15764
- attachmentPreview: "ne-attachments-wrapper",
15765
- imageUploadLinkButton: "neeto-editor-media-uploader-link-tab",
15766
- errorText: "neeto-editor-error-text",
15767
- content: "editor-content",
15768
- imageUploadDeleteButton: "neeto-editor-image-menu-Delete",
15769
- dynamicVariablesButton: "dynamic-variables-button",
15770
- emojiContainer: "neeto-editor-emoji-picker",
15771
- dynamicVariableSelector: (variable) => `dynamic-variables-list-item-${hyphenate(variable)}`,
15772
- };
15773
- const NEETO_TEXT_MODIFIER_SELECTORS = {
15774
- strike: optionSelector("strike"),
15775
- underline: optionSelector("underline"),
15776
- highlight: optionSelector("highlight"),
15777
- };
15778
- const TEXT_MODIFIER_SELECTORS = {
15779
- bold: optionSelector("bold"),
15780
- italic: optionSelector("italic"),
15781
- code: optionSelector("code"),
15782
- blockquote: optionSelector("blockquote"),
15783
- codeBlock: optionSelector("codeBlock"),
15784
- };
15785
- const LIST_MODIFIER_SELECTORS = {
15786
- bulletList: optionSelector("bulletList"),
15787
- orderedList: optionSelector("orderedList"),
15788
- };
15789
- const FONT_SIZE_SELECTORS = {
15790
- h1: fixedMenuSelector("font-size-option-h1"),
15791
- h2: fixedMenuSelector("font-size-option-h2"),
15792
- h3: fixedMenuSelector("font-size-option-h3"),
15793
- h4: fixedMenuSelector("font-size-option-h4"),
15794
- h5: fixedMenuSelector("font-size-option-h5"),
15795
- };
15796
-
15797
15895
  class EditorPage {
15798
15896
  constructor(page, neetoPlaywrightUtilities, editorWrapper) {
15799
15897
  this.linkUrl = faker.internet.url();
@@ -149069,5 +149167,5 @@ const definePlaywrightConfig = (overrides) => {
149069
149167
  });
149070
149168
  };
149071
149169
 
149072
- export { API_ROUTES, BASE_URL, CHANGELOG_WIDGET_SELECTORS, CHAT_WIDGET_SELECTORS, CHAT_WIDGET_TEXTS, COMMON_SELECTORS, CREDENTIALS, CustomCommands, DESCRIPTION_EDITOR_TEXTS, EMBED_SELECTORS, EMOJI_LABEL, ENVIRONMENT, EXPANDED_FONT_SIZE, EditorPage, EmbedBase, FONT_SIZE_SELECTORS, GLOBAL_TRANSLATIONS_PATTERN, GOOGLE_CALENDAR_DATE_FORMAT, 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, MailosaurUtils, 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, SELECT_COUNTRY, SIGNUP_SELECTORS, SINGULAR, SLACK_DATA_QA_SELECTORS, SLACK_DEFAULT_CHANNEL, SLACK_SELECTORS, SLACK_WEB_TEXTS, STORAGE_STATE, SidebarSection, SlackPage, TAGS_SELECTORS, TEXT_MODIFIER_ROLES, TEXT_MODIFIER_SELECTORS, TEXT_MODIFIER_TAGS, THIRD_PARTY_ROUTES, TOASTR_MESSAGES, TagsPage, TeamMembers, USER_AGENTS, 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, hyphenize, i18nFixture, initializeCredentials, initializeTotp, joinHyphenCase, joinString, login, loginWithoutSSO, memberUtils, networkConditions, networkThrottlingUsingCDP, readFileSyncIfExists, removeCredentialFile, shouldSkipSetupAndTeardown, skipTest, squish, stealth as stealthTest, tableUtils, toCamelCase, updateCredentials, writeDataToFile };
149170
+ export { API_ROUTES, BASE_URL, CHANGELOG_WIDGET_SELECTORS, CHAT_WIDGET_SELECTORS, CHAT_WIDGET_TEXTS, COMMON_SELECTORS, CREDENTIALS, CustomCommands, DESCRIPTION_EDITOR_TEXTS, EMBED_SELECTORS, EMOJI_LABEL, ENVIRONMENT, EXPANDED_FONT_SIZE, EditorPage, EmbedBase, FONT_SIZE_SELECTORS, GLOBAL_TRANSLATIONS_PATTERN, GOOGLE_CALENDAR_DATE_FORMAT, 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, MailosaurUtils, 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, SELECT_COUNTRY, SIGNUP_SELECTORS, SINGULAR, SLACK_DATA_QA_SELECTORS, SLACK_DEFAULT_CHANNEL, SLACK_SELECTORS, SLACK_WEB_TEXTS, STORAGE_STATE, SidebarSection, SlackPage, 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, 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, hyphenize, i18nFixture, initializeCredentials, initializeTotp, joinHyphenCase, joinString, login, loginWithoutSSO, memberUtils, networkConditions, networkThrottlingUsingCDP, readFileSyncIfExists, removeCredentialFile, shouldSkipSetupAndTeardown, skipTest, squish, stealth as stealthTest, tableUtils, toCamelCase, updateCredentials, writeDataToFile };
149073
149171
  //# sourceMappingURL=index.js.map