@bigbinary/neeto-playwright-commons 1.12.11 → 1.13.1
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/configs/scripts/jsdoc-builder/utils.mjs +1 -1
- package/index.cjs.js +523 -497
- package/index.cjs.js.map +1 -1
- package/index.d.ts +766 -719
- package/index.js +522 -498
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var fs$d = require('fs');
|
|
4
4
|
var Path = require('path');
|
|
5
|
-
var child_process = require('child_process');
|
|
6
5
|
var test$1 = require('@playwright/test');
|
|
6
|
+
var child_process = require('child_process');
|
|
7
7
|
var ramda = require('ramda');
|
|
8
8
|
var require$$0$1 = require('util');
|
|
9
9
|
var faker = require('@faker-js/faker');
|
|
@@ -81,6 +81,7 @@ const API_ROUTES = {
|
|
|
81
81
|
bulkUpdate: "/team_members/teams/bulk_update",
|
|
82
82
|
index: "/team_members/teams",
|
|
83
83
|
show: (id) => `/team_members/teams/${id}`,
|
|
84
|
+
creationStatus: (id) => `/team_members/teams/creation_status/${id}`,
|
|
84
85
|
},
|
|
85
86
|
integrations: {
|
|
86
87
|
zapier: {
|
|
@@ -131,7 +132,7 @@ const CREDENTIALS = {
|
|
|
131
132
|
};
|
|
132
133
|
const OTP_EMAIL_PATTERN = "is your login code";
|
|
133
134
|
const SLACK_DEFAULT_CHANNEL = "general";
|
|
134
|
-
const ZAPIER_TEST_EMAIL = (product) => `neeto-${product}-zapier-test@${process.env.
|
|
135
|
+
const ZAPIER_TEST_EMAIL = (product) => `neeto-${product}-zapier-test@${process.env.FASTMAIL_DOMAIN_NAME}`;
|
|
135
136
|
// constants for translation
|
|
136
137
|
const SINGULAR = { count: 1 };
|
|
137
138
|
const PLURAL = { count: 2 };
|
|
@@ -234,54 +235,6 @@ const getListCount = async ({ page, countSelector, }) => {
|
|
|
234
235
|
return Number(countText === null || countText === void 0 ? void 0 : countText.trim().split(" ")[0]);
|
|
235
236
|
};
|
|
236
237
|
|
|
237
|
-
const NEETO_FILTERS_SELECTORS = {
|
|
238
|
-
emailSelectContainer: "email-select-container-wrapper",
|
|
239
|
-
filterPaneHeading: "neeto-filters-pane-header",
|
|
240
|
-
neetoFiltersEmailBlock: "neeto-filters-email-block",
|
|
241
|
-
neetoFiltersRoleBlock: "neeto-filters-role-block",
|
|
242
|
-
neetoFiltersBarClearButton: "neeto-filters-bar-clear-btn",
|
|
243
|
-
neetoFiltersNameFilterField: "neeto-filters-name-filter",
|
|
244
|
-
neetoFilterNameBlock: "neeto-filters-name-block",
|
|
245
|
-
roleSelectContainer: "role-select-container-wrapper",
|
|
246
|
-
filterButton: "neeto-filters-toggle-btn",
|
|
247
|
-
filtersClearButton: "neeto-filters-clear-btn",
|
|
248
|
-
filterDoneButton: "neeto-filters-done-btn",
|
|
249
|
-
filteredMembersCount: "ntm-filtered-members-count",
|
|
250
|
-
allMenubarBlock: "ntm-members-menubar-all-block",
|
|
251
|
-
filtersEmailFilter: "neeto-filters-email-filter",
|
|
252
|
-
paneModalCrossIcon: "neeto-filters-close-button",
|
|
253
|
-
searchTermBlock: "neeto-filters-search-term-block",
|
|
254
|
-
neetoFiltersFilter: (filterName) => `neeto-filters-${hyphenize(filterName)}-filter`,
|
|
255
|
-
};
|
|
256
|
-
|
|
257
|
-
const NEETO_IMAGE_UPLOADER_SELECTORS = {
|
|
258
|
-
imageUploaderWrapper: "image-uploader-wrapper",
|
|
259
|
-
browseText: "neeto-image-uploader-browse-text",
|
|
260
|
-
fileInput: "neeto-image-uploader-file-input",
|
|
261
|
-
uploadedImage: "uploaded-image",
|
|
262
|
-
uploadNewAsset: "upload-new-asset",
|
|
263
|
-
basicImageUploaderRemoveButton: "basic-image-uploader-remove-button",
|
|
264
|
-
removeButton: "image-uploader-remove-button",
|
|
265
|
-
openImageLibraryButton: "image-uploader-open-image-library-button",
|
|
266
|
-
openAssetLibraryButton: "open-asset-library-button",
|
|
267
|
-
imageEditorBackButton: "image-editor-back-button",
|
|
268
|
-
aspectRatioWidthInput: "aspect-ratio-width-input",
|
|
269
|
-
aspectRatioHeightInput: "aspect-ratio-height-input",
|
|
270
|
-
cropSubmitButton: "neeto-image-uploader-crop-submit-button",
|
|
271
|
-
restrictionMessage: "neeto-image-uploader-restriction-message",
|
|
272
|
-
progressBar: "neeto-image-uploader-progress-bar",
|
|
273
|
-
myImagesTab: "neeto-image-uploader-my-images-tab",
|
|
274
|
-
unsplashTab: "neeto-image-uploader-unsplash-tab",
|
|
275
|
-
nthLibraryImage: (index) => `niu-library-image-${index}`,
|
|
276
|
-
nthUnsplashImage: (index) => `niu-unsplash-image-${index}`,
|
|
277
|
-
unsplashSearchInput: "niu-unsplash-image-picker-search-input",
|
|
278
|
-
imageEditorUploadedImage: "image-editor-uploaded-image",
|
|
279
|
-
selectOriginalImageSwitch: "select-original-image-switch",
|
|
280
|
-
lockAspectRatioSwitch: "lock-aspect-ratio-switch",
|
|
281
|
-
widthInputField: "width-input-field",
|
|
282
|
-
heightInputField: "height-input-field",
|
|
283
|
-
};
|
|
284
|
-
|
|
285
238
|
const COMMON_SELECTORS = {
|
|
286
239
|
emailInputError: "email-input-error",
|
|
287
240
|
pane: "pane-wrapper",
|
|
@@ -374,6 +327,429 @@ const COMMON_SELECTORS = {
|
|
|
374
327
|
customDropDownMenu: (label = "nui") => `${hyphenize(label)}-select-menu`,
|
|
375
328
|
};
|
|
376
329
|
|
|
330
|
+
const THANK_YOU_SELECTORS = {
|
|
331
|
+
settingsLink: "thank-you-settings-link",
|
|
332
|
+
showSocialShareIconsSwitch: "show-social-share-icons-switch",
|
|
333
|
+
showLinkToSubmitAnotherResponseSwitch: "show-link-to-submit-another-response-switch",
|
|
334
|
+
submitAnotherResponseLinkTextInputField: "submit-another-response-link-text-input-field",
|
|
335
|
+
previewEditorContent: "preview-editor-content",
|
|
336
|
+
redirectToExternalLinkRadioLabel: () => "neeto-thank-you-configuration-redirect-to-url-label",
|
|
337
|
+
thankYouConfigurationLabel: (label = "custom-message") => `neeto-thank-you-configuration-${label}-label`,
|
|
338
|
+
saveChangesButton: "neeto-thank-you-configuration-save-button",
|
|
339
|
+
cancelButton: "neeto-thank-you-configuration-cancel-button",
|
|
340
|
+
thankYouPageImage: "thank-you-page-image",
|
|
341
|
+
thankYouPageMessage: "thank-you-page-message",
|
|
342
|
+
thankYouPageContent: "thank-you-page-content",
|
|
343
|
+
thankYouPageResubmitLink: "thank-you-page-resubmit-link",
|
|
344
|
+
linkInputField: "link-input-field",
|
|
345
|
+
previewImage: "preview-image",
|
|
346
|
+
};
|
|
347
|
+
|
|
348
|
+
const optionSelector = (option) => `neeto-editor-fixed-menu-${option}-option`;
|
|
349
|
+
const fixedMenuSelector = (selector) => `neeto-editor-fixed-menu-${selector}`;
|
|
350
|
+
|
|
351
|
+
const NEETO_EDITOR_SELECTORS = {
|
|
352
|
+
fontSize: optionSelector("font-size"),
|
|
353
|
+
boldOption: optionSelector("bold"),
|
|
354
|
+
italicOption: optionSelector("italic"),
|
|
355
|
+
underlineOption: optionSelector("underline"),
|
|
356
|
+
strikeOption: optionSelector("strike"),
|
|
357
|
+
codeBlockOption: optionSelector("code"),
|
|
358
|
+
highlightOption: optionSelector("highlight"),
|
|
359
|
+
emojiOption: optionSelector("emoji"),
|
|
360
|
+
emojiDropdownIcon: "emoji-dropdown-icon",
|
|
361
|
+
linkInput: fixedMenuSelector("link-option-input"),
|
|
362
|
+
linkSubmitButton: fixedMenuSelector("link-option-link-button"),
|
|
363
|
+
commandList: (index) => `neeto-editor-command-list-item-${index}`,
|
|
364
|
+
imageUploadUrlSubmitButton: "neeto-editor-media-upload-url-submit",
|
|
365
|
+
imageUploadUrlInputTextField: "neeto-editor-media-upload-url-input",
|
|
366
|
+
uploadInput: "neeto-editor-media-uploader-input",
|
|
367
|
+
editorMenuBarWrapper: fixedMenuSelector("wrapper"),
|
|
368
|
+
undoOption: optionSelector("undo"),
|
|
369
|
+
redoOption: optionSelector("redo"),
|
|
370
|
+
imageWrapper: "neeto-editor-image-wrapper",
|
|
371
|
+
contentField: "neeto-editor-content",
|
|
372
|
+
addLinkButton: optionSelector("link"),
|
|
373
|
+
addLinkTextField: "neeto-editor-add-link-text-input",
|
|
374
|
+
addURLTextField: "neeto-editor-add-link-url-input",
|
|
375
|
+
submitLinkButton: "neeto-editor-add-link",
|
|
376
|
+
fixedMenuArrow: fixedMenuSelector("arrow"),
|
|
377
|
+
cannedResponseOption: optionSelector("canned-responses"),
|
|
378
|
+
cannedResponseSelectContainer: "select-a-canned-response-select-container",
|
|
379
|
+
fixedMenuWrapper: fixedMenuSelector("wrapper"),
|
|
380
|
+
linkOption: optionSelector("link"),
|
|
381
|
+
addLinkUrlInput: "neeto-editor-add-link-url-input",
|
|
382
|
+
addLinkDoneButton: "neeto-editor-add-link",
|
|
383
|
+
unlinkButton: "neeto-editor-link-popover-unlink",
|
|
384
|
+
editorAttachmentsButton: optionSelector("attachments"),
|
|
385
|
+
attachmentPreviewDeleteButton: "neeto-editor-preview-delete-button",
|
|
386
|
+
imageUploadOption: optionSelector("image-upload"),
|
|
387
|
+
imageUploadLinkInput: "neeto-editor-media-upload-url-input",
|
|
388
|
+
imageUploadButton: "neeto-editor-media-uploader-dnd",
|
|
389
|
+
imageUploadLinkSubmitButton: "neeto-editor-media-upload-url-submit",
|
|
390
|
+
applyButton: "apply-button",
|
|
391
|
+
videoEmbedOption: optionSelector("video-embed"),
|
|
392
|
+
videoEmbedInput: "neeto-editor-embed-input",
|
|
393
|
+
videoEmbedSubmit: "neeto-editor-embed-cancel",
|
|
394
|
+
videoWrapper: "neeto-editor-video-wrapper",
|
|
395
|
+
paragraphOption: fixedMenuSelector("font-size-option-body2"),
|
|
396
|
+
attachmentPreview: "ne-attachments-wrapper",
|
|
397
|
+
imageUploadLinkButton: "neeto-editor-media-uploader-link-tab",
|
|
398
|
+
errorText: "neeto-editor-error-text",
|
|
399
|
+
content: "editor-content",
|
|
400
|
+
imageUploadDeleteButton: "neeto-editor-image-menu-Delete",
|
|
401
|
+
dynamicVariablesButton: "dynamic-variables-button",
|
|
402
|
+
emojiContainer: "neeto-editor-emoji-picker",
|
|
403
|
+
dynamicVariableSelector: (variable) => `dynamic-variables-list-item-${variable}`,
|
|
404
|
+
};
|
|
405
|
+
const NEETO_TEXT_MODIFIER_SELECTORS = {
|
|
406
|
+
strike: optionSelector("strike"),
|
|
407
|
+
underline: optionSelector("underline"),
|
|
408
|
+
highlight: optionSelector("highlight"),
|
|
409
|
+
};
|
|
410
|
+
const TEXT_MODIFIER_SELECTORS = {
|
|
411
|
+
bold: optionSelector("bold"),
|
|
412
|
+
italic: optionSelector("italic"),
|
|
413
|
+
code: optionSelector("code"),
|
|
414
|
+
blockquote: optionSelector("blockquote"),
|
|
415
|
+
codeBlock: optionSelector("codeBlock"),
|
|
416
|
+
};
|
|
417
|
+
const LIST_MODIFIER_SELECTORS = {
|
|
418
|
+
bulletList: optionSelector("bulletList"),
|
|
419
|
+
orderedList: optionSelector("orderedList"),
|
|
420
|
+
};
|
|
421
|
+
const FONT_SIZE_SELECTORS = {
|
|
422
|
+
h1: fixedMenuSelector("font-size-option-h1"),
|
|
423
|
+
h2: fixedMenuSelector("font-size-option-h2"),
|
|
424
|
+
h3: fixedMenuSelector("font-size-option-h3"),
|
|
425
|
+
h4: fixedMenuSelector("font-size-option-h4"),
|
|
426
|
+
h5: fixedMenuSelector("font-size-option-h5"),
|
|
427
|
+
};
|
|
428
|
+
|
|
429
|
+
const EMBED_SELECTORS = {
|
|
430
|
+
iframe: (appName) => `#${appName}-iframe`,
|
|
431
|
+
modal: (appName) => `#${appName}-modal`,
|
|
432
|
+
close: (appName) => `#close-${appName}`,
|
|
433
|
+
loader: (appName) => `#${appName}-loader`,
|
|
434
|
+
inlineHeightInput: "inline-height-input-field",
|
|
435
|
+
inlineWidthInput: "inline-width-input-field",
|
|
436
|
+
inlineElementIdInput: "inline-element-id-input-field",
|
|
437
|
+
codeBlock: "code-block",
|
|
438
|
+
previewTab: "preview-tab",
|
|
439
|
+
htmlTab: "html-tab",
|
|
440
|
+
buttonTextInput: "button-text-input-field",
|
|
441
|
+
buttonPositionSelectContainer: "button-position-select-value-container",
|
|
442
|
+
buttonPositionSelectMenu: "button-position-select-menu",
|
|
443
|
+
buttonColorLabel: "button-color-label",
|
|
444
|
+
buttonTextColorLabel: "button-text-color-label",
|
|
445
|
+
colorPickerTarget: "color-picker-target",
|
|
446
|
+
colorpickerEditableInput: "colorpicker-editable-input",
|
|
447
|
+
showIconCheckbox: "show-icon-checkbox",
|
|
448
|
+
elementIdInput: "element-id-input-field",
|
|
449
|
+
previewElementPopupButton: "preview-element-popup-button",
|
|
450
|
+
};
|
|
451
|
+
|
|
452
|
+
const NEETO_FILTERS_SELECTORS = {
|
|
453
|
+
emailSelectContainer: "email-select-container-wrapper",
|
|
454
|
+
filterPaneHeading: "neeto-filters-pane-header",
|
|
455
|
+
neetoFiltersEmailBlock: "neeto-filters-email-block",
|
|
456
|
+
neetoFiltersRoleBlock: "neeto-filters-role-block",
|
|
457
|
+
neetoFiltersBarClearButton: "neeto-filters-bar-clear-btn",
|
|
458
|
+
neetoFiltersNameFilterField: "neeto-filters-name-filter",
|
|
459
|
+
neetoFilterNameBlock: "neeto-filters-name-block",
|
|
460
|
+
roleSelectContainer: "role-select-container-wrapper",
|
|
461
|
+
filterButton: "neeto-filters-toggle-btn",
|
|
462
|
+
filtersClearButton: "neeto-filters-clear-btn",
|
|
463
|
+
filterDoneButton: "neeto-filters-done-btn",
|
|
464
|
+
filteredMembersCount: "ntm-filtered-members-count",
|
|
465
|
+
allMenubarBlock: "ntm-members-menubar-all-block",
|
|
466
|
+
filtersEmailFilter: "neeto-filters-email-filter",
|
|
467
|
+
paneModalCrossIcon: "neeto-filters-close-button",
|
|
468
|
+
searchTermBlock: "neeto-filters-search-term-block",
|
|
469
|
+
neetoFiltersFilter: (filterName) => `neeto-filters-${hyphenize(filterName)}-filter`,
|
|
470
|
+
};
|
|
471
|
+
|
|
472
|
+
const HELP_CENTER_SELECTORS = {
|
|
473
|
+
helpButton: "help-button",
|
|
474
|
+
documentationButton: "help-link-help-center-button",
|
|
475
|
+
keyboardShortcutButton: "help-link-keyboard-shortcut-button",
|
|
476
|
+
chatButton: "help-link-live-chat-button",
|
|
477
|
+
whatsNewButton: "help-link-engage-button",
|
|
478
|
+
whatsNewWidgetInfo: "h1",
|
|
479
|
+
whatsNewWidgetCloseButton: ".ne-widget-header__btn",
|
|
480
|
+
keyboardShortcutPaneHeading: "keyboard-shortcuts-pane-title",
|
|
481
|
+
keyboardShortcutPaneCrossIcon: "keyboard-shortcuts-pane-close-button",
|
|
482
|
+
};
|
|
483
|
+
|
|
484
|
+
const NEETO_IMAGE_UPLOADER_SELECTORS = {
|
|
485
|
+
imageUploaderWrapper: "image-uploader-wrapper",
|
|
486
|
+
browseText: "neeto-image-uploader-browse-text",
|
|
487
|
+
fileInput: "neeto-image-uploader-file-input",
|
|
488
|
+
uploadedImage: "uploaded-image",
|
|
489
|
+
uploadNewAsset: "upload-new-asset",
|
|
490
|
+
basicImageUploaderRemoveButton: "basic-image-uploader-remove-button",
|
|
491
|
+
removeButton: "image-uploader-remove-button",
|
|
492
|
+
openImageLibraryButton: "image-uploader-open-image-library-button",
|
|
493
|
+
openAssetLibraryButton: "open-asset-library-button",
|
|
494
|
+
imageEditorBackButton: "image-editor-back-button",
|
|
495
|
+
aspectRatioWidthInput: "aspect-ratio-width-input",
|
|
496
|
+
aspectRatioHeightInput: "aspect-ratio-height-input",
|
|
497
|
+
cropSubmitButton: "neeto-image-uploader-crop-submit-button",
|
|
498
|
+
restrictionMessage: "neeto-image-uploader-restriction-message",
|
|
499
|
+
progressBar: "neeto-image-uploader-progress-bar",
|
|
500
|
+
myImagesTab: "neeto-image-uploader-my-images-tab",
|
|
501
|
+
unsplashTab: "neeto-image-uploader-unsplash-tab",
|
|
502
|
+
nthLibraryImage: (index) => `niu-library-image-${index}`,
|
|
503
|
+
nthUnsplashImage: (index) => `niu-unsplash-image-${index}`,
|
|
504
|
+
unsplashSearchInput: "niu-unsplash-image-picker-search-input",
|
|
505
|
+
imageEditorUploadedImage: "image-editor-uploaded-image",
|
|
506
|
+
selectOriginalImageSwitch: "select-original-image-switch",
|
|
507
|
+
lockAspectRatioSwitch: "lock-aspect-ratio-switch",
|
|
508
|
+
widthInputField: "width-input-field",
|
|
509
|
+
heightInputField: "height-input-field",
|
|
510
|
+
};
|
|
511
|
+
|
|
512
|
+
const LOGIN_SELECTORS = {
|
|
513
|
+
appleAuthenticationButton: "apple-authentication-button",
|
|
514
|
+
emailTextField: "login-email-text-field",
|
|
515
|
+
googleAuthenticationButton: "google-authentication-button",
|
|
516
|
+
githubAuthenticationButton: "github-authentication-button",
|
|
517
|
+
loginViaEmailButton: "login-via-email-button",
|
|
518
|
+
passwordTextField: "login-password-text-field",
|
|
519
|
+
rememberMeCheckBox: "login-remember-me-check-box",
|
|
520
|
+
submitButton: "login-submit-button",
|
|
521
|
+
twitterAuthenticationButton: "twitter-authentication-button",
|
|
522
|
+
};
|
|
523
|
+
|
|
524
|
+
const MEMBER_SELECTORS = {
|
|
525
|
+
membersTab: "members-nav-tab",
|
|
526
|
+
newButton: "ntm-add-member-button",
|
|
527
|
+
continueButton: "ntm-manage-member-continue-button",
|
|
528
|
+
submitButton: "ntm-manage-member-submit-button",
|
|
529
|
+
searchTextField: "ntm-search-members-input",
|
|
530
|
+
deactivatedAgentsButton: "ntm-members-menubar-deactivated-block",
|
|
531
|
+
activatedMembersButton: "ntm-members-menubar-active-block",
|
|
532
|
+
columnCheckBox: "neeto-ui-columns-checkbox",
|
|
533
|
+
roleLabel: (role) => `${joinHyphenCase(role)}-radio-label`,
|
|
534
|
+
teamMembersTable: "ntm-members-table",
|
|
535
|
+
dropDownIcon: "ntm-members-table-row-dropdown-button",
|
|
536
|
+
editButton: "ntm-edit-member-button",
|
|
537
|
+
menuBarHeading: "ntm-members-menubar-heading",
|
|
538
|
+
removeMember: "ntm-deactivate-member-button",
|
|
539
|
+
columnsButton: "columns-dropdown-button",
|
|
540
|
+
columnsDropdownContainer: "columns-dropdown-container",
|
|
541
|
+
emailDropdownItemLabel: "email-checkbox-label",
|
|
542
|
+
roleDropdownItemLabel: "role-checkbox-label",
|
|
543
|
+
inviteStatusDropdownItemLabel: "invite-status-checkbox-label",
|
|
544
|
+
heading: "ntm-manage-members-pane-header",
|
|
545
|
+
activateButton: "ntm-activate-members-button",
|
|
546
|
+
deactivateButton: "ntm-deactivate-members-button",
|
|
547
|
+
rolesButton: "ntm-manage-member-roles-button",
|
|
548
|
+
statusTag: "ntm-member-status-tag",
|
|
549
|
+
menubarSubLink: (sublink) => `members-${sublink}-block-sub-link`,
|
|
550
|
+
takeActionStateOption: (option = "") => `ntm-${hyphenize(option)}-members-button`,
|
|
551
|
+
checkboxLabel: (label) => `${hyphenize(label)}-checkbox-label`,
|
|
552
|
+
};
|
|
553
|
+
const MEMBER_FORM_SELECTORS = {
|
|
554
|
+
emailTextField: "email-select-input-field",
|
|
555
|
+
firstNameTextField: "ntm-edit-member-first-name-text-field",
|
|
556
|
+
lastNameTextField: "ntm-edit-member-last-name-text-field",
|
|
557
|
+
emailInput: "ntm-manage-member-email-input",
|
|
558
|
+
emailErrorField: "emails-input-error",
|
|
559
|
+
cancelButton: "ntm-manage-member-cancel-button",
|
|
560
|
+
};
|
|
561
|
+
|
|
562
|
+
const PROFILE_SECTION_SELECTORS = {
|
|
563
|
+
profileSectionButton: "profile-section",
|
|
564
|
+
profilePopup: "profile-popup",
|
|
565
|
+
myProfileButton: "my-profile-button",
|
|
566
|
+
profileOrganizationSettingsButton: "profile-organization-settings-button",
|
|
567
|
+
logoutButton: "profile-logout-button",
|
|
568
|
+
neetoAuthLink: "ntm-visit-auth-button",
|
|
569
|
+
profileSidebarCancelButton: "ntm-profile-cancel-button",
|
|
570
|
+
profileAvatar: "profile-avatar",
|
|
571
|
+
actionHeaderUserEmail: "floating-action-menu-header-user-email",
|
|
572
|
+
};
|
|
573
|
+
|
|
574
|
+
const ROLES_SELECTORS = {
|
|
575
|
+
newButton: "ntm-add-role-button",
|
|
576
|
+
proceedButton: "ntm-add-role-submit-button",
|
|
577
|
+
cancelButton: "ntm-add-role-cancel-button",
|
|
578
|
+
tableHeaderRoleName: "ntm-roles-table-role-header",
|
|
579
|
+
nameTextField: "ntm-add-role-name-text-field",
|
|
580
|
+
searchTextField: "ntm-search-roles-input",
|
|
581
|
+
updateRolePaneHeading: "ntm-add-role-title",
|
|
582
|
+
updateRoleCancelButton: "ntm-add-role-cancel-button",
|
|
583
|
+
descriptionTextField: "ntm-add-role-description-text-field",
|
|
584
|
+
permissionCategoryTitle: "ntm-roles-permission-category-title",
|
|
585
|
+
headerColumn: "ntm-roles-table-header",
|
|
586
|
+
dropDownIcon: "ntm-roles-table-header-role-dropdown-button",
|
|
587
|
+
tableHeaderRoleTitle: "ntm-roles-table-header-role-title",
|
|
588
|
+
permissionCheckbox: "ntm-roles-permission-checkbox",
|
|
589
|
+
editRoleButton: "ntm-roles-table-edit-role-button",
|
|
590
|
+
deleteRoleButton: "ntm-roles-table-delete-role-button",
|
|
591
|
+
permissionCard: "ntm-roles-permission-card",
|
|
592
|
+
};
|
|
593
|
+
|
|
594
|
+
const SIGNUP_SELECTORS = {
|
|
595
|
+
emailTextField: "signup-email-text-field",
|
|
596
|
+
firstNameTextField: "signup-profile-first-name-text-field",
|
|
597
|
+
lastNameTextField: "signup-profile-last-name-text-field",
|
|
598
|
+
organizationNameTextField: "signup-organization-name-text-field",
|
|
599
|
+
organizationSubmitButton: "signup-organization-submit-button",
|
|
600
|
+
otpTextBox: "otpinput-otp-number",
|
|
601
|
+
profileSubmitButton: "signup-profile-submit-button",
|
|
602
|
+
signupViaEmailButton: "signup-via-email-button",
|
|
603
|
+
submitButton: "signup-email-submit-button",
|
|
604
|
+
subdomainNameTextField: "signup-organization-subdomain-text-field",
|
|
605
|
+
subdomainError: "subdomain-input-error",
|
|
606
|
+
tryFreeButton: "neeto-auth-signup-link",
|
|
607
|
+
unregisterdEmailError: "unregisterd-email-error",
|
|
608
|
+
};
|
|
609
|
+
|
|
610
|
+
const TAB_SELECTORS = {
|
|
611
|
+
configureTab: "configure-tab",
|
|
612
|
+
buildTab: "build-tab",
|
|
613
|
+
themeTab: "theme-tab",
|
|
614
|
+
shareTab: "share-tab",
|
|
615
|
+
submissionsTab: "submissions-tab",
|
|
616
|
+
paymentsTab: "payments-tab",
|
|
617
|
+
};
|
|
618
|
+
|
|
619
|
+
const TAGS_SELECTORS = {
|
|
620
|
+
newTagButton: "add-new-tag-button",
|
|
621
|
+
tagNameTextField: "tag-name-text-field",
|
|
622
|
+
editButton: "tags-edit-button",
|
|
623
|
+
deleteButton: "tags-delete-button",
|
|
624
|
+
cancelButton: "neeto-tags-manage-tag-cancel-button",
|
|
625
|
+
submitButton: "neeto-tags-manage-tag-submit-button",
|
|
626
|
+
searchTextField: "neeto-tags-search-text-input-field",
|
|
627
|
+
descriptionTextArea: "tag-description-text-area",
|
|
628
|
+
addTagButton: "neeto-tags-add-tag-button",
|
|
629
|
+
tagSearchField: "select-tag-container",
|
|
630
|
+
deleteTagButton: "tag-close-icon",
|
|
631
|
+
metaDataCard: "metadata-card",
|
|
632
|
+
metaDataBlock: "metadata-block",
|
|
633
|
+
tagContainer: "tag-container",
|
|
634
|
+
};
|
|
635
|
+
const MERGE_TAGS_SELECTORS = {
|
|
636
|
+
mergeTagsButton: "neeto-tags-merge-tags-button",
|
|
637
|
+
mergeButton: "neeto-tags-merge-button",
|
|
638
|
+
sourceSearchTextField: "neeto-tags-merge-source-search-text-input-field",
|
|
639
|
+
sourceTagsList: "neeto-tags-merge-source-tags-list",
|
|
640
|
+
destinationTagsList: "neeto-tags-merge-destination-tags-list",
|
|
641
|
+
destinationSearchTextField: "neeto-tags-merge-destination-search-text-input-field",
|
|
642
|
+
cancelButton: "neeto-tags-merge-cancel-button",
|
|
643
|
+
proceedButton: "neeto-tags-merge-proceed-button",
|
|
644
|
+
disabledTag: ".neeto-ui-cursor-not-allowed",
|
|
645
|
+
sourceTagRow: "neeto-tags-merge-source-tags",
|
|
646
|
+
destinationTagRow: "neeto-tags-merge-destination-tags",
|
|
647
|
+
};
|
|
648
|
+
|
|
649
|
+
const CHAT_WIDGET_SELECTORS = {
|
|
650
|
+
iframe: "#neetochat-iframe",
|
|
651
|
+
spinner: ".neeto-chat-widget-spinner",
|
|
652
|
+
helpButton: "help-button",
|
|
653
|
+
preChatEmailInput: "neeto-chat-widget-input",
|
|
654
|
+
preChatSubmitButton: "neeto-chat-widget-pre-chat-submit-btn",
|
|
655
|
+
chatBubble: "neeto-chat-widget-chat-message-bubble",
|
|
656
|
+
closeChat: "neeto-chat-widget-close-btn",
|
|
657
|
+
chatQuestionHeader: "chat-question-header",
|
|
658
|
+
};
|
|
659
|
+
const CHANGELOG_WIDGET_SELECTORS = {
|
|
660
|
+
changelogWrapper: ".ne-widget__wrapper",
|
|
661
|
+
closeButton: "ne-widget-close-btn",
|
|
662
|
+
publicUrlLink: "ne-widget-public-url",
|
|
663
|
+
};
|
|
664
|
+
const KEYBOARD_SHORTCUTS_SELECTORS = {
|
|
665
|
+
keyboardShortcutsPane: "keyboard-shortcuts-pane",
|
|
666
|
+
closePaneButton: "keyboard-shortcuts-pane-close-button",
|
|
667
|
+
hotKeyItem: "hotkey-item",
|
|
668
|
+
};
|
|
669
|
+
|
|
670
|
+
const INTEGRATION_SELECTORS = {
|
|
671
|
+
integrationCard: (integration) => `${integration}-integration-card`,
|
|
672
|
+
connectButton: "connect-button",
|
|
673
|
+
integrationStatusTag: "integration-status-tag",
|
|
674
|
+
disconnectButton: "disconnect-button",
|
|
675
|
+
manageButton: "manage-button",
|
|
676
|
+
};
|
|
677
|
+
|
|
678
|
+
const GOOGLE_LOGIN_SELECTORS = {
|
|
679
|
+
totpNext: "#totpNext",
|
|
680
|
+
form: "form",
|
|
681
|
+
totpChallengeSelector: '[data-challengeid="2"]',
|
|
682
|
+
signOutFrameLocator: 'iframe[name="account"]',
|
|
683
|
+
};
|
|
684
|
+
|
|
685
|
+
const dataQa = (value) => `[data-qa='${value}']`;
|
|
686
|
+
const SLACK_SELECTORS = {
|
|
687
|
+
messageContainer: dataQa("message_container"),
|
|
688
|
+
loginEmail: dataQa("login_email"),
|
|
689
|
+
loginPassword: dataQa("login_password"),
|
|
690
|
+
signInButton: dataQa("signin_button"),
|
|
691
|
+
teamPicketButtonContent: dataQa("team-picker-button-content"),
|
|
692
|
+
redirectOpenInBrowser: dataQa("ssb_redirect_open_in_browser"),
|
|
693
|
+
workspaceActionsButton: dataQa("workspace_actions_button"),
|
|
694
|
+
teamMenuTrigger: dataQa("team-menu-trigger"),
|
|
695
|
+
menuItemButton: "menu_item_button",
|
|
696
|
+
threadsFlexpane: "threads_flexpane",
|
|
697
|
+
replyBar: "reply_bar",
|
|
698
|
+
markdownElement: "bk_markdown_element",
|
|
699
|
+
virtualListItem: "virtual-list-item",
|
|
700
|
+
channelItems: '[role="treeitem"][data-qa="virtual-list-item"]',
|
|
701
|
+
};
|
|
702
|
+
const SLACK_DATA_QA_SELECTORS = {
|
|
703
|
+
sectionHeadingButton: "section_heading_button__channels",
|
|
704
|
+
coachMarkCloseButton: "coachmark-close-button",
|
|
705
|
+
messagePaneBannerCloseIcon: "message_pane_banner_close_icon",
|
|
706
|
+
permissionBannerCloseIcon: "banner_close_btn",
|
|
707
|
+
channelSectionSubmenuCreate: "channel_section_submenu_create",
|
|
708
|
+
channelSectionMenuCreateChannel: "channel_section_menu__create_channel",
|
|
709
|
+
skModalContent: "sk-modal-content",
|
|
710
|
+
infiniteSpinner: "infinite-spinner",
|
|
711
|
+
channelNameOptionsList: "channel-name-options-list",
|
|
712
|
+
channelNameInput: "channel-name-input",
|
|
713
|
+
createChannelNextButton: "create-channel-next-button",
|
|
714
|
+
inviteToWorkspaceSkipButton: "invite_to_workspace_skip_button",
|
|
715
|
+
menuItems: "menu_items",
|
|
716
|
+
channelDetailsModal: "channel_details_modal",
|
|
717
|
+
channelDetailsSettingsTab: "channel_details_settings_tab",
|
|
718
|
+
};
|
|
719
|
+
|
|
720
|
+
const WEBHOOK_SELECTORS = {
|
|
721
|
+
addNewWebhook: "add-new-webhook-button",
|
|
722
|
+
endpointInputField: "endpoint-input-field",
|
|
723
|
+
deliveryResponseCode: "delivery-response-code",
|
|
724
|
+
deliveryRequestPayload: "delivery-request-payload",
|
|
725
|
+
addSecretKey: "add-secret-key",
|
|
726
|
+
newWebhookHeader: "add-new-webhook-pane-header",
|
|
727
|
+
endpointInputError: "endpoint-input-error",
|
|
728
|
+
eventsSelectError: "events-select-error",
|
|
729
|
+
regenerateSecret: "regenerate-secret",
|
|
730
|
+
deleteSecret: "delete-secret",
|
|
731
|
+
};
|
|
732
|
+
|
|
733
|
+
const ZAPIER_SELECTORS = {
|
|
734
|
+
zapTriggerStep: (zapId) => `[data-testid='step-node-${zapId}']`,
|
|
735
|
+
zapAccountSubstep: "[data-testid='substep-Account']",
|
|
736
|
+
zapOpenSubstepContainer: "[data-testid='open-sub-step-container']",
|
|
737
|
+
modal: "[data-testid='Modal']",
|
|
738
|
+
fmPrettytext: ".fm-prettytext",
|
|
739
|
+
spinner: "[data-testid='spinner']",
|
|
740
|
+
skeletonBlock: "[data-testid='SkeletonBlock']",
|
|
741
|
+
accountsLoader: "[data-testid='accounts-loader']",
|
|
742
|
+
floatingBox: "[data-testid='floating-box']",
|
|
743
|
+
connection: "[data-testid='Connection']",
|
|
744
|
+
deleteConnectionModal: "[data-testid='DeleteAuthModal-root']",
|
|
745
|
+
deleteConnectionDropdownButton: "[data-testid='connection-list-item-dropdown-item-Delete']",
|
|
746
|
+
usageAmounts: "css=[class$=UsageBar__amounts]",
|
|
747
|
+
universalSidebar: "[data-testid='universalSidebar']",
|
|
748
|
+
sidebarFooter: "css=[class$=InAppSidebarFooter__footerWrapper]",
|
|
749
|
+
contextualSideBar: "[data-testid='contextual-sidebar']",
|
|
750
|
+
iconContainer: "[data-testid='iconContainer']",
|
|
751
|
+
};
|
|
752
|
+
|
|
377
753
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
378
754
|
|
|
379
755
|
function getDefaultExportFromCjs (x) {
|
|
@@ -11641,6 +12017,32 @@ class FastmailApi {
|
|
|
11641
12017
|
}
|
|
11642
12018
|
}
|
|
11643
12019
|
|
|
12020
|
+
const basicHTMLContent = (content) => `
|
|
12021
|
+
<!DOCTYPE html>
|
|
12022
|
+
<html lang="en">
|
|
12023
|
+
<head>
|
|
12024
|
+
<meta charset="UTF-8" />
|
|
12025
|
+
<meta name="viewport" content="width=device-width" />
|
|
12026
|
+
</head>
|
|
12027
|
+
<body>
|
|
12028
|
+
${content}
|
|
12029
|
+
</body>
|
|
12030
|
+
</html>`;
|
|
12031
|
+
const hexToRGB = (hex) => {
|
|
12032
|
+
let r = "", g = "", b = "";
|
|
12033
|
+
if (hex.length === 4) {
|
|
12034
|
+
r = `0x${hex[1]}${hex[1]}`;
|
|
12035
|
+
g = `0x${hex[2]}${hex[2]}`;
|
|
12036
|
+
b = `0x${hex[3]}${hex[3]}`;
|
|
12037
|
+
}
|
|
12038
|
+
else if (hex.length === 7) {
|
|
12039
|
+
r = `0x${hex[1]}${hex[2]}`;
|
|
12040
|
+
g = `0x${hex[3]}${hex[4]}`;
|
|
12041
|
+
b = `0x${hex[5]}${hex[6]}`;
|
|
12042
|
+
}
|
|
12043
|
+
return `rgb(${Number(r)}, ${Number(g)}, ${Number(b)})`;
|
|
12044
|
+
};
|
|
12045
|
+
|
|
11644
12046
|
const dateTimeOneHourAgo = () => new Date(new Date().valueOf() - 60 * 60 * 1000);
|
|
11645
12047
|
class MailerUtils {
|
|
11646
12048
|
constructor(neetoPlaywrightUtilities) {
|
|
@@ -11681,7 +12083,10 @@ class MailerUtils {
|
|
|
11681
12083
|
body: emailBody,
|
|
11682
12084
|
...contentRecognitions,
|
|
11683
12085
|
};
|
|
11684
|
-
const
|
|
12086
|
+
const wrappedHtml = /<html[\s>]/i.test(emailBody)
|
|
12087
|
+
? emailBody
|
|
12088
|
+
: basicHTMLContent(emailBody);
|
|
12089
|
+
const document = new DOMParser().parseFromString(wrappedHtml, "text/html").documentElement;
|
|
11685
12090
|
const text = {
|
|
11686
12091
|
body: ((_a = document === null || document === void 0 ? void 0 : document.getElementsByTagName("body")[0].textContent) === null || _a === void 0 ? void 0 : _a.trim()) || "",
|
|
11687
12092
|
...contentRecognitions,
|
|
@@ -11783,7 +12188,7 @@ const commands = {
|
|
|
11783
12188
|
}
|
|
11784
12189
|
},
|
|
11785
12190
|
page: async ({ page }, use) => {
|
|
11786
|
-
await page.goto("/");
|
|
12191
|
+
await page.goto("/", { timeout: 20000 });
|
|
11787
12192
|
await page.waitForLoadState();
|
|
11788
12193
|
await use(page);
|
|
11789
12194
|
},
|
|
@@ -20709,8 +21114,9 @@ const mergeTaxonomies = async (translations, page) => {
|
|
|
20709
21114
|
|
|
20710
21115
|
const i18nFixture = {
|
|
20711
21116
|
i18n: [
|
|
20712
|
-
async ({
|
|
21117
|
+
async ({}, use) => {
|
|
20713
21118
|
const translation = readTranslations();
|
|
21119
|
+
const page = await (await test$1.chromium.launch()).newPage();
|
|
20714
21120
|
const taxonomies = await mergeTaxonomies(translation, page);
|
|
20715
21121
|
const options = {
|
|
20716
21122
|
debug: false,
|
|
@@ -20740,125 +21146,19 @@ const i18nFixture = {
|
|
|
20740
21146
|
const i18nInitialized = await playwrightI18nextFixture.initI18n({
|
|
20741
21147
|
plugins: [removeTagsProcessor, sentenceCaseProcessor],
|
|
20742
21148
|
options,
|
|
20743
|
-
// Fetch translations in every test or fetch once
|
|
20744
21149
|
cache: true,
|
|
20745
21150
|
});
|
|
21151
|
+
await page.close();
|
|
20746
21152
|
await use(i18nInitialized);
|
|
20747
21153
|
},
|
|
20748
|
-
|
|
20749
|
-
|
|
21154
|
+
{ auto: true, scope: "worker" },
|
|
21155
|
+
],
|
|
21156
|
+
t: [
|
|
21157
|
+
async ({ i18n }, use) => {
|
|
21158
|
+
await use(i18n.t);
|
|
21159
|
+
},
|
|
21160
|
+
{ scope: "worker" },
|
|
20750
21161
|
],
|
|
20751
|
-
t: async ({ i18n }, use) => {
|
|
20752
|
-
await use(i18n.t);
|
|
20753
|
-
},
|
|
20754
|
-
};
|
|
20755
|
-
|
|
20756
|
-
const THANK_YOU_SELECTORS = {
|
|
20757
|
-
settingsLink: "thank-you-settings-link",
|
|
20758
|
-
showSocialShareIconsSwitch: "show-social-share-icons-switch",
|
|
20759
|
-
showLinkToSubmitAnotherResponseSwitch: "show-link-to-submit-another-response-switch",
|
|
20760
|
-
submitAnotherResponseLinkTextInputField: "submit-another-response-link-text-input-field",
|
|
20761
|
-
previewEditorContent: "preview-editor-content",
|
|
20762
|
-
redirectToExternalLinkRadioLabel: () => "neeto-thank-you-configuration-redirect-to-url-label",
|
|
20763
|
-
thankYouConfigurationLabel: (label = "custom-message") => `neeto-thank-you-configuration-${label}-label`,
|
|
20764
|
-
saveChangesButton: "neeto-thank-you-configuration-save-button",
|
|
20765
|
-
cancelButton: "neeto-thank-you-configuration-cancel-button",
|
|
20766
|
-
thankYouPageImage: "thank-you-page-image",
|
|
20767
|
-
thankYouPageMessage: "thank-you-page-message",
|
|
20768
|
-
thankYouPageContent: "thank-you-page-content",
|
|
20769
|
-
thankYouPageResubmitLink: "thank-you-page-resubmit-link",
|
|
20770
|
-
linkInputField: "link-input-field",
|
|
20771
|
-
previewImage: "preview-image",
|
|
20772
|
-
};
|
|
20773
|
-
|
|
20774
|
-
const optionSelector = (option) => `neeto-editor-fixed-menu-${option}-option`;
|
|
20775
|
-
const fixedMenuSelector = (selector) => `neeto-editor-fixed-menu-${selector}`;
|
|
20776
|
-
|
|
20777
|
-
const NEETO_EDITOR_SELECTORS = {
|
|
20778
|
-
fontSize: optionSelector("font-size"),
|
|
20779
|
-
boldOption: optionSelector("bold"),
|
|
20780
|
-
italicOption: optionSelector("italic"),
|
|
20781
|
-
underlineOption: optionSelector("underline"),
|
|
20782
|
-
strikeOption: optionSelector("strike"),
|
|
20783
|
-
codeBlockOption: optionSelector("code"),
|
|
20784
|
-
highlightOption: optionSelector("highlight"),
|
|
20785
|
-
emojiOption: optionSelector("emoji"),
|
|
20786
|
-
emojiDropdownIcon: "emoji-dropdown-icon",
|
|
20787
|
-
linkInput: fixedMenuSelector("link-option-input"),
|
|
20788
|
-
linkSubmitButton: fixedMenuSelector("link-option-link-button"),
|
|
20789
|
-
commandList: (index) => `neeto-editor-command-list-item-${index}`,
|
|
20790
|
-
imageUploadUrlSubmitButton: "neeto-editor-media-upload-url-submit",
|
|
20791
|
-
imageUploadUrlInputTextField: "neeto-editor-media-upload-url-input",
|
|
20792
|
-
uploadInput: "neeto-editor-media-uploader-input",
|
|
20793
|
-
editorMenuBarWrapper: fixedMenuSelector("wrapper"),
|
|
20794
|
-
undoOption: optionSelector("undo"),
|
|
20795
|
-
redoOption: optionSelector("redo"),
|
|
20796
|
-
imageWrapper: "neeto-editor-image-wrapper",
|
|
20797
|
-
contentField: "neeto-editor-content",
|
|
20798
|
-
addLinkButton: optionSelector("link"),
|
|
20799
|
-
addLinkTextField: "neeto-editor-add-link-text-input",
|
|
20800
|
-
addURLTextField: "neeto-editor-add-link-url-input",
|
|
20801
|
-
submitLinkButton: "neeto-editor-add-link",
|
|
20802
|
-
fixedMenuArrow: fixedMenuSelector("arrow"),
|
|
20803
|
-
cannedResponseOption: optionSelector("canned-responses"),
|
|
20804
|
-
cannedResponseSelectContainer: "select-a-canned-response-select-container",
|
|
20805
|
-
fixedMenuWrapper: fixedMenuSelector("wrapper"),
|
|
20806
|
-
linkOption: optionSelector("link"),
|
|
20807
|
-
addLinkUrlInput: "neeto-editor-add-link-url-input",
|
|
20808
|
-
addLinkDoneButton: "neeto-editor-add-link",
|
|
20809
|
-
unlinkButton: "neeto-editor-link-popover-unlink",
|
|
20810
|
-
editorAttachmentsButton: optionSelector("attachments"),
|
|
20811
|
-
attachmentPreviewDeleteButton: "neeto-editor-preview-delete-button",
|
|
20812
|
-
imageUploadOption: optionSelector("image-upload"),
|
|
20813
|
-
imageUploadLinkInput: "neeto-editor-media-upload-url-input",
|
|
20814
|
-
imageUploadButton: "neeto-editor-media-uploader-dnd",
|
|
20815
|
-
imageUploadLinkSubmitButton: "neeto-editor-media-upload-url-submit",
|
|
20816
|
-
applyButton: "apply-button",
|
|
20817
|
-
videoEmbedOption: optionSelector("video-embed"),
|
|
20818
|
-
videoEmbedInput: "neeto-editor-embed-input",
|
|
20819
|
-
videoEmbedSubmit: "neeto-editor-embed-cancel",
|
|
20820
|
-
videoWrapper: "neeto-editor-video-wrapper",
|
|
20821
|
-
paragraphOption: fixedMenuSelector("font-size-option-body2"),
|
|
20822
|
-
attachmentPreview: "ne-attachments-wrapper",
|
|
20823
|
-
imageUploadLinkButton: "neeto-editor-media-uploader-link-tab",
|
|
20824
|
-
errorText: "neeto-editor-error-text",
|
|
20825
|
-
content: "editor-content",
|
|
20826
|
-
imageUploadDeleteButton: "neeto-editor-image-menu-Delete",
|
|
20827
|
-
dynamicVariablesButton: "dynamic-variables-button",
|
|
20828
|
-
emojiContainer: "neeto-editor-emoji-picker",
|
|
20829
|
-
dynamicVariableSelector: (variable) => `dynamic-variables-list-item-${variable}`,
|
|
20830
|
-
};
|
|
20831
|
-
const NEETO_TEXT_MODIFIER_SELECTORS = {
|
|
20832
|
-
strike: optionSelector("strike"),
|
|
20833
|
-
underline: optionSelector("underline"),
|
|
20834
|
-
highlight: optionSelector("highlight"),
|
|
20835
|
-
};
|
|
20836
|
-
const TEXT_MODIFIER_SELECTORS = {
|
|
20837
|
-
bold: optionSelector("bold"),
|
|
20838
|
-
italic: optionSelector("italic"),
|
|
20839
|
-
code: optionSelector("code"),
|
|
20840
|
-
blockquote: optionSelector("blockquote"),
|
|
20841
|
-
codeBlock: optionSelector("codeBlock"),
|
|
20842
|
-
};
|
|
20843
|
-
const LIST_MODIFIER_SELECTORS = {
|
|
20844
|
-
bulletList: optionSelector("bulletList"),
|
|
20845
|
-
orderedList: optionSelector("orderedList"),
|
|
20846
|
-
};
|
|
20847
|
-
const FONT_SIZE_SELECTORS = {
|
|
20848
|
-
h1: fixedMenuSelector("font-size-option-h1"),
|
|
20849
|
-
h2: fixedMenuSelector("font-size-option-h2"),
|
|
20850
|
-
h3: fixedMenuSelector("font-size-option-h3"),
|
|
20851
|
-
h4: fixedMenuSelector("font-size-option-h4"),
|
|
20852
|
-
h5: fixedMenuSelector("font-size-option-h5"),
|
|
20853
|
-
};
|
|
20854
|
-
|
|
20855
|
-
const TAB_SELECTORS = {
|
|
20856
|
-
configureTab: "configure-tab",
|
|
20857
|
-
buildTab: "build-tab",
|
|
20858
|
-
themeTab: "theme-tab",
|
|
20859
|
-
shareTab: "share-tab",
|
|
20860
|
-
submissionsTab: "submissions-tab",
|
|
20861
|
-
paymentsTab: "payments-tab",
|
|
20862
21162
|
};
|
|
20863
21163
|
|
|
20864
21164
|
class ThankYouPage {
|
|
@@ -20920,55 +21220,6 @@ class ThankYouPage {
|
|
|
20920
21220
|
}
|
|
20921
21221
|
}
|
|
20922
21222
|
|
|
20923
|
-
const EMBED_SELECTORS = {
|
|
20924
|
-
iframe: (appName) => `#${appName}-iframe`,
|
|
20925
|
-
modal: (appName) => `#${appName}-modal`,
|
|
20926
|
-
close: (appName) => `#close-${appName}`,
|
|
20927
|
-
loader: (appName) => `#${appName}-loader`,
|
|
20928
|
-
inlineHeightInput: "inline-height-input-field",
|
|
20929
|
-
inlineWidthInput: "inline-width-input-field",
|
|
20930
|
-
inlineElementIdInput: "inline-element-id-input-field",
|
|
20931
|
-
codeBlock: "code-block",
|
|
20932
|
-
previewTab: "preview-tab",
|
|
20933
|
-
htmlTab: "html-tab",
|
|
20934
|
-
buttonTextInput: "button-text-input-field",
|
|
20935
|
-
buttonPositionSelectContainer: "button-position-select-value-container",
|
|
20936
|
-
buttonPositionSelectMenu: "button-position-select-menu",
|
|
20937
|
-
buttonColorLabel: "button-color-label",
|
|
20938
|
-
buttonTextColorLabel: "button-text-color-label",
|
|
20939
|
-
colorPickerTarget: "color-picker-target",
|
|
20940
|
-
colorpickerEditableInput: "colorpicker-editable-input",
|
|
20941
|
-
showIconCheckbox: "show-icon-checkbox",
|
|
20942
|
-
elementIdInput: "element-id-input-field",
|
|
20943
|
-
previewElementPopupButton: "preview-element-popup-button",
|
|
20944
|
-
};
|
|
20945
|
-
|
|
20946
|
-
const basicHTMLContent = (content) => `
|
|
20947
|
-
<!DOCTYPE html>
|
|
20948
|
-
<html lang="en">
|
|
20949
|
-
<head>
|
|
20950
|
-
<meta charset="UTF-8" />
|
|
20951
|
-
<meta name="viewport" content="width=device-width" />
|
|
20952
|
-
</head>
|
|
20953
|
-
<body>
|
|
20954
|
-
${content}
|
|
20955
|
-
</body>
|
|
20956
|
-
</html>`;
|
|
20957
|
-
const hexToRGB = (hex) => {
|
|
20958
|
-
let r = "", g = "", b = "";
|
|
20959
|
-
if (hex.length === 4) {
|
|
20960
|
-
r = `0x${hex[1]}${hex[1]}`;
|
|
20961
|
-
g = `0x${hex[2]}${hex[2]}`;
|
|
20962
|
-
b = `0x${hex[3]}${hex[3]}`;
|
|
20963
|
-
}
|
|
20964
|
-
else if (hex.length === 7) {
|
|
20965
|
-
r = `0x${hex[1]}${hex[2]}`;
|
|
20966
|
-
g = `0x${hex[3]}${hex[4]}`;
|
|
20967
|
-
b = `0x${hex[5]}${hex[6]}`;
|
|
20968
|
-
}
|
|
20969
|
-
return `rgb(${Number(r)}, ${Number(g)}, ${Number(b)})`;
|
|
20970
|
-
};
|
|
20971
|
-
|
|
20972
21223
|
class EmbedBase {
|
|
20973
21224
|
constructor({ context, page, neetoPlaywrightUtilities, appName, }) {
|
|
20974
21225
|
this.initializeEmbedPage = async ({ embedType, embedCode, customElementText = "Click here", }) => {
|
|
@@ -20979,7 +21230,9 @@ class EmbedBase {
|
|
|
20979
21230
|
: embedCode);
|
|
20980
21231
|
this.filePath = `tmp/${faker.faker.word.noun()}.html`;
|
|
20981
21232
|
fs$d.writeFileSync(this.filePath, fileContent, "utf8");
|
|
20982
|
-
await this.embedTestPage.goto(`file://${Path.resolve(this.filePath)}
|
|
21233
|
+
await this.embedTestPage.goto(`file://${Path.resolve(this.filePath)}`, {
|
|
21234
|
+
timeout: 20000,
|
|
21235
|
+
});
|
|
20983
21236
|
await this.embedTestPage.waitForLoadState("load");
|
|
20984
21237
|
this.embeddedFrame = this.embedTestPage.frameLocator(this.embedTestPageType === "inline"
|
|
20985
21238
|
? "iframe"
|
|
@@ -21225,52 +21478,6 @@ const GOOGLE_LOGIN_TEXTS = {
|
|
|
21225
21478
|
};
|
|
21226
21479
|
const ENGAGE_TEXTS = { subscribe: "Subscribe" };
|
|
21227
21480
|
|
|
21228
|
-
const HELP_CENTER_SELECTORS = {
|
|
21229
|
-
helpButton: "help-button",
|
|
21230
|
-
documentationButton: "help-link-help-center-button",
|
|
21231
|
-
keyboardShortcutButton: "help-link-keyboard-shortcut-button",
|
|
21232
|
-
chatButton: "help-link-live-chat-button",
|
|
21233
|
-
whatsNewButton: "help-link-engage-button",
|
|
21234
|
-
whatsNewWidgetInfo: "h1",
|
|
21235
|
-
whatsNewWidgetCloseButton: ".ne-widget-header__btn",
|
|
21236
|
-
keyboardShortcutPaneHeading: "keyboard-shortcuts-pane-title",
|
|
21237
|
-
keyboardShortcutPaneCrossIcon: "keyboard-shortcuts-pane-close-button",
|
|
21238
|
-
};
|
|
21239
|
-
|
|
21240
|
-
const PROFILE_SECTION_SELECTORS = {
|
|
21241
|
-
profileSectionButton: "profile-section",
|
|
21242
|
-
profilePopup: "profile-popup",
|
|
21243
|
-
myProfileButton: "my-profile-button",
|
|
21244
|
-
profileOrganizationSettingsButton: "profile-organization-settings-button",
|
|
21245
|
-
logoutButton: "profile-logout-button",
|
|
21246
|
-
neetoAuthLink: "ntm-visit-auth-button",
|
|
21247
|
-
profileSidebarCancelButton: "ntm-profile-cancel-button",
|
|
21248
|
-
profileAvatar: "profile-avatar",
|
|
21249
|
-
actionHeaderUserEmail: "floating-action-menu-header-user-email",
|
|
21250
|
-
};
|
|
21251
|
-
|
|
21252
|
-
const CHAT_WIDGET_SELECTORS = {
|
|
21253
|
-
iframe: "#neetochat-iframe",
|
|
21254
|
-
spinner: ".neeto-chat-widget-spinner",
|
|
21255
|
-
helpButton: "help-button",
|
|
21256
|
-
preChatEmailInput: "neeto-chat-widget-input",
|
|
21257
|
-
preChatSubmitButton: "neeto-chat-widget-pre-chat-submit-btn",
|
|
21258
|
-
chatBubble: "neeto-chat-widget-chat-message-bubble",
|
|
21259
|
-
closeChat: "neeto-chat-widget-close-btn",
|
|
21260
|
-
chatQuestionHeader: "chat-question-header",
|
|
21261
|
-
};
|
|
21262
|
-
const CHANGELOG_WIDGET_SELECTORS = {
|
|
21263
|
-
changelogWrapper: ".ne-widget__wrapper",
|
|
21264
|
-
closeButton: "ne-widget-close-btn",
|
|
21265
|
-
publicUrlLink: "ne-widget-public-url",
|
|
21266
|
-
};
|
|
21267
|
-
const KEYBOARD_SHORTCUTS_SELECTORS = {
|
|
21268
|
-
keyboardShortcutsPane: "keyboard-shortcuts-pane",
|
|
21269
|
-
closePaneButton: "keyboard-shortcuts-pane-close-button",
|
|
21270
|
-
hotKeyItem: "hotkey-item",
|
|
21271
|
-
};
|
|
21272
|
-
|
|
21273
|
-
/* eslint-disable playwright/no-raw-locators */
|
|
21274
21481
|
/* eslint-disable playwright/require-top-level-describe */
|
|
21275
21482
|
/* eslint-disable playwright/no-standalone-expect */
|
|
21276
21483
|
class HelpAndProfilePage {
|
|
@@ -21496,13 +21703,6 @@ class HelpAndProfilePage {
|
|
|
21496
21703
|
}
|
|
21497
21704
|
}
|
|
21498
21705
|
|
|
21499
|
-
const GOOGLE_LOGIN_SELECTORS = {
|
|
21500
|
-
totpNext: "#totpNext",
|
|
21501
|
-
form: "form",
|
|
21502
|
-
totpChallengeSelector: '[data-challengeid="2"]',
|
|
21503
|
-
signOutFrameLocator: 'iframe[name="account"]',
|
|
21504
|
-
};
|
|
21505
|
-
|
|
21506
21706
|
//! otpauth 9.3.1 | (c) Héctor Molinero Fernández | MIT | https://github.com/hectorm/otpauth
|
|
21507
21707
|
//! noble-hashes 1.4.0 | (c) Paul Miller | MIT | https://github.com/paulmillr/noble-hashes
|
|
21508
21708
|
/// <reference types="./otpauth.d.ts" />
|
|
@@ -23249,14 +23449,6 @@ const initializeTotp = ({ issuer, secret, }) => {
|
|
|
23249
23449
|
});
|
|
23250
23450
|
};
|
|
23251
23451
|
|
|
23252
|
-
const INTEGRATION_SELECTORS = {
|
|
23253
|
-
integrationCard: (integration) => `${integration}-integration-card`,
|
|
23254
|
-
connectButton: "connect-button",
|
|
23255
|
-
integrationStatusTag: "integration-status-tag",
|
|
23256
|
-
disconnectButton: "disconnect-button",
|
|
23257
|
-
manageButton: "manage-button",
|
|
23258
|
-
};
|
|
23259
|
-
|
|
23260
23452
|
class IntegrationBase {
|
|
23261
23453
|
constructor({ page, neetoPlaywrightUtilities, integration, connectHeader, connectedHeader, pageloaderTimeout, integrationRouteIndex, integrationRouteResponsesParams, }) {
|
|
23262
23454
|
this.disconnect = async (interceptMultipleResponsesParams = {}) => {
|
|
@@ -23301,7 +23493,7 @@ class IntegrationBase {
|
|
|
23301
23493
|
times: 0,
|
|
23302
23494
|
...this.integrationRouteResponsesParams,
|
|
23303
23495
|
});
|
|
23304
|
-
await this.page.goto(this.integrationRouteIndex);
|
|
23496
|
+
await this.page.goto(this.integrationRouteIndex, { timeout: 20000 });
|
|
23305
23497
|
await integrationIndexPromise;
|
|
23306
23498
|
}
|
|
23307
23499
|
};
|
|
@@ -23366,7 +23558,7 @@ class GooglePage extends IntegrationBase {
|
|
|
23366
23558
|
.click();
|
|
23367
23559
|
};
|
|
23368
23560
|
this.loginToGoogle = async () => {
|
|
23369
|
-
await this.page.goto(THIRD_PARTY_ROUTES.google.signin);
|
|
23561
|
+
await this.page.goto(THIRD_PARTY_ROUTES.google.signin, { timeout: 20000 });
|
|
23370
23562
|
if (!ramda.isNotNil(process.env.GOOGLE_LOGIN_EMAIL))
|
|
23371
23563
|
return;
|
|
23372
23564
|
await this.page
|
|
@@ -23412,7 +23604,9 @@ class GooglePage extends IntegrationBase {
|
|
|
23412
23604
|
}).toPass({ timeout: 50000 });
|
|
23413
23605
|
};
|
|
23414
23606
|
this.logoutFromGoogle = async () => {
|
|
23415
|
-
await this.page.goto(THIRD_PARTY_ROUTES.google.myAccount
|
|
23607
|
+
await this.page.goto(THIRD_PARTY_ROUTES.google.myAccount, {
|
|
23608
|
+
timeout: 20000,
|
|
23609
|
+
});
|
|
23416
23610
|
await this.page.getByLabel(GOOGLE_LOGIN_TEXTS.googleAccount).click();
|
|
23417
23611
|
await this.page
|
|
23418
23612
|
.frameLocator(GOOGLE_LOGIN_SELECTORS.signOutFrameLocator)
|
|
@@ -23465,40 +23659,6 @@ class GooglePage extends IntegrationBase {
|
|
|
23465
23659
|
}
|
|
23466
23660
|
}
|
|
23467
23661
|
|
|
23468
|
-
const SLACK_SELECTORS = {
|
|
23469
|
-
messageContainer: "[data-qa='message_container']",
|
|
23470
|
-
loginEmail: "[data-qa='login_email']",
|
|
23471
|
-
loginPassword: "[data-qa='login_password']",
|
|
23472
|
-
signInButton: "[data-qa='signin_button']",
|
|
23473
|
-
teamPicketButtonContent: "[data-qa='team-picker-button-content']",
|
|
23474
|
-
redirectOpenInBrowser: "[data-qa='ssb_redirect_open_in_browser']",
|
|
23475
|
-
workspaceActionsButton: "[data-qa='workspace_actions_button']",
|
|
23476
|
-
teamMenuTrigger: "[data-qa='team-menu-trigger']",
|
|
23477
|
-
menuItemButton: "[data-qa='menu_item_button']",
|
|
23478
|
-
threadsFlexpane: "[data-qa='threads_flexpane']",
|
|
23479
|
-
replyBar: "[data-qa='reply_bar']",
|
|
23480
|
-
markdownElement: "[data-qa='bk_markdown_element']",
|
|
23481
|
-
virtualListItem: "[data-qa='virtual-list-item']",
|
|
23482
|
-
channelItems: '[role="treeitem"][data-qa="virtual-list-item"]',
|
|
23483
|
-
};
|
|
23484
|
-
const SLACK_DATA_QA_SELECTORS = {
|
|
23485
|
-
sectionHeadingButton: "section_heading_button__channels",
|
|
23486
|
-
coachMarkCloseButton: "coachmark-close-button",
|
|
23487
|
-
messagePaneBannerCloseIcon: "message_pane_banner_close_icon",
|
|
23488
|
-
permissionBannerCloseIcon: "banner_close_btn",
|
|
23489
|
-
channelSectionSubmenuCreate: "channel_section_submenu_create",
|
|
23490
|
-
channelSectionMenuCreateChannel: "channel_section_menu__create_channel",
|
|
23491
|
-
skModalContent: "sk-modal-content",
|
|
23492
|
-
infiniteSpinner: "infinite-spinner",
|
|
23493
|
-
channelNameOptionsList: "channel-name-options-list",
|
|
23494
|
-
channelNameInput: "channel-name-input",
|
|
23495
|
-
createChannelNextButton: "create-channel-next-button",
|
|
23496
|
-
inviteToWorkspaceSkipButton: "invite_to_workspace_skip_button",
|
|
23497
|
-
menuItems: "menu_items",
|
|
23498
|
-
channelDetailsModal: "channel_details_modal",
|
|
23499
|
-
channelDetailsSettingsTab: "channel_details_settings_tab",
|
|
23500
|
-
};
|
|
23501
|
-
|
|
23502
23662
|
/* eslint-disable playwright/no-raw-locators */
|
|
23503
23663
|
class SlackPage extends IntegrationBase {
|
|
23504
23664
|
constructor({ page, neetoPlaywrightUtilities, integrationRouteIndex, }) {
|
|
@@ -23610,7 +23770,7 @@ class SlackPage extends IntegrationBase {
|
|
|
23610
23770
|
if (ramda.isNotNil(slackWorkspace) &&
|
|
23611
23771
|
ramda.isNotNil(slackLoginPassword) &&
|
|
23612
23772
|
ramda.isNotNil(slackLoginEmail)) {
|
|
23613
|
-
await slackWebappPage.goto(THIRD_PARTY_ROUTES.slack.loginWithPassword(slackWorkspace));
|
|
23773
|
+
await slackWebappPage.goto(THIRD_PARTY_ROUTES.slack.loginWithPassword(slackWorkspace), { timeout: 20000 });
|
|
23614
23774
|
await slackWebappPage
|
|
23615
23775
|
.locator(SLACK_SELECTORS.loginEmail)
|
|
23616
23776
|
.pressSequentially(slackLoginEmail, { delay: 10 });
|
|
@@ -23689,19 +23849,6 @@ class SlackPage extends IntegrationBase {
|
|
|
23689
23849
|
}
|
|
23690
23850
|
}
|
|
23691
23851
|
|
|
23692
|
-
const WEBHOOK_SELECTORS = {
|
|
23693
|
-
addNewWebhook: "add-new-webhook-button",
|
|
23694
|
-
endpointInputField: "endpoint-input-field",
|
|
23695
|
-
deliveryResponseCode: "delivery-response-code",
|
|
23696
|
-
deliveryRequestPayload: "delivery-request-payload",
|
|
23697
|
-
addSecretKey: "add-secret-key",
|
|
23698
|
-
newWebhookHeader: "add-new-webhook-pane-header",
|
|
23699
|
-
endpointInputError: "endpoint-input-error",
|
|
23700
|
-
eventsSelectError: "events-select-error",
|
|
23701
|
-
regenerateSecret: "regenerate-secret",
|
|
23702
|
-
deleteSecret: "delete-secret",
|
|
23703
|
-
};
|
|
23704
|
-
|
|
23705
23852
|
class WebhooksPage {
|
|
23706
23853
|
constructor({ page, request, neetoPlaywrightUtilities, context, }) {
|
|
23707
23854
|
this.getWebhookURL = async () => {
|
|
@@ -23768,28 +23915,8 @@ class WebhooksPage {
|
|
|
23768
23915
|
}
|
|
23769
23916
|
}
|
|
23770
23917
|
|
|
23771
|
-
const ZAPIER_SELECTORS = {
|
|
23772
|
-
zapTriggerStep: (zapId) => `[data-testid='step-node-${zapId}']`,
|
|
23773
|
-
zapAccountSubstep: "[data-testid='substep-Account']",
|
|
23774
|
-
zapOpenSubstepContainer: "[data-testid='open-sub-step-container']",
|
|
23775
|
-
modal: "[data-testid='Modal']",
|
|
23776
|
-
fmPrettytext: ".fm-prettytext",
|
|
23777
|
-
spinner: "[data-testid='spinner']",
|
|
23778
|
-
skeletonBlock: "[data-testid='SkeletonBlock']",
|
|
23779
|
-
accountsLoader: "[data-testid='accounts-loader']",
|
|
23780
|
-
floatingBox: "[data-testid='floating-box']",
|
|
23781
|
-
connection: "[data-testid='Connection']",
|
|
23782
|
-
deleteConnectionModal: "[data-testid='DeleteAuthModal-root']",
|
|
23783
|
-
deleteConnectionDropdownButton: "[data-testid='connection-list-item-dropdown-item-Delete']",
|
|
23784
|
-
usageAmounts: "css=[class$=UsageBar__amounts]",
|
|
23785
|
-
universalSidebar: "[data-testid='universalSidebar']",
|
|
23786
|
-
sidebarFooter: "css=[class$=InAppSidebarFooter__footerWrapper]",
|
|
23787
|
-
contextualSideBar: "[data-testid='contextual-sidebar']",
|
|
23788
|
-
iconContainer: "[data-testid='iconContainer']",
|
|
23789
|
-
};
|
|
23790
|
-
|
|
23791
23918
|
class ZapierPage extends IntegrationBase {
|
|
23792
|
-
constructor({ page, neetoPlaywrightUtilities, integrationRouteIndex, }) {
|
|
23919
|
+
constructor({ page, neetoPlaywrightUtilities, integrationRouteIndex, mailerUtils, }) {
|
|
23793
23920
|
super({
|
|
23794
23921
|
page,
|
|
23795
23922
|
integration: "zapier",
|
|
@@ -23930,7 +24057,7 @@ class ZapierPage extends IntegrationBase {
|
|
|
23930
24057
|
timeout: 10000,
|
|
23931
24058
|
});
|
|
23932
24059
|
};
|
|
23933
|
-
this.verifyZapIsTriggered = ({ productName, submittedEmail, zapTriggeredAfter, }) => this.
|
|
24060
|
+
this.verifyZapIsTriggered = ({ productName, submittedEmail, zapTriggeredAfter, }) => this.mailerUtils.findMessage({ to: ZAPIER_TEST_EMAIL(productName), body: submittedEmail }, { timeout: 2 * 60000, receivedAfter: zapTriggeredAfter });
|
|
23934
24061
|
this.skipIfTaskLimitIsExhausted = async () => {
|
|
23935
24062
|
var _a;
|
|
23936
24063
|
// Zapier provides 100 free task limit for free account; skip test if it's exhausted
|
|
@@ -23982,16 +24109,12 @@ class ZapierPage extends IntegrationBase {
|
|
|
23982
24109
|
});
|
|
23983
24110
|
await this.verifyIntegrationStatus("disconnected");
|
|
23984
24111
|
};
|
|
23985
|
-
if (ramda.isNil(process.env.INTEGRATION_MAILOSAUR_API_KEY) ||
|
|
23986
|
-
ramda.isNil(process.env.INTEGRATION_MAILOSAUR_SERVER_ID)) {
|
|
23987
|
-
throw new Error("ENV variable INTEGRATION_MAILOSAUR_API_KEY or INTEGRATION_MAILOSAUR_SERVER_ID is not properly configured");
|
|
23988
|
-
}
|
|
23989
24112
|
if (ramda.isNil(process.env.ZAPIER_LOGIN_PASSWORD) ||
|
|
23990
24113
|
ramda.isNil(process.env.ZAPIER_LOGIN_EMAIL) ||
|
|
23991
24114
|
ramda.isNil(process.env.ZAP_ID)) {
|
|
23992
24115
|
throw new Error("ENV variable ZAPIER_LOGIN_PASSWORD or ZAPIER_LOGIN_EMAIL or ZAP_ID is not properly configured");
|
|
23993
24116
|
}
|
|
23994
|
-
this.
|
|
24117
|
+
this.mailerUtils = mailerUtils;
|
|
23995
24118
|
}
|
|
23996
24119
|
}
|
|
23997
24120
|
|
|
@@ -24303,7 +24426,7 @@ class EditorPage {
|
|
|
24303
24426
|
}
|
|
24304
24427
|
|
|
24305
24428
|
class ImageUploader {
|
|
24306
|
-
constructor(
|
|
24429
|
+
constructor(page, neetoPlaywrightUtilities) {
|
|
24307
24430
|
this.submitCroppedImage = async () => {
|
|
24308
24431
|
const cropImage = this.neetoPlaywrightUtilities.interceptMultipleResponses({
|
|
24309
24432
|
responseUrl: ROUTES.directUploads,
|
|
@@ -24443,44 +24566,6 @@ class ImageUploader {
|
|
|
24443
24566
|
}
|
|
24444
24567
|
}
|
|
24445
24568
|
|
|
24446
|
-
const MEMBER_SELECTORS = {
|
|
24447
|
-
membersTab: "members-nav-tab",
|
|
24448
|
-
newButton: "ntm-add-member-button",
|
|
24449
|
-
continueButton: "ntm-manage-member-continue-button",
|
|
24450
|
-
submitButton: "ntm-manage-member-submit-button",
|
|
24451
|
-
searchTextField: "ntm-search-members-input",
|
|
24452
|
-
deactivatedAgentsButton: "ntm-members-menubar-deactivated-block",
|
|
24453
|
-
activatedMembersButton: "ntm-members-menubar-active-block",
|
|
24454
|
-
columnCheckBox: "neeto-ui-columns-checkbox",
|
|
24455
|
-
roleLabel: (role) => `${joinHyphenCase(role)}-radio-label`,
|
|
24456
|
-
teamMembersTable: "ntm-members-table",
|
|
24457
|
-
dropDownIcon: "ntm-members-table-row-dropdown-button",
|
|
24458
|
-
editButton: "ntm-edit-member-button",
|
|
24459
|
-
menuBarHeading: "ntm-members-menubar-heading",
|
|
24460
|
-
removeMember: "ntm-deactivate-member-button",
|
|
24461
|
-
columnsButton: "columns-dropdown-button",
|
|
24462
|
-
columnsDropdownContainer: "columns-dropdown-container",
|
|
24463
|
-
emailDropdownItemLabel: "email-checkbox-label",
|
|
24464
|
-
roleDropdownItemLabel: "role-checkbox-label",
|
|
24465
|
-
inviteStatusDropdownItemLabel: "invite-status-checkbox-label",
|
|
24466
|
-
heading: "ntm-manage-members-pane-header",
|
|
24467
|
-
activateButton: "ntm-activate-members-button",
|
|
24468
|
-
deactivateButton: "ntm-deactivate-members-button",
|
|
24469
|
-
rolesButton: "ntm-manage-member-roles-button",
|
|
24470
|
-
statusTag: "ntm-member-status-tag",
|
|
24471
|
-
menubarSubLink: (sublink) => `members-${sublink}-block-sub-link`,
|
|
24472
|
-
takeActionStateOption: (option = "") => `ntm-${hyphenize(option)}-members-button`,
|
|
24473
|
-
checkboxLabel: (label) => `${hyphenize(label)}-checkbox-label`,
|
|
24474
|
-
};
|
|
24475
|
-
const MEMBER_FORM_SELECTORS = {
|
|
24476
|
-
emailTextField: "email-select-input-field",
|
|
24477
|
-
firstNameTextField: "ntm-edit-member-first-name-text-field",
|
|
24478
|
-
lastNameTextField: "ntm-edit-member-last-name-text-field",
|
|
24479
|
-
emailInput: "ntm-manage-member-email-input",
|
|
24480
|
-
emailErrorField: "emails-input-error",
|
|
24481
|
-
cancelButton: "ntm-manage-member-cancel-button",
|
|
24482
|
-
};
|
|
24483
|
-
|
|
24484
24569
|
class TeamMembers {
|
|
24485
24570
|
constructor({ page, neetoPlaywrightUtilities, }) {
|
|
24486
24571
|
this.navigateToTeamMembers = async () => {
|
|
@@ -24677,41 +24762,15 @@ class TeamMembers {
|
|
|
24677
24762
|
}
|
|
24678
24763
|
}
|
|
24679
24764
|
|
|
24680
|
-
const LOGIN_SELECTORS = {
|
|
24681
|
-
appleAuthenticationButton: "apple-authentication-button",
|
|
24682
|
-
emailTextField: "login-email-text-field",
|
|
24683
|
-
googleAuthenticationButton: "google-authentication-button",
|
|
24684
|
-
githubAuthenticationButton: "github-authentication-button",
|
|
24685
|
-
loginViaEmailButton: "login-via-email-button",
|
|
24686
|
-
passwordTextField: "login-password-text-field",
|
|
24687
|
-
rememberMeCheckBox: "login-remember-me-check-box",
|
|
24688
|
-
submitButton: "login-submit-button",
|
|
24689
|
-
twitterAuthenticationButton: "twitter-authentication-button",
|
|
24690
|
-
};
|
|
24691
|
-
|
|
24692
|
-
const SIGNUP_SELECTORS = {
|
|
24693
|
-
emailTextField: "signup-email-text-field",
|
|
24694
|
-
firstNameTextField: "signup-profile-first-name-text-field",
|
|
24695
|
-
lastNameTextField: "signup-profile-last-name-text-field",
|
|
24696
|
-
organizationNameTextField: "signup-organization-name-text-field",
|
|
24697
|
-
organizationSubmitButton: "signup-organization-submit-button",
|
|
24698
|
-
otpTextBox: "otpinput-otp-number",
|
|
24699
|
-
profileSubmitButton: "signup-profile-submit-button",
|
|
24700
|
-
signupViaEmailButton: "signup-via-email-button",
|
|
24701
|
-
submitButton: "signup-email-submit-button",
|
|
24702
|
-
subdomainNameTextField: "signup-organization-subdomain-text-field",
|
|
24703
|
-
subdomainError: "subdomain-input-error",
|
|
24704
|
-
tryFreeButton: "neeto-auth-signup-link",
|
|
24705
|
-
unregisterdEmailError: "unregisterd-email-error",
|
|
24706
|
-
};
|
|
24707
|
-
|
|
24708
24765
|
const loginWithoutSSO = async ({ page, neetoPlaywrightUtilities, loginPath = "/", }) => {
|
|
24709
24766
|
if (shouldSkipSetupAndTeardown())
|
|
24710
24767
|
return;
|
|
24711
|
-
await page.goto(loginPath);
|
|
24712
|
-
await page.getByTestId("login-email-text-field").fill(CREDENTIALS.email);
|
|
24768
|
+
await page.goto(loginPath, { timeout: 20000 });
|
|
24713
24769
|
await page
|
|
24714
|
-
.getByTestId(
|
|
24770
|
+
.getByTestId(LOGIN_SELECTORS.emailTextField)
|
|
24771
|
+
.fill(CREDENTIALS.email);
|
|
24772
|
+
await page
|
|
24773
|
+
.getByTestId(LOGIN_SELECTORS.passwordTextField)
|
|
24715
24774
|
.fill(CREDENTIALS.password);
|
|
24716
24775
|
const login = neetoPlaywrightUtilities.interceptMultipleResponses({
|
|
24717
24776
|
times: 1,
|
|
@@ -24749,8 +24808,8 @@ class OrganizationPage {
|
|
|
24749
24808
|
const appNameInLowerCase = appName.toLowerCase();
|
|
24750
24809
|
const isNeetoAuth = appNameInLowerCase === "neetoauth";
|
|
24751
24810
|
isNeetoAuth
|
|
24752
|
-
? await this.page.goto(ROUTES.neetoAuthSignup)
|
|
24753
|
-
: await this.page.goto(`${ROUTES.neetoAuthSignup}?redirect_uri=${appNameInLowerCase}.net
|
|
24811
|
+
? await this.page.goto(ROUTES.neetoAuthSignup, { timeout: 20000 })
|
|
24812
|
+
: await this.page.goto(`${ROUTES.neetoAuthSignup}?redirect_uri=${appNameInLowerCase}.net`, { timeout: 20000 });
|
|
24754
24813
|
await this.page.getByTestId(SIGNUP_SELECTORS.emailTextField).fill(email);
|
|
24755
24814
|
const signup = this.neetoPlaywrightUtilities.interceptMultipleResponses({
|
|
24756
24815
|
responseUrl: ROUTES.signup,
|
|
@@ -24870,7 +24929,7 @@ class OrganizationPage {
|
|
|
24870
24929
|
await test$1.expect(this.page.getByTestId(COMMON_SELECTORS.pageLoader)).toBeHidden({ timeout: 15000 });
|
|
24871
24930
|
};
|
|
24872
24931
|
this.loginAndOnboard = async ({ email, firstName, lastName, country, handleOnboarding, baseURL = process.env.BASE_URL, }) => {
|
|
24873
|
-
await this.page.goto(`${baseURL}/${ROUTES.admin}
|
|
24932
|
+
await this.page.goto(`${baseURL}/${ROUTES.admin}`, { timeout: 20000 });
|
|
24874
24933
|
await this.loginViaSSO(email);
|
|
24875
24934
|
await this.setupProfile({ firstName, lastName, country });
|
|
24876
24935
|
await this.page.waitForURL(new RegExp(getGlobalUserState().domain), {
|
|
@@ -24880,7 +24939,7 @@ class OrganizationPage {
|
|
|
24880
24939
|
};
|
|
24881
24940
|
this.signUp = async ({ credentials, fetchOtpFromEmail, appName, }) => {
|
|
24882
24941
|
let otp = "123456";
|
|
24883
|
-
await this.page.goto(`${ROUTES.neetoAuthSignup}?redirect_uri=${credentials.domain}
|
|
24942
|
+
await this.page.goto(`${ROUTES.neetoAuthSignup}?redirect_uri=${credentials.domain}`, { timeout: 20000 });
|
|
24884
24943
|
await this.page
|
|
24885
24944
|
.getByTestId(SIGNUP_SELECTORS.emailTextField)
|
|
24886
24945
|
.fill(credentials.email);
|
|
@@ -24963,36 +25022,6 @@ class SidebarSection {
|
|
|
24963
25022
|
}
|
|
24964
25023
|
}
|
|
24965
25024
|
|
|
24966
|
-
const TAGS_SELECTORS = {
|
|
24967
|
-
newTagButton: "add-new-tag-button",
|
|
24968
|
-
tagNameTextField: "tag-name-text-field",
|
|
24969
|
-
editButton: "tags-edit-button",
|
|
24970
|
-
deleteButton: "tags-delete-button",
|
|
24971
|
-
cancelButton: "neeto-tags-manage-tag-cancel-button",
|
|
24972
|
-
submitButton: "neeto-tags-manage-tag-submit-button",
|
|
24973
|
-
searchTextField: "neeto-tags-search-text-input-field",
|
|
24974
|
-
descriptionTextArea: "tag-description-text-area",
|
|
24975
|
-
addTagButton: "neeto-tags-add-tag-button",
|
|
24976
|
-
tagSearchField: "select-tag-container",
|
|
24977
|
-
deleteTagButton: "tag-close-icon",
|
|
24978
|
-
metaDataCard: "metadata-card",
|
|
24979
|
-
metaDataBlock: "metadata-block",
|
|
24980
|
-
tagContainer: "tag-container",
|
|
24981
|
-
};
|
|
24982
|
-
const MERGE_TAGS_SELECTORS = {
|
|
24983
|
-
mergeTagsButton: "neeto-tags-merge-tags-button",
|
|
24984
|
-
mergeButton: "neeto-tags-merge-button",
|
|
24985
|
-
sourceSearchTextField: "neeto-tags-merge-source-search-text-input-field",
|
|
24986
|
-
sourceTagsList: "neeto-tags-merge-source-tags-list",
|
|
24987
|
-
destinationTagsList: "neeto-tags-merge-destination-tags-list",
|
|
24988
|
-
destinationSearchTextField: "neeto-tags-merge-destination-search-text-input-field",
|
|
24989
|
-
cancelButton: "neeto-tags-merge-cancel-button",
|
|
24990
|
-
proceedButton: "neeto-tags-merge-proceed-button",
|
|
24991
|
-
disabledTag: ".neeto-ui-cursor-not-allowed",
|
|
24992
|
-
sourceTagRow: "neeto-tags-merge-source-tags",
|
|
24993
|
-
destinationTagRow: "neeto-tags-merge-destination-tags",
|
|
24994
|
-
};
|
|
24995
|
-
|
|
24996
25025
|
class TagsApi {
|
|
24997
25026
|
constructor(neetoPlaywrightUtilities) {
|
|
24998
25027
|
this.neetoPlaywrightUtilities = neetoPlaywrightUtilities;
|
|
@@ -25138,26 +25167,6 @@ const networkConditions = {
|
|
|
25138
25167
|
},
|
|
25139
25168
|
};
|
|
25140
25169
|
|
|
25141
|
-
const ROLES_SELECTORS = {
|
|
25142
|
-
newButton: "ntm-add-role-button",
|
|
25143
|
-
proceedButton: "ntm-add-role-submit-button",
|
|
25144
|
-
cancelButton: "ntm-add-role-cancel-button",
|
|
25145
|
-
tableHeaderRoleName: "ntm-roles-table-role-header",
|
|
25146
|
-
nameTextField: "ntm-add-role-name-text-field",
|
|
25147
|
-
searchTextField: "ntm-search-roles-input",
|
|
25148
|
-
updateRolePaneHeading: "ntm-add-role-title",
|
|
25149
|
-
updateRoleCancelButton: "ntm-add-role-cancel-button",
|
|
25150
|
-
descriptionTextField: "ntm-add-role-description-text-field",
|
|
25151
|
-
permissionCategoryTitle: "ntm-roles-permission-category-title",
|
|
25152
|
-
headerColumn: "ntm-roles-table-header",
|
|
25153
|
-
dropDownIcon: "ntm-roles-table-header-role-dropdown-button",
|
|
25154
|
-
tableHeaderRoleTitle: "ntm-roles-table-header-role-title",
|
|
25155
|
-
permissionCheckbox: "ntm-roles-permission-checkbox",
|
|
25156
|
-
editRoleButton: "ntm-roles-table-edit-role-button",
|
|
25157
|
-
deleteRoleButton: "ntm-roles-table-delete-role-button",
|
|
25158
|
-
permissionCard: "ntm-roles-permission-card",
|
|
25159
|
-
};
|
|
25160
|
-
|
|
25161
25170
|
const initializeCredentials = (product) => {
|
|
25162
25171
|
var _a;
|
|
25163
25172
|
if (process.env.SKIP_SETUP === "true" && getGlobalUserState()) {
|
|
@@ -25185,24 +25194,39 @@ const initializeCredentials = (product) => {
|
|
|
25185
25194
|
}
|
|
25186
25195
|
};
|
|
25187
25196
|
|
|
25188
|
-
const addMemberViaRequest = ({ email, role = MEMBER_TEXTS.agent, appName, neetoPlaywrightUtilities, }) =>
|
|
25189
|
-
|
|
25190
|
-
|
|
25191
|
-
|
|
25192
|
-
|
|
25193
|
-
|
|
25194
|
-
|
|
25195
|
-
|
|
25196
|
-
|
|
25197
|
-
|
|
25198
|
-
|
|
25199
|
-
|
|
25197
|
+
const addMemberViaRequest = async ({ email, role = MEMBER_TEXTS.agent, appName, neetoPlaywrightUtilities, }) => {
|
|
25198
|
+
let response;
|
|
25199
|
+
await test$1.expect
|
|
25200
|
+
.poll(async () => {
|
|
25201
|
+
response = await neetoPlaywrightUtilities.apiRequest({
|
|
25202
|
+
method: "post",
|
|
25203
|
+
url: API_ROUTES.teamMembers.index,
|
|
25204
|
+
body: {
|
|
25205
|
+
user: {
|
|
25206
|
+
emails: [email],
|
|
25207
|
+
organization_role: role,
|
|
25208
|
+
app_roles: [
|
|
25209
|
+
{ app_name: appName, active_role: role, is_enabled: true },
|
|
25210
|
+
],
|
|
25211
|
+
},
|
|
25200
25212
|
},
|
|
25201
|
-
}
|
|
25202
|
-
|
|
25203
|
-
|
|
25204
|
-
|
|
25205
|
-
.
|
|
25213
|
+
});
|
|
25214
|
+
return response === null || response === void 0 ? void 0 : response.status();
|
|
25215
|
+
}, { timeout: 30000 })
|
|
25216
|
+
.toBe(200);
|
|
25217
|
+
const responseBodyBuffer = await (response === null || response === void 0 ? void 0 : response.body());
|
|
25218
|
+
const { job_id: jobId } = JSON.parse(String(responseBodyBuffer));
|
|
25219
|
+
await test$1.expect
|
|
25220
|
+
.poll(async () => {
|
|
25221
|
+
const jobResponse = await neetoPlaywrightUtilities.apiRequest({
|
|
25222
|
+
url: API_ROUTES.teamMembers.creationStatus(jobId),
|
|
25223
|
+
});
|
|
25224
|
+
const responseBodyBuffer = await (jobResponse === null || jobResponse === void 0 ? void 0 : jobResponse.body());
|
|
25225
|
+
const { is_completed: isCompleted } = JSON.parse(String(responseBodyBuffer));
|
|
25226
|
+
return isCompleted;
|
|
25227
|
+
}, { timeout: 30000 })
|
|
25228
|
+
.toBe(true);
|
|
25229
|
+
};
|
|
25206
25230
|
const editMemberViaRequest = async ({ email, firstName, lastName, newRole, neetoPlaywrightUtilities, }) => {
|
|
25207
25231
|
const response = await neetoPlaywrightUtilities.apiRequest({
|
|
25208
25232
|
method: "get",
|
|
@@ -157310,6 +157334,7 @@ exports.EmbedBase = EmbedBase;
|
|
|
157310
157334
|
exports.FONT_SIZE_SELECTORS = FONT_SIZE_SELECTORS;
|
|
157311
157335
|
exports.GLOBAL_TRANSLATIONS_PATTERN = GLOBAL_TRANSLATIONS_PATTERN;
|
|
157312
157336
|
exports.GOOGLE_CALENDAR_DATE_FORMAT = GOOGLE_CALENDAR_DATE_FORMAT;
|
|
157337
|
+
exports.GOOGLE_LOGIN_SELECTORS = GOOGLE_LOGIN_SELECTORS;
|
|
157313
157338
|
exports.GOOGLE_LOGIN_TEXTS = GOOGLE_LOGIN_TEXTS;
|
|
157314
157339
|
exports.GooglePage = GooglePage;
|
|
157315
157340
|
exports.HELP_CENTER_SELECTORS = HELP_CENTER_SELECTORS;
|
|
@@ -157364,6 +157389,7 @@ exports.TagsPage = TagsPage;
|
|
|
157364
157389
|
exports.TeamMembers = TeamMembers;
|
|
157365
157390
|
exports.ThankYouPage = ThankYouPage;
|
|
157366
157391
|
exports.USER_AGENTS = USER_AGENTS;
|
|
157392
|
+
exports.WEBHOOK_SELECTORS = WEBHOOK_SELECTORS;
|
|
157367
157393
|
exports.WebhooksPage = WebhooksPage;
|
|
157368
157394
|
exports.ZAPIER_LIMIT_EXHAUSTED_MESSAGE = ZAPIER_LIMIT_EXHAUSTED_MESSAGE;
|
|
157369
157395
|
exports.ZAPIER_SELECTORS = ZAPIER_SELECTORS;
|