@bigbinary/neeto-playwright-commons 1.13.0 → 1.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs.js +546 -455
- package/index.cjs.js.map +1 -1
- package/index.d.ts +841 -645
- package/index.js +545 -457
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -2,8 +2,8 @@ import * as fs$d from 'fs';
|
|
|
2
2
|
import fs__default, { readFileSync, writeFileSync as writeFileSync$1, unlinkSync } from 'fs';
|
|
3
3
|
import * as Path from 'path';
|
|
4
4
|
import Path__default from 'path';
|
|
5
|
-
import { execSync } from 'child_process';
|
|
6
5
|
import test$1, { expect, test as test$2, chromium as chromium$1, defineConfig, devices } from '@playwright/test';
|
|
6
|
+
import { execSync } from 'child_process';
|
|
7
7
|
import { curry, not, isEmpty as isEmpty$1, pluck, isNil, isNotNil, mergeDeepLeft, mergeAll } from 'ramda';
|
|
8
8
|
import require$$0$1 from 'util';
|
|
9
9
|
import { faker } from '@faker-js/faker';
|
|
@@ -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, truncate, isPresent
|
|
18
|
+
import { isNotPresent, isNotEmpty, humanize, dynamicArray, truncate, isPresent } 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';
|
|
@@ -61,6 +61,7 @@ const API_ROUTES = {
|
|
|
61
61
|
bulkUpdate: "/team_members/teams/bulk_update",
|
|
62
62
|
index: "/team_members/teams",
|
|
63
63
|
show: (id) => `/team_members/teams/${id}`,
|
|
64
|
+
creationStatus: (id) => `/team_members/teams/creation_status/${id}`,
|
|
64
65
|
},
|
|
65
66
|
integrations: {
|
|
66
67
|
zapier: {
|
|
@@ -214,54 +215,6 @@ const getListCount = async ({ page, countSelector, }) => {
|
|
|
214
215
|
return Number(countText === null || countText === void 0 ? void 0 : countText.trim().split(" ")[0]);
|
|
215
216
|
};
|
|
216
217
|
|
|
217
|
-
const NEETO_FILTERS_SELECTORS = {
|
|
218
|
-
emailSelectContainer: "email-select-container-wrapper",
|
|
219
|
-
filterPaneHeading: "neeto-filters-pane-header",
|
|
220
|
-
neetoFiltersEmailBlock: "neeto-filters-email-block",
|
|
221
|
-
neetoFiltersRoleBlock: "neeto-filters-role-block",
|
|
222
|
-
neetoFiltersBarClearButton: "neeto-filters-bar-clear-btn",
|
|
223
|
-
neetoFiltersNameFilterField: "neeto-filters-name-filter",
|
|
224
|
-
neetoFilterNameBlock: "neeto-filters-name-block",
|
|
225
|
-
roleSelectContainer: "role-select-container-wrapper",
|
|
226
|
-
filterButton: "neeto-filters-toggle-btn",
|
|
227
|
-
filtersClearButton: "neeto-filters-clear-btn",
|
|
228
|
-
filterDoneButton: "neeto-filters-done-btn",
|
|
229
|
-
filteredMembersCount: "ntm-filtered-members-count",
|
|
230
|
-
allMenubarBlock: "ntm-members-menubar-all-block",
|
|
231
|
-
filtersEmailFilter: "neeto-filters-email-filter",
|
|
232
|
-
paneModalCrossIcon: "neeto-filters-close-button",
|
|
233
|
-
searchTermBlock: "neeto-filters-search-term-block",
|
|
234
|
-
neetoFiltersFilter: (filterName) => `neeto-filters-${hyphenize(filterName)}-filter`,
|
|
235
|
-
};
|
|
236
|
-
|
|
237
|
-
const NEETO_IMAGE_UPLOADER_SELECTORS = {
|
|
238
|
-
imageUploaderWrapper: "image-uploader-wrapper",
|
|
239
|
-
browseText: "neeto-image-uploader-browse-text",
|
|
240
|
-
fileInput: "neeto-image-uploader-file-input",
|
|
241
|
-
uploadedImage: "uploaded-image",
|
|
242
|
-
uploadNewAsset: "upload-new-asset",
|
|
243
|
-
basicImageUploaderRemoveButton: "basic-image-uploader-remove-button",
|
|
244
|
-
removeButton: "image-uploader-remove-button",
|
|
245
|
-
openImageLibraryButton: "image-uploader-open-image-library-button",
|
|
246
|
-
openAssetLibraryButton: "open-asset-library-button",
|
|
247
|
-
imageEditorBackButton: "image-editor-back-button",
|
|
248
|
-
aspectRatioWidthInput: "aspect-ratio-width-input",
|
|
249
|
-
aspectRatioHeightInput: "aspect-ratio-height-input",
|
|
250
|
-
cropSubmitButton: "neeto-image-uploader-crop-submit-button",
|
|
251
|
-
restrictionMessage: "neeto-image-uploader-restriction-message",
|
|
252
|
-
progressBar: "neeto-image-uploader-progress-bar",
|
|
253
|
-
myImagesTab: "neeto-image-uploader-my-images-tab",
|
|
254
|
-
unsplashTab: "neeto-image-uploader-unsplash-tab",
|
|
255
|
-
nthLibraryImage: (index) => `niu-library-image-${index}`,
|
|
256
|
-
nthUnsplashImage: (index) => `niu-unsplash-image-${index}`,
|
|
257
|
-
unsplashSearchInput: "niu-unsplash-image-picker-search-input",
|
|
258
|
-
imageEditorUploadedImage: "image-editor-uploaded-image",
|
|
259
|
-
selectOriginalImageSwitch: "select-original-image-switch",
|
|
260
|
-
lockAspectRatioSwitch: "lock-aspect-ratio-switch",
|
|
261
|
-
widthInputField: "width-input-field",
|
|
262
|
-
heightInputField: "height-input-field",
|
|
263
|
-
};
|
|
264
|
-
|
|
265
218
|
const COMMON_SELECTORS = {
|
|
266
219
|
emailInputError: "email-input-error",
|
|
267
220
|
pane: "pane-wrapper",
|
|
@@ -354,6 +307,429 @@ const COMMON_SELECTORS = {
|
|
|
354
307
|
customDropDownMenu: (label = "nui") => `${hyphenize(label)}-select-menu`,
|
|
355
308
|
};
|
|
356
309
|
|
|
310
|
+
const THANK_YOU_SELECTORS = {
|
|
311
|
+
settingsLink: "thank-you-settings-link",
|
|
312
|
+
showSocialShareIconsSwitch: "show-social-share-icons-switch",
|
|
313
|
+
showLinkToSubmitAnotherResponseSwitch: "show-link-to-submit-another-response-switch",
|
|
314
|
+
submitAnotherResponseLinkTextInputField: "submit-another-response-link-text-input-field",
|
|
315
|
+
previewEditorContent: "preview-editor-content",
|
|
316
|
+
redirectToExternalLinkRadioLabel: () => "neeto-thank-you-configuration-redirect-to-url-label",
|
|
317
|
+
thankYouConfigurationLabel: (label = "custom-message") => `neeto-thank-you-configuration-${label}-label`,
|
|
318
|
+
saveChangesButton: "neeto-thank-you-configuration-save-button",
|
|
319
|
+
cancelButton: "neeto-thank-you-configuration-cancel-button",
|
|
320
|
+
thankYouPageImage: "thank-you-page-image",
|
|
321
|
+
thankYouPageMessage: "thank-you-page-message",
|
|
322
|
+
thankYouPageContent: "thank-you-page-content",
|
|
323
|
+
thankYouPageResubmitLink: "thank-you-page-resubmit-link",
|
|
324
|
+
linkInputField: "link-input-field",
|
|
325
|
+
previewImage: "preview-image",
|
|
326
|
+
};
|
|
327
|
+
|
|
328
|
+
const optionSelector = (option) => `neeto-editor-fixed-menu-${option}-option`;
|
|
329
|
+
const fixedMenuSelector = (selector) => `neeto-editor-fixed-menu-${selector}`;
|
|
330
|
+
|
|
331
|
+
const NEETO_EDITOR_SELECTORS = {
|
|
332
|
+
fontSize: optionSelector("font-size"),
|
|
333
|
+
boldOption: optionSelector("bold"),
|
|
334
|
+
italicOption: optionSelector("italic"),
|
|
335
|
+
underlineOption: optionSelector("underline"),
|
|
336
|
+
strikeOption: optionSelector("strike"),
|
|
337
|
+
codeBlockOption: optionSelector("code"),
|
|
338
|
+
highlightOption: optionSelector("highlight"),
|
|
339
|
+
emojiOption: optionSelector("emoji"),
|
|
340
|
+
emojiDropdownIcon: "emoji-dropdown-icon",
|
|
341
|
+
linkInput: fixedMenuSelector("link-option-input"),
|
|
342
|
+
linkSubmitButton: fixedMenuSelector("link-option-link-button"),
|
|
343
|
+
commandList: (index) => `neeto-editor-command-list-item-${index}`,
|
|
344
|
+
imageUploadUrlSubmitButton: "neeto-editor-media-upload-url-submit",
|
|
345
|
+
imageUploadUrlInputTextField: "neeto-editor-media-upload-url-input",
|
|
346
|
+
uploadInput: "neeto-editor-media-uploader-input",
|
|
347
|
+
editorMenuBarWrapper: fixedMenuSelector("wrapper"),
|
|
348
|
+
undoOption: optionSelector("undo"),
|
|
349
|
+
redoOption: optionSelector("redo"),
|
|
350
|
+
imageWrapper: "neeto-editor-image-wrapper",
|
|
351
|
+
contentField: "neeto-editor-content",
|
|
352
|
+
addLinkButton: optionSelector("link"),
|
|
353
|
+
addLinkTextField: "neeto-editor-add-link-text-input",
|
|
354
|
+
addURLTextField: "neeto-editor-add-link-url-input",
|
|
355
|
+
submitLinkButton: "neeto-editor-add-link",
|
|
356
|
+
fixedMenuArrow: fixedMenuSelector("arrow"),
|
|
357
|
+
cannedResponseOption: optionSelector("canned-responses"),
|
|
358
|
+
cannedResponseSelectContainer: "select-a-canned-response-select-container",
|
|
359
|
+
fixedMenuWrapper: fixedMenuSelector("wrapper"),
|
|
360
|
+
linkOption: optionSelector("link"),
|
|
361
|
+
addLinkUrlInput: "neeto-editor-add-link-url-input",
|
|
362
|
+
addLinkDoneButton: "neeto-editor-add-link",
|
|
363
|
+
unlinkButton: "neeto-editor-link-popover-unlink",
|
|
364
|
+
editorAttachmentsButton: optionSelector("attachments"),
|
|
365
|
+
attachmentPreviewDeleteButton: "neeto-editor-preview-delete-button",
|
|
366
|
+
imageUploadOption: optionSelector("image-upload"),
|
|
367
|
+
imageUploadLinkInput: "neeto-editor-media-upload-url-input",
|
|
368
|
+
imageUploadButton: "neeto-editor-media-uploader-dnd",
|
|
369
|
+
imageUploadLinkSubmitButton: "neeto-editor-media-upload-url-submit",
|
|
370
|
+
applyButton: "apply-button",
|
|
371
|
+
videoEmbedOption: optionSelector("video-embed"),
|
|
372
|
+
videoEmbedInput: "neeto-editor-embed-input",
|
|
373
|
+
videoEmbedSubmit: "neeto-editor-embed-cancel",
|
|
374
|
+
videoWrapper: "neeto-editor-video-wrapper",
|
|
375
|
+
paragraphOption: fixedMenuSelector("font-size-option-body2"),
|
|
376
|
+
attachmentPreview: "ne-attachments-wrapper",
|
|
377
|
+
imageUploadLinkButton: "neeto-editor-media-uploader-link-tab",
|
|
378
|
+
errorText: "neeto-editor-error-text",
|
|
379
|
+
content: "editor-content",
|
|
380
|
+
imageUploadDeleteButton: "neeto-editor-image-menu-Delete",
|
|
381
|
+
dynamicVariablesButton: "dynamic-variables-button",
|
|
382
|
+
emojiContainer: "neeto-editor-emoji-picker",
|
|
383
|
+
dynamicVariableSelector: (variable) => `dynamic-variables-list-item-${variable}`,
|
|
384
|
+
};
|
|
385
|
+
const NEETO_TEXT_MODIFIER_SELECTORS = {
|
|
386
|
+
strike: optionSelector("strike"),
|
|
387
|
+
underline: optionSelector("underline"),
|
|
388
|
+
highlight: optionSelector("highlight"),
|
|
389
|
+
};
|
|
390
|
+
const TEXT_MODIFIER_SELECTORS = {
|
|
391
|
+
bold: optionSelector("bold"),
|
|
392
|
+
italic: optionSelector("italic"),
|
|
393
|
+
code: optionSelector("code"),
|
|
394
|
+
blockquote: optionSelector("blockquote"),
|
|
395
|
+
codeBlock: optionSelector("codeBlock"),
|
|
396
|
+
};
|
|
397
|
+
const LIST_MODIFIER_SELECTORS = {
|
|
398
|
+
bulletList: optionSelector("bulletList"),
|
|
399
|
+
orderedList: optionSelector("orderedList"),
|
|
400
|
+
};
|
|
401
|
+
const FONT_SIZE_SELECTORS = {
|
|
402
|
+
h1: fixedMenuSelector("font-size-option-h1"),
|
|
403
|
+
h2: fixedMenuSelector("font-size-option-h2"),
|
|
404
|
+
h3: fixedMenuSelector("font-size-option-h3"),
|
|
405
|
+
h4: fixedMenuSelector("font-size-option-h4"),
|
|
406
|
+
h5: fixedMenuSelector("font-size-option-h5"),
|
|
407
|
+
};
|
|
408
|
+
|
|
409
|
+
const EMBED_SELECTORS = {
|
|
410
|
+
iframe: (appName) => `#${appName}-iframe`,
|
|
411
|
+
modal: (appName) => `#${appName}-modal`,
|
|
412
|
+
close: (appName) => `#close-${appName}`,
|
|
413
|
+
loader: (appName) => `#${appName}-loader`,
|
|
414
|
+
inlineHeightInput: "inline-height-input-field",
|
|
415
|
+
inlineWidthInput: "inline-width-input-field",
|
|
416
|
+
inlineElementIdInput: "inline-element-id-input-field",
|
|
417
|
+
codeBlock: "code-block",
|
|
418
|
+
previewTab: "preview-tab",
|
|
419
|
+
htmlTab: "html-tab",
|
|
420
|
+
buttonTextInput: "button-text-input-field",
|
|
421
|
+
buttonPositionSelectContainer: "button-position-select-value-container",
|
|
422
|
+
buttonPositionSelectMenu: "button-position-select-menu",
|
|
423
|
+
buttonColorLabel: "button-color-label",
|
|
424
|
+
buttonTextColorLabel: "button-text-color-label",
|
|
425
|
+
colorPickerTarget: "color-picker-target",
|
|
426
|
+
colorpickerEditableInput: "colorpicker-editable-input",
|
|
427
|
+
showIconCheckbox: "show-icon-checkbox",
|
|
428
|
+
elementIdInput: "element-id-input-field",
|
|
429
|
+
previewElementPopupButton: "preview-element-popup-button",
|
|
430
|
+
};
|
|
431
|
+
|
|
432
|
+
const NEETO_FILTERS_SELECTORS = {
|
|
433
|
+
emailSelectContainer: "email-select-container-wrapper",
|
|
434
|
+
filterPaneHeading: "neeto-filters-pane-header",
|
|
435
|
+
neetoFiltersEmailBlock: "neeto-filters-email-block",
|
|
436
|
+
neetoFiltersRoleBlock: "neeto-filters-role-block",
|
|
437
|
+
neetoFiltersBarClearButton: "neeto-filters-bar-clear-btn",
|
|
438
|
+
neetoFiltersNameFilterField: "neeto-filters-name-filter",
|
|
439
|
+
neetoFilterNameBlock: "neeto-filters-name-block",
|
|
440
|
+
roleSelectContainer: "role-select-container-wrapper",
|
|
441
|
+
filterButton: "neeto-filters-toggle-btn",
|
|
442
|
+
filtersClearButton: "neeto-filters-clear-btn",
|
|
443
|
+
filterDoneButton: "neeto-filters-done-btn",
|
|
444
|
+
filteredMembersCount: "ntm-filtered-members-count",
|
|
445
|
+
allMenubarBlock: "ntm-members-menubar-all-block",
|
|
446
|
+
filtersEmailFilter: "neeto-filters-email-filter",
|
|
447
|
+
paneModalCrossIcon: "neeto-filters-close-button",
|
|
448
|
+
searchTermBlock: "neeto-filters-search-term-block",
|
|
449
|
+
neetoFiltersFilter: (filterName) => `neeto-filters-${hyphenize(filterName)}-filter`,
|
|
450
|
+
};
|
|
451
|
+
|
|
452
|
+
const HELP_CENTER_SELECTORS = {
|
|
453
|
+
helpButton: "help-button",
|
|
454
|
+
documentationButton: "help-link-help-center-button",
|
|
455
|
+
keyboardShortcutButton: "help-link-keyboard-shortcut-button",
|
|
456
|
+
chatButton: "help-link-live-chat-button",
|
|
457
|
+
whatsNewButton: "help-link-engage-button",
|
|
458
|
+
whatsNewWidgetInfo: "h1",
|
|
459
|
+
whatsNewWidgetCloseButton: ".ne-widget-header__btn",
|
|
460
|
+
keyboardShortcutPaneHeading: "keyboard-shortcuts-pane-title",
|
|
461
|
+
keyboardShortcutPaneCrossIcon: "keyboard-shortcuts-pane-close-button",
|
|
462
|
+
};
|
|
463
|
+
|
|
464
|
+
const NEETO_IMAGE_UPLOADER_SELECTORS = {
|
|
465
|
+
imageUploaderWrapper: "image-uploader-wrapper",
|
|
466
|
+
browseText: "neeto-image-uploader-browse-text",
|
|
467
|
+
fileInput: "neeto-image-uploader-file-input",
|
|
468
|
+
uploadedImage: "uploaded-image",
|
|
469
|
+
uploadNewAsset: "upload-new-asset",
|
|
470
|
+
basicImageUploaderRemoveButton: "basic-image-uploader-remove-button",
|
|
471
|
+
removeButton: "image-uploader-remove-button",
|
|
472
|
+
openImageLibraryButton: "image-uploader-open-image-library-button",
|
|
473
|
+
openAssetLibraryButton: "open-asset-library-button",
|
|
474
|
+
imageEditorBackButton: "image-editor-back-button",
|
|
475
|
+
aspectRatioWidthInput: "aspect-ratio-width-input",
|
|
476
|
+
aspectRatioHeightInput: "aspect-ratio-height-input",
|
|
477
|
+
cropSubmitButton: "neeto-image-uploader-crop-submit-button",
|
|
478
|
+
restrictionMessage: "neeto-image-uploader-restriction-message",
|
|
479
|
+
progressBar: "neeto-image-uploader-progress-bar",
|
|
480
|
+
myImagesTab: "neeto-image-uploader-my-images-tab",
|
|
481
|
+
unsplashTab: "neeto-image-uploader-unsplash-tab",
|
|
482
|
+
nthLibraryImage: (index) => `niu-library-image-${index}`,
|
|
483
|
+
nthUnsplashImage: (index) => `niu-unsplash-image-${index}`,
|
|
484
|
+
unsplashSearchInput: "niu-unsplash-image-picker-search-input",
|
|
485
|
+
imageEditorUploadedImage: "image-editor-uploaded-image",
|
|
486
|
+
selectOriginalImageSwitch: "select-original-image-switch",
|
|
487
|
+
lockAspectRatioSwitch: "lock-aspect-ratio-switch",
|
|
488
|
+
widthInputField: "width-input-field",
|
|
489
|
+
heightInputField: "height-input-field",
|
|
490
|
+
};
|
|
491
|
+
|
|
492
|
+
const LOGIN_SELECTORS = {
|
|
493
|
+
appleAuthenticationButton: "apple-authentication-button",
|
|
494
|
+
emailTextField: "login-email-text-field",
|
|
495
|
+
googleAuthenticationButton: "google-authentication-button",
|
|
496
|
+
githubAuthenticationButton: "github-authentication-button",
|
|
497
|
+
loginViaEmailButton: "login-via-email-button",
|
|
498
|
+
passwordTextField: "login-password-text-field",
|
|
499
|
+
rememberMeCheckBox: "login-remember-me-check-box",
|
|
500
|
+
submitButton: "login-submit-button",
|
|
501
|
+
twitterAuthenticationButton: "twitter-authentication-button",
|
|
502
|
+
};
|
|
503
|
+
|
|
504
|
+
const MEMBER_SELECTORS = {
|
|
505
|
+
membersTab: "members-nav-tab",
|
|
506
|
+
newButton: "ntm-add-member-button",
|
|
507
|
+
continueButton: "ntm-manage-member-continue-button",
|
|
508
|
+
submitButton: "ntm-manage-member-submit-button",
|
|
509
|
+
searchTextField: "ntm-search-members-input",
|
|
510
|
+
deactivatedAgentsButton: "ntm-members-menubar-deactivated-block",
|
|
511
|
+
activatedMembersButton: "ntm-members-menubar-active-block",
|
|
512
|
+
columnCheckBox: "neeto-ui-columns-checkbox",
|
|
513
|
+
roleLabel: (role) => `${joinHyphenCase(role)}-radio-label`,
|
|
514
|
+
teamMembersTable: "ntm-members-table",
|
|
515
|
+
dropDownIcon: "ntm-members-table-row-dropdown-button",
|
|
516
|
+
editButton: "ntm-edit-member-button",
|
|
517
|
+
menuBarHeading: "ntm-members-menubar-heading",
|
|
518
|
+
removeMember: "ntm-deactivate-member-button",
|
|
519
|
+
columnsButton: "columns-dropdown-button",
|
|
520
|
+
columnsDropdownContainer: "columns-dropdown-container",
|
|
521
|
+
emailDropdownItemLabel: "email-checkbox-label",
|
|
522
|
+
roleDropdownItemLabel: "role-checkbox-label",
|
|
523
|
+
inviteStatusDropdownItemLabel: "invite-status-checkbox-label",
|
|
524
|
+
heading: "ntm-manage-members-pane-header",
|
|
525
|
+
activateButton: "ntm-activate-members-button",
|
|
526
|
+
deactivateButton: "ntm-deactivate-members-button",
|
|
527
|
+
rolesButton: "ntm-manage-member-roles-button",
|
|
528
|
+
statusTag: "ntm-member-status-tag",
|
|
529
|
+
menubarSubLink: (sublink) => `members-${sublink}-block-sub-link`,
|
|
530
|
+
takeActionStateOption: (option = "") => `ntm-${hyphenize(option)}-members-button`,
|
|
531
|
+
checkboxLabel: (label) => `${hyphenize(label)}-checkbox-label`,
|
|
532
|
+
};
|
|
533
|
+
const MEMBER_FORM_SELECTORS = {
|
|
534
|
+
emailTextField: "email-select-input-field",
|
|
535
|
+
firstNameTextField: "ntm-edit-member-first-name-text-field",
|
|
536
|
+
lastNameTextField: "ntm-edit-member-last-name-text-field",
|
|
537
|
+
emailInput: "ntm-manage-member-email-input",
|
|
538
|
+
emailErrorField: "emails-input-error",
|
|
539
|
+
cancelButton: "ntm-manage-member-cancel-button",
|
|
540
|
+
};
|
|
541
|
+
|
|
542
|
+
const PROFILE_SECTION_SELECTORS = {
|
|
543
|
+
profileSectionButton: "profile-section",
|
|
544
|
+
profilePopup: "profile-popup",
|
|
545
|
+
myProfileButton: "my-profile-button",
|
|
546
|
+
profileOrganizationSettingsButton: "profile-organization-settings-button",
|
|
547
|
+
logoutButton: "profile-logout-button",
|
|
548
|
+
neetoAuthLink: "ntm-visit-auth-button",
|
|
549
|
+
profileSidebarCancelButton: "ntm-profile-cancel-button",
|
|
550
|
+
profileAvatar: "profile-avatar",
|
|
551
|
+
actionHeaderUserEmail: "floating-action-menu-header-user-email",
|
|
552
|
+
};
|
|
553
|
+
|
|
554
|
+
const ROLES_SELECTORS = {
|
|
555
|
+
newButton: "ntm-add-role-button",
|
|
556
|
+
proceedButton: "ntm-add-role-submit-button",
|
|
557
|
+
cancelButton: "ntm-add-role-cancel-button",
|
|
558
|
+
tableHeaderRoleName: "ntm-roles-table-role-header",
|
|
559
|
+
nameTextField: "ntm-add-role-name-text-field",
|
|
560
|
+
searchTextField: "ntm-search-roles-input",
|
|
561
|
+
updateRolePaneHeading: "ntm-add-role-title",
|
|
562
|
+
updateRoleCancelButton: "ntm-add-role-cancel-button",
|
|
563
|
+
descriptionTextField: "ntm-add-role-description-text-field",
|
|
564
|
+
permissionCategoryTitle: "ntm-roles-permission-category-title",
|
|
565
|
+
headerColumn: "ntm-roles-table-header",
|
|
566
|
+
dropDownIcon: "ntm-roles-table-header-role-dropdown-button",
|
|
567
|
+
tableHeaderRoleTitle: "ntm-roles-table-header-role-title",
|
|
568
|
+
permissionCheckbox: "ntm-roles-permission-checkbox",
|
|
569
|
+
editRoleButton: "ntm-roles-table-edit-role-button",
|
|
570
|
+
deleteRoleButton: "ntm-roles-table-delete-role-button",
|
|
571
|
+
permissionCard: "ntm-roles-permission-card",
|
|
572
|
+
};
|
|
573
|
+
|
|
574
|
+
const SIGNUP_SELECTORS = {
|
|
575
|
+
emailTextField: "signup-email-text-field",
|
|
576
|
+
firstNameTextField: "signup-profile-first-name-text-field",
|
|
577
|
+
lastNameTextField: "signup-profile-last-name-text-field",
|
|
578
|
+
organizationNameTextField: "signup-organization-name-text-field",
|
|
579
|
+
organizationSubmitButton: "signup-organization-submit-button",
|
|
580
|
+
otpTextBox: "otpinput-otp-number",
|
|
581
|
+
profileSubmitButton: "signup-profile-submit-button",
|
|
582
|
+
signupViaEmailButton: "signup-via-email-button",
|
|
583
|
+
submitButton: "signup-email-submit-button",
|
|
584
|
+
subdomainNameTextField: "signup-organization-subdomain-text-field",
|
|
585
|
+
subdomainError: "subdomain-input-error",
|
|
586
|
+
tryFreeButton: "neeto-auth-signup-link",
|
|
587
|
+
unregisterdEmailError: "unregisterd-email-error",
|
|
588
|
+
};
|
|
589
|
+
|
|
590
|
+
const TAB_SELECTORS = {
|
|
591
|
+
configureTab: "configure-tab",
|
|
592
|
+
buildTab: "build-tab",
|
|
593
|
+
themeTab: "theme-tab",
|
|
594
|
+
shareTab: "share-tab",
|
|
595
|
+
submissionsTab: "submissions-tab",
|
|
596
|
+
paymentsTab: "payments-tab",
|
|
597
|
+
};
|
|
598
|
+
|
|
599
|
+
const TAGS_SELECTORS = {
|
|
600
|
+
newTagButton: "add-new-tag-button",
|
|
601
|
+
tagNameTextField: "tag-name-text-field",
|
|
602
|
+
editButton: "tags-edit-button",
|
|
603
|
+
deleteButton: "tags-delete-button",
|
|
604
|
+
cancelButton: "neeto-tags-manage-tag-cancel-button",
|
|
605
|
+
submitButton: "neeto-tags-manage-tag-submit-button",
|
|
606
|
+
searchTextField: "neeto-tags-search-text-input-field",
|
|
607
|
+
descriptionTextArea: "tag-description-text-area",
|
|
608
|
+
addTagButton: "neeto-tags-add-tag-button",
|
|
609
|
+
tagSearchField: "select-tag-container",
|
|
610
|
+
deleteTagButton: "tag-close-icon",
|
|
611
|
+
metaDataCard: "metadata-card",
|
|
612
|
+
metaDataBlock: "metadata-block",
|
|
613
|
+
tagContainer: "tag-container",
|
|
614
|
+
};
|
|
615
|
+
const MERGE_TAGS_SELECTORS = {
|
|
616
|
+
mergeTagsButton: "neeto-tags-merge-tags-button",
|
|
617
|
+
mergeButton: "neeto-tags-merge-button",
|
|
618
|
+
sourceSearchTextField: "neeto-tags-merge-source-search-text-input-field",
|
|
619
|
+
sourceTagsList: "neeto-tags-merge-source-tags-list",
|
|
620
|
+
destinationTagsList: "neeto-tags-merge-destination-tags-list",
|
|
621
|
+
destinationSearchTextField: "neeto-tags-merge-destination-search-text-input-field",
|
|
622
|
+
cancelButton: "neeto-tags-merge-cancel-button",
|
|
623
|
+
proceedButton: "neeto-tags-merge-proceed-button",
|
|
624
|
+
disabledTag: ".neeto-ui-cursor-not-allowed",
|
|
625
|
+
sourceTagRow: "neeto-tags-merge-source-tags",
|
|
626
|
+
destinationTagRow: "neeto-tags-merge-destination-tags",
|
|
627
|
+
};
|
|
628
|
+
|
|
629
|
+
const CHAT_WIDGET_SELECTORS = {
|
|
630
|
+
iframe: "#neetochat-iframe",
|
|
631
|
+
spinner: ".neeto-chat-widget-spinner",
|
|
632
|
+
helpButton: "help-button",
|
|
633
|
+
preChatEmailInput: "neeto-chat-widget-input",
|
|
634
|
+
preChatSubmitButton: "neeto-chat-widget-pre-chat-submit-btn",
|
|
635
|
+
chatBubble: "neeto-chat-widget-chat-message-bubble",
|
|
636
|
+
closeChat: "neeto-chat-widget-close-btn",
|
|
637
|
+
chatQuestionHeader: "chat-question-header",
|
|
638
|
+
};
|
|
639
|
+
const CHANGELOG_WIDGET_SELECTORS = {
|
|
640
|
+
changelogWrapper: ".ne-widget__wrapper",
|
|
641
|
+
closeButton: "ne-widget-close-btn",
|
|
642
|
+
publicUrlLink: "ne-widget-public-url",
|
|
643
|
+
};
|
|
644
|
+
const KEYBOARD_SHORTCUTS_SELECTORS = {
|
|
645
|
+
keyboardShortcutsPane: "keyboard-shortcuts-pane",
|
|
646
|
+
closePaneButton: "keyboard-shortcuts-pane-close-button",
|
|
647
|
+
hotKeyItem: "hotkey-item",
|
|
648
|
+
};
|
|
649
|
+
|
|
650
|
+
const INTEGRATION_SELECTORS = {
|
|
651
|
+
integrationCard: (integration) => `${integration}-integration-card`,
|
|
652
|
+
connectButton: "connect-button",
|
|
653
|
+
integrationStatusTag: "integration-status-tag",
|
|
654
|
+
disconnectButton: "disconnect-button",
|
|
655
|
+
manageButton: "manage-button",
|
|
656
|
+
};
|
|
657
|
+
|
|
658
|
+
const GOOGLE_LOGIN_SELECTORS = {
|
|
659
|
+
totpNext: "#totpNext",
|
|
660
|
+
form: "form",
|
|
661
|
+
totpChallengeSelector: '[data-challengeid="2"]',
|
|
662
|
+
signOutFrameLocator: 'iframe[name="account"]',
|
|
663
|
+
};
|
|
664
|
+
|
|
665
|
+
const dataQa = (value) => `[data-qa='${value}']`;
|
|
666
|
+
const SLACK_SELECTORS = {
|
|
667
|
+
messageContainer: dataQa("message_container"),
|
|
668
|
+
loginEmail: dataQa("login_email"),
|
|
669
|
+
loginPassword: dataQa("login_password"),
|
|
670
|
+
signInButton: dataQa("signin_button"),
|
|
671
|
+
teamPicketButtonContent: dataQa("team-picker-button-content"),
|
|
672
|
+
redirectOpenInBrowser: dataQa("ssb_redirect_open_in_browser"),
|
|
673
|
+
workspaceActionsButton: dataQa("workspace_actions_button"),
|
|
674
|
+
teamMenuTrigger: dataQa("team-menu-trigger"),
|
|
675
|
+
menuItemButton: "menu_item_button",
|
|
676
|
+
threadsFlexpane: "threads_flexpane",
|
|
677
|
+
replyBar: "reply_bar",
|
|
678
|
+
markdownElement: "bk_markdown_element",
|
|
679
|
+
virtualListItem: "virtual-list-item",
|
|
680
|
+
channelItems: '[role="treeitem"][data-qa="virtual-list-item"]',
|
|
681
|
+
};
|
|
682
|
+
const SLACK_DATA_QA_SELECTORS = {
|
|
683
|
+
sectionHeadingButton: "section_heading_button__channels",
|
|
684
|
+
coachMarkCloseButton: "coachmark-close-button",
|
|
685
|
+
messagePaneBannerCloseIcon: "message_pane_banner_close_icon",
|
|
686
|
+
permissionBannerCloseIcon: "banner_close_btn",
|
|
687
|
+
channelSectionSubmenuCreate: "channel_section_submenu_create",
|
|
688
|
+
channelSectionMenuCreateChannel: "channel_section_menu__create_channel",
|
|
689
|
+
skModalContent: "sk-modal-content",
|
|
690
|
+
infiniteSpinner: "infinite-spinner",
|
|
691
|
+
channelNameOptionsList: "channel-name-options-list",
|
|
692
|
+
channelNameInput: "channel-name-input",
|
|
693
|
+
createChannelNextButton: "create-channel-next-button",
|
|
694
|
+
inviteToWorkspaceSkipButton: "invite_to_workspace_skip_button",
|
|
695
|
+
menuItems: "menu_items",
|
|
696
|
+
channelDetailsModal: "channel_details_modal",
|
|
697
|
+
channelDetailsSettingsTab: "channel_details_settings_tab",
|
|
698
|
+
};
|
|
699
|
+
|
|
700
|
+
const WEBHOOK_SELECTORS = {
|
|
701
|
+
addNewWebhook: "add-new-webhook-button",
|
|
702
|
+
endpointInputField: "endpoint-input-field",
|
|
703
|
+
deliveryResponseCode: "delivery-response-code",
|
|
704
|
+
deliveryRequestPayload: "delivery-request-payload",
|
|
705
|
+
addSecretKey: "add-secret-key",
|
|
706
|
+
newWebhookHeader: "add-new-webhook-pane-header",
|
|
707
|
+
endpointInputError: "endpoint-input-error",
|
|
708
|
+
eventsSelectError: "events-select-error",
|
|
709
|
+
regenerateSecret: "regenerate-secret",
|
|
710
|
+
deleteSecret: "delete-secret",
|
|
711
|
+
};
|
|
712
|
+
|
|
713
|
+
const ZAPIER_SELECTORS = {
|
|
714
|
+
zapTriggerStep: (zapId) => `[data-testid='step-node-${zapId}']`,
|
|
715
|
+
zapAccountSubstep: "[data-testid='substep-Account']",
|
|
716
|
+
zapOpenSubstepContainer: "[data-testid='open-sub-step-container']",
|
|
717
|
+
modal: "[data-testid='Modal']",
|
|
718
|
+
fmPrettytext: ".fm-prettytext",
|
|
719
|
+
spinner: "[data-testid='spinner']",
|
|
720
|
+
skeletonBlock: "[data-testid='SkeletonBlock']",
|
|
721
|
+
accountsLoader: "[data-testid='accounts-loader']",
|
|
722
|
+
floatingBox: "[data-testid='floating-box']",
|
|
723
|
+
connection: "[data-testid='Connection']",
|
|
724
|
+
deleteConnectionModal: "[data-testid='DeleteAuthModal-root']",
|
|
725
|
+
deleteConnectionDropdownButton: "[data-testid='connection-list-item-dropdown-item-Delete']",
|
|
726
|
+
usageAmounts: "css=[class$=UsageBar__amounts]",
|
|
727
|
+
universalSidebar: "[data-testid='universalSidebar']",
|
|
728
|
+
sidebarFooter: "css=[class$=InAppSidebarFooter__footerWrapper]",
|
|
729
|
+
contextualSideBar: "[data-testid='contextual-sidebar']",
|
|
730
|
+
iconContainer: "[data-testid='iconContainer']",
|
|
731
|
+
};
|
|
732
|
+
|
|
357
733
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
358
734
|
|
|
359
735
|
function getDefaultExportFromCjs (x) {
|
|
@@ -11792,7 +12168,7 @@ const commands = {
|
|
|
11792
12168
|
}
|
|
11793
12169
|
},
|
|
11794
12170
|
page: async ({ page }, use) => {
|
|
11795
|
-
await page.goto("/");
|
|
12171
|
+
await page.goto("/", { timeout: 20000 });
|
|
11796
12172
|
await page.waitForLoadState();
|
|
11797
12173
|
await use(page);
|
|
11798
12174
|
},
|
|
@@ -20765,114 +21141,6 @@ const i18nFixture = {
|
|
|
20765
21141
|
],
|
|
20766
21142
|
};
|
|
20767
21143
|
|
|
20768
|
-
const THANK_YOU_SELECTORS = {
|
|
20769
|
-
settingsLink: "thank-you-settings-link",
|
|
20770
|
-
showSocialShareIconsSwitch: "show-social-share-icons-switch",
|
|
20771
|
-
showLinkToSubmitAnotherResponseSwitch: "show-link-to-submit-another-response-switch",
|
|
20772
|
-
submitAnotherResponseLinkTextInputField: "submit-another-response-link-text-input-field",
|
|
20773
|
-
previewEditorContent: "preview-editor-content",
|
|
20774
|
-
redirectToExternalLinkRadioLabel: () => "neeto-thank-you-configuration-redirect-to-url-label",
|
|
20775
|
-
thankYouConfigurationLabel: (label = "custom-message") => `neeto-thank-you-configuration-${label}-label`,
|
|
20776
|
-
saveChangesButton: "neeto-thank-you-configuration-save-button",
|
|
20777
|
-
cancelButton: "neeto-thank-you-configuration-cancel-button",
|
|
20778
|
-
thankYouPageImage: "thank-you-page-image",
|
|
20779
|
-
thankYouPageMessage: "thank-you-page-message",
|
|
20780
|
-
thankYouPageContent: "thank-you-page-content",
|
|
20781
|
-
thankYouPageResubmitLink: "thank-you-page-resubmit-link",
|
|
20782
|
-
linkInputField: "link-input-field",
|
|
20783
|
-
previewImage: "preview-image",
|
|
20784
|
-
};
|
|
20785
|
-
|
|
20786
|
-
const optionSelector = (option) => `neeto-editor-fixed-menu-${option}-option`;
|
|
20787
|
-
const fixedMenuSelector = (selector) => `neeto-editor-fixed-menu-${selector}`;
|
|
20788
|
-
|
|
20789
|
-
const NEETO_EDITOR_SELECTORS = {
|
|
20790
|
-
fontSize: optionSelector("font-size"),
|
|
20791
|
-
boldOption: optionSelector("bold"),
|
|
20792
|
-
italicOption: optionSelector("italic"),
|
|
20793
|
-
underlineOption: optionSelector("underline"),
|
|
20794
|
-
strikeOption: optionSelector("strike"),
|
|
20795
|
-
codeBlockOption: optionSelector("code"),
|
|
20796
|
-
highlightOption: optionSelector("highlight"),
|
|
20797
|
-
emojiOption: optionSelector("emoji"),
|
|
20798
|
-
emojiDropdownIcon: "emoji-dropdown-icon",
|
|
20799
|
-
linkInput: fixedMenuSelector("link-option-input"),
|
|
20800
|
-
linkSubmitButton: fixedMenuSelector("link-option-link-button"),
|
|
20801
|
-
commandList: (index) => `neeto-editor-command-list-item-${index}`,
|
|
20802
|
-
imageUploadUrlSubmitButton: "neeto-editor-media-upload-url-submit",
|
|
20803
|
-
imageUploadUrlInputTextField: "neeto-editor-media-upload-url-input",
|
|
20804
|
-
uploadInput: "neeto-editor-media-uploader-input",
|
|
20805
|
-
editorMenuBarWrapper: fixedMenuSelector("wrapper"),
|
|
20806
|
-
undoOption: optionSelector("undo"),
|
|
20807
|
-
redoOption: optionSelector("redo"),
|
|
20808
|
-
imageWrapper: "neeto-editor-image-wrapper",
|
|
20809
|
-
contentField: "neeto-editor-content",
|
|
20810
|
-
addLinkButton: optionSelector("link"),
|
|
20811
|
-
addLinkTextField: "neeto-editor-add-link-text-input",
|
|
20812
|
-
addURLTextField: "neeto-editor-add-link-url-input",
|
|
20813
|
-
submitLinkButton: "neeto-editor-add-link",
|
|
20814
|
-
fixedMenuArrow: fixedMenuSelector("arrow"),
|
|
20815
|
-
cannedResponseOption: optionSelector("canned-responses"),
|
|
20816
|
-
cannedResponseSelectContainer: "select-a-canned-response-select-container",
|
|
20817
|
-
fixedMenuWrapper: fixedMenuSelector("wrapper"),
|
|
20818
|
-
linkOption: optionSelector("link"),
|
|
20819
|
-
addLinkUrlInput: "neeto-editor-add-link-url-input",
|
|
20820
|
-
addLinkDoneButton: "neeto-editor-add-link",
|
|
20821
|
-
unlinkButton: "neeto-editor-link-popover-unlink",
|
|
20822
|
-
editorAttachmentsButton: optionSelector("attachments"),
|
|
20823
|
-
attachmentPreviewDeleteButton: "neeto-editor-preview-delete-button",
|
|
20824
|
-
imageUploadOption: optionSelector("image-upload"),
|
|
20825
|
-
imageUploadLinkInput: "neeto-editor-media-upload-url-input",
|
|
20826
|
-
imageUploadButton: "neeto-editor-media-uploader-dnd",
|
|
20827
|
-
imageUploadLinkSubmitButton: "neeto-editor-media-upload-url-submit",
|
|
20828
|
-
applyButton: "apply-button",
|
|
20829
|
-
videoEmbedOption: optionSelector("video-embed"),
|
|
20830
|
-
videoEmbedInput: "neeto-editor-embed-input",
|
|
20831
|
-
videoEmbedSubmit: "neeto-editor-embed-cancel",
|
|
20832
|
-
videoWrapper: "neeto-editor-video-wrapper",
|
|
20833
|
-
paragraphOption: fixedMenuSelector("font-size-option-body2"),
|
|
20834
|
-
attachmentPreview: "ne-attachments-wrapper",
|
|
20835
|
-
imageUploadLinkButton: "neeto-editor-media-uploader-link-tab",
|
|
20836
|
-
errorText: "neeto-editor-error-text",
|
|
20837
|
-
content: "editor-content",
|
|
20838
|
-
imageUploadDeleteButton: "neeto-editor-image-menu-Delete",
|
|
20839
|
-
dynamicVariablesButton: "dynamic-variables-button",
|
|
20840
|
-
emojiContainer: "neeto-editor-emoji-picker",
|
|
20841
|
-
dynamicVariableSelector: (variable) => `dynamic-variables-list-item-${variable}`,
|
|
20842
|
-
};
|
|
20843
|
-
const NEETO_TEXT_MODIFIER_SELECTORS = {
|
|
20844
|
-
strike: optionSelector("strike"),
|
|
20845
|
-
underline: optionSelector("underline"),
|
|
20846
|
-
highlight: optionSelector("highlight"),
|
|
20847
|
-
};
|
|
20848
|
-
const TEXT_MODIFIER_SELECTORS = {
|
|
20849
|
-
bold: optionSelector("bold"),
|
|
20850
|
-
italic: optionSelector("italic"),
|
|
20851
|
-
code: optionSelector("code"),
|
|
20852
|
-
blockquote: optionSelector("blockquote"),
|
|
20853
|
-
codeBlock: optionSelector("codeBlock"),
|
|
20854
|
-
};
|
|
20855
|
-
const LIST_MODIFIER_SELECTORS = {
|
|
20856
|
-
bulletList: optionSelector("bulletList"),
|
|
20857
|
-
orderedList: optionSelector("orderedList"),
|
|
20858
|
-
};
|
|
20859
|
-
const FONT_SIZE_SELECTORS = {
|
|
20860
|
-
h1: fixedMenuSelector("font-size-option-h1"),
|
|
20861
|
-
h2: fixedMenuSelector("font-size-option-h2"),
|
|
20862
|
-
h3: fixedMenuSelector("font-size-option-h3"),
|
|
20863
|
-
h4: fixedMenuSelector("font-size-option-h4"),
|
|
20864
|
-
h5: fixedMenuSelector("font-size-option-h5"),
|
|
20865
|
-
};
|
|
20866
|
-
|
|
20867
|
-
const TAB_SELECTORS = {
|
|
20868
|
-
configureTab: "configure-tab",
|
|
20869
|
-
buildTab: "build-tab",
|
|
20870
|
-
themeTab: "theme-tab",
|
|
20871
|
-
shareTab: "share-tab",
|
|
20872
|
-
submissionsTab: "submissions-tab",
|
|
20873
|
-
paymentsTab: "payments-tab",
|
|
20874
|
-
};
|
|
20875
|
-
|
|
20876
21144
|
class ThankYouPage {
|
|
20877
21145
|
constructor(page, neetoPlaywrightUtilities) {
|
|
20878
21146
|
this.navigateToThankYouPage = async () => {
|
|
@@ -20932,29 +21200,6 @@ class ThankYouPage {
|
|
|
20932
21200
|
}
|
|
20933
21201
|
}
|
|
20934
21202
|
|
|
20935
|
-
const EMBED_SELECTORS = {
|
|
20936
|
-
iframe: (appName) => `#${appName}-iframe`,
|
|
20937
|
-
modal: (appName) => `#${appName}-modal`,
|
|
20938
|
-
close: (appName) => `#close-${appName}`,
|
|
20939
|
-
loader: (appName) => `#${appName}-loader`,
|
|
20940
|
-
inlineHeightInput: "inline-height-input-field",
|
|
20941
|
-
inlineWidthInput: "inline-width-input-field",
|
|
20942
|
-
inlineElementIdInput: "inline-element-id-input-field",
|
|
20943
|
-
codeBlock: "code-block",
|
|
20944
|
-
previewTab: "preview-tab",
|
|
20945
|
-
htmlTab: "html-tab",
|
|
20946
|
-
buttonTextInput: "button-text-input-field",
|
|
20947
|
-
buttonPositionSelectContainer: "button-position-select-value-container",
|
|
20948
|
-
buttonPositionSelectMenu: "button-position-select-menu",
|
|
20949
|
-
buttonColorLabel: "button-color-label",
|
|
20950
|
-
buttonTextColorLabel: "button-text-color-label",
|
|
20951
|
-
colorPickerTarget: "color-picker-target",
|
|
20952
|
-
colorpickerEditableInput: "colorpicker-editable-input",
|
|
20953
|
-
showIconCheckbox: "show-icon-checkbox",
|
|
20954
|
-
elementIdInput: "element-id-input-field",
|
|
20955
|
-
previewElementPopupButton: "preview-element-popup-button",
|
|
20956
|
-
};
|
|
20957
|
-
|
|
20958
21203
|
class EmbedBase {
|
|
20959
21204
|
constructor({ context, page, neetoPlaywrightUtilities, appName, }) {
|
|
20960
21205
|
this.initializeEmbedPage = async ({ embedType, embedCode, customElementText = "Click here", }) => {
|
|
@@ -20965,7 +21210,9 @@ class EmbedBase {
|
|
|
20965
21210
|
: embedCode);
|
|
20966
21211
|
this.filePath = `tmp/${faker.word.noun()}.html`;
|
|
20967
21212
|
writeFileSync$1(this.filePath, fileContent, "utf8");
|
|
20968
|
-
await this.embedTestPage.goto(`file://${Path__default.resolve(this.filePath)}
|
|
21213
|
+
await this.embedTestPage.goto(`file://${Path__default.resolve(this.filePath)}`, {
|
|
21214
|
+
timeout: 20000,
|
|
21215
|
+
});
|
|
20969
21216
|
await this.embedTestPage.waitForLoadState("load");
|
|
20970
21217
|
this.embeddedFrame = this.embedTestPage.frameLocator(this.embedTestPageType === "inline"
|
|
20971
21218
|
? "iframe"
|
|
@@ -21211,52 +21458,6 @@ const GOOGLE_LOGIN_TEXTS = {
|
|
|
21211
21458
|
};
|
|
21212
21459
|
const ENGAGE_TEXTS = { subscribe: "Subscribe" };
|
|
21213
21460
|
|
|
21214
|
-
const HELP_CENTER_SELECTORS = {
|
|
21215
|
-
helpButton: "help-button",
|
|
21216
|
-
documentationButton: "help-link-help-center-button",
|
|
21217
|
-
keyboardShortcutButton: "help-link-keyboard-shortcut-button",
|
|
21218
|
-
chatButton: "help-link-live-chat-button",
|
|
21219
|
-
whatsNewButton: "help-link-engage-button",
|
|
21220
|
-
whatsNewWidgetInfo: "h1",
|
|
21221
|
-
whatsNewWidgetCloseButton: ".ne-widget-header__btn",
|
|
21222
|
-
keyboardShortcutPaneHeading: "keyboard-shortcuts-pane-title",
|
|
21223
|
-
keyboardShortcutPaneCrossIcon: "keyboard-shortcuts-pane-close-button",
|
|
21224
|
-
};
|
|
21225
|
-
|
|
21226
|
-
const PROFILE_SECTION_SELECTORS = {
|
|
21227
|
-
profileSectionButton: "profile-section",
|
|
21228
|
-
profilePopup: "profile-popup",
|
|
21229
|
-
myProfileButton: "my-profile-button",
|
|
21230
|
-
profileOrganizationSettingsButton: "profile-organization-settings-button",
|
|
21231
|
-
logoutButton: "profile-logout-button",
|
|
21232
|
-
neetoAuthLink: "ntm-visit-auth-button",
|
|
21233
|
-
profileSidebarCancelButton: "ntm-profile-cancel-button",
|
|
21234
|
-
profileAvatar: "profile-avatar",
|
|
21235
|
-
actionHeaderUserEmail: "floating-action-menu-header-user-email",
|
|
21236
|
-
};
|
|
21237
|
-
|
|
21238
|
-
const CHAT_WIDGET_SELECTORS = {
|
|
21239
|
-
iframe: "#neetochat-iframe",
|
|
21240
|
-
spinner: ".neeto-chat-widget-spinner",
|
|
21241
|
-
helpButton: "help-button",
|
|
21242
|
-
preChatEmailInput: "neeto-chat-widget-input",
|
|
21243
|
-
preChatSubmitButton: "neeto-chat-widget-pre-chat-submit-btn",
|
|
21244
|
-
chatBubble: "neeto-chat-widget-chat-message-bubble",
|
|
21245
|
-
closeChat: "neeto-chat-widget-close-btn",
|
|
21246
|
-
chatQuestionHeader: "chat-question-header",
|
|
21247
|
-
};
|
|
21248
|
-
const CHANGELOG_WIDGET_SELECTORS = {
|
|
21249
|
-
changelogWrapper: ".ne-widget__wrapper",
|
|
21250
|
-
closeButton: "ne-widget-close-btn",
|
|
21251
|
-
publicUrlLink: "ne-widget-public-url",
|
|
21252
|
-
};
|
|
21253
|
-
const KEYBOARD_SHORTCUTS_SELECTORS = {
|
|
21254
|
-
keyboardShortcutsPane: "keyboard-shortcuts-pane",
|
|
21255
|
-
closePaneButton: "keyboard-shortcuts-pane-close-button",
|
|
21256
|
-
hotKeyItem: "hotkey-item",
|
|
21257
|
-
};
|
|
21258
|
-
|
|
21259
|
-
/* eslint-disable playwright/no-raw-locators */
|
|
21260
21461
|
/* eslint-disable playwright/require-top-level-describe */
|
|
21261
21462
|
/* eslint-disable playwright/no-standalone-expect */
|
|
21262
21463
|
class HelpAndProfilePage {
|
|
@@ -21482,13 +21683,6 @@ class HelpAndProfilePage {
|
|
|
21482
21683
|
}
|
|
21483
21684
|
}
|
|
21484
21685
|
|
|
21485
|
-
const GOOGLE_LOGIN_SELECTORS = {
|
|
21486
|
-
totpNext: "#totpNext",
|
|
21487
|
-
form: "form",
|
|
21488
|
-
totpChallengeSelector: '[data-challengeid="2"]',
|
|
21489
|
-
signOutFrameLocator: 'iframe[name="account"]',
|
|
21490
|
-
};
|
|
21491
|
-
|
|
21492
21686
|
//! otpauth 9.3.1 | (c) Héctor Molinero Fernández | MIT | https://github.com/hectorm/otpauth
|
|
21493
21687
|
//! noble-hashes 1.4.0 | (c) Paul Miller | MIT | https://github.com/paulmillr/noble-hashes
|
|
21494
21688
|
/// <reference types="./otpauth.d.ts" />
|
|
@@ -23235,14 +23429,6 @@ const initializeTotp = ({ issuer, secret, }) => {
|
|
|
23235
23429
|
});
|
|
23236
23430
|
};
|
|
23237
23431
|
|
|
23238
|
-
const INTEGRATION_SELECTORS = {
|
|
23239
|
-
integrationCard: (integration) => `${integration}-integration-card`,
|
|
23240
|
-
connectButton: "connect-button",
|
|
23241
|
-
integrationStatusTag: "integration-status-tag",
|
|
23242
|
-
disconnectButton: "disconnect-button",
|
|
23243
|
-
manageButton: "manage-button",
|
|
23244
|
-
};
|
|
23245
|
-
|
|
23246
23432
|
class IntegrationBase {
|
|
23247
23433
|
constructor({ page, neetoPlaywrightUtilities, integration, connectHeader, connectedHeader, pageloaderTimeout, integrationRouteIndex, integrationRouteResponsesParams, }) {
|
|
23248
23434
|
this.disconnect = async (interceptMultipleResponsesParams = {}) => {
|
|
@@ -23287,7 +23473,7 @@ class IntegrationBase {
|
|
|
23287
23473
|
times: 0,
|
|
23288
23474
|
...this.integrationRouteResponsesParams,
|
|
23289
23475
|
});
|
|
23290
|
-
await this.page.goto(this.integrationRouteIndex);
|
|
23476
|
+
await this.page.goto(this.integrationRouteIndex, { timeout: 20000 });
|
|
23291
23477
|
await integrationIndexPromise;
|
|
23292
23478
|
}
|
|
23293
23479
|
};
|
|
@@ -23352,7 +23538,7 @@ class GooglePage extends IntegrationBase {
|
|
|
23352
23538
|
.click();
|
|
23353
23539
|
};
|
|
23354
23540
|
this.loginToGoogle = async () => {
|
|
23355
|
-
await this.page.goto(THIRD_PARTY_ROUTES.google.signin);
|
|
23541
|
+
await this.page.goto(THIRD_PARTY_ROUTES.google.signin, { timeout: 20000 });
|
|
23356
23542
|
if (!isNotNil(process.env.GOOGLE_LOGIN_EMAIL))
|
|
23357
23543
|
return;
|
|
23358
23544
|
await this.page
|
|
@@ -23398,7 +23584,9 @@ class GooglePage extends IntegrationBase {
|
|
|
23398
23584
|
}).toPass({ timeout: 50000 });
|
|
23399
23585
|
};
|
|
23400
23586
|
this.logoutFromGoogle = async () => {
|
|
23401
|
-
await this.page.goto(THIRD_PARTY_ROUTES.google.myAccount
|
|
23587
|
+
await this.page.goto(THIRD_PARTY_ROUTES.google.myAccount, {
|
|
23588
|
+
timeout: 20000,
|
|
23589
|
+
});
|
|
23402
23590
|
await this.page.getByLabel(GOOGLE_LOGIN_TEXTS.googleAccount).click();
|
|
23403
23591
|
await this.page
|
|
23404
23592
|
.frameLocator(GOOGLE_LOGIN_SELECTORS.signOutFrameLocator)
|
|
@@ -23451,40 +23639,6 @@ class GooglePage extends IntegrationBase {
|
|
|
23451
23639
|
}
|
|
23452
23640
|
}
|
|
23453
23641
|
|
|
23454
|
-
const SLACK_SELECTORS = {
|
|
23455
|
-
messageContainer: "[data-qa='message_container']",
|
|
23456
|
-
loginEmail: "[data-qa='login_email']",
|
|
23457
|
-
loginPassword: "[data-qa='login_password']",
|
|
23458
|
-
signInButton: "[data-qa='signin_button']",
|
|
23459
|
-
teamPicketButtonContent: "[data-qa='team-picker-button-content']",
|
|
23460
|
-
redirectOpenInBrowser: "[data-qa='ssb_redirect_open_in_browser']",
|
|
23461
|
-
workspaceActionsButton: "[data-qa='workspace_actions_button']",
|
|
23462
|
-
teamMenuTrigger: "[data-qa='team-menu-trigger']",
|
|
23463
|
-
menuItemButton: "[data-qa='menu_item_button']",
|
|
23464
|
-
threadsFlexpane: "[data-qa='threads_flexpane']",
|
|
23465
|
-
replyBar: "[data-qa='reply_bar']",
|
|
23466
|
-
markdownElement: "[data-qa='bk_markdown_element']",
|
|
23467
|
-
virtualListItem: "[data-qa='virtual-list-item']",
|
|
23468
|
-
channelItems: '[role="treeitem"][data-qa="virtual-list-item"]',
|
|
23469
|
-
};
|
|
23470
|
-
const SLACK_DATA_QA_SELECTORS = {
|
|
23471
|
-
sectionHeadingButton: "section_heading_button__channels",
|
|
23472
|
-
coachMarkCloseButton: "coachmark-close-button",
|
|
23473
|
-
messagePaneBannerCloseIcon: "message_pane_banner_close_icon",
|
|
23474
|
-
permissionBannerCloseIcon: "banner_close_btn",
|
|
23475
|
-
channelSectionSubmenuCreate: "channel_section_submenu_create",
|
|
23476
|
-
channelSectionMenuCreateChannel: "channel_section_menu__create_channel",
|
|
23477
|
-
skModalContent: "sk-modal-content",
|
|
23478
|
-
infiniteSpinner: "infinite-spinner",
|
|
23479
|
-
channelNameOptionsList: "channel-name-options-list",
|
|
23480
|
-
channelNameInput: "channel-name-input",
|
|
23481
|
-
createChannelNextButton: "create-channel-next-button",
|
|
23482
|
-
inviteToWorkspaceSkipButton: "invite_to_workspace_skip_button",
|
|
23483
|
-
menuItems: "menu_items",
|
|
23484
|
-
channelDetailsModal: "channel_details_modal",
|
|
23485
|
-
channelDetailsSettingsTab: "channel_details_settings_tab",
|
|
23486
|
-
};
|
|
23487
|
-
|
|
23488
23642
|
/* eslint-disable playwright/no-raw-locators */
|
|
23489
23643
|
class SlackPage extends IntegrationBase {
|
|
23490
23644
|
constructor({ page, neetoPlaywrightUtilities, integrationRouteIndex, }) {
|
|
@@ -23596,7 +23750,7 @@ class SlackPage extends IntegrationBase {
|
|
|
23596
23750
|
if (isNotNil(slackWorkspace) &&
|
|
23597
23751
|
isNotNil(slackLoginPassword) &&
|
|
23598
23752
|
isNotNil(slackLoginEmail)) {
|
|
23599
|
-
await slackWebappPage.goto(THIRD_PARTY_ROUTES.slack.loginWithPassword(slackWorkspace));
|
|
23753
|
+
await slackWebappPage.goto(THIRD_PARTY_ROUTES.slack.loginWithPassword(slackWorkspace), { timeout: 20000 });
|
|
23600
23754
|
await slackWebappPage
|
|
23601
23755
|
.locator(SLACK_SELECTORS.loginEmail)
|
|
23602
23756
|
.pressSequentially(slackLoginEmail, { delay: 10 });
|
|
@@ -23675,19 +23829,6 @@ class SlackPage extends IntegrationBase {
|
|
|
23675
23829
|
}
|
|
23676
23830
|
}
|
|
23677
23831
|
|
|
23678
|
-
const WEBHOOK_SELECTORS = {
|
|
23679
|
-
addNewWebhook: "add-new-webhook-button",
|
|
23680
|
-
endpointInputField: "endpoint-input-field",
|
|
23681
|
-
deliveryResponseCode: "delivery-response-code",
|
|
23682
|
-
deliveryRequestPayload: "delivery-request-payload",
|
|
23683
|
-
addSecretKey: "add-secret-key",
|
|
23684
|
-
newWebhookHeader: "add-new-webhook-pane-header",
|
|
23685
|
-
endpointInputError: "endpoint-input-error",
|
|
23686
|
-
eventsSelectError: "events-select-error",
|
|
23687
|
-
regenerateSecret: "regenerate-secret",
|
|
23688
|
-
deleteSecret: "delete-secret",
|
|
23689
|
-
};
|
|
23690
|
-
|
|
23691
23832
|
class WebhooksPage {
|
|
23692
23833
|
constructor({ page, request, neetoPlaywrightUtilities, context, }) {
|
|
23693
23834
|
this.getWebhookURL = async () => {
|
|
@@ -23754,26 +23895,6 @@ class WebhooksPage {
|
|
|
23754
23895
|
}
|
|
23755
23896
|
}
|
|
23756
23897
|
|
|
23757
|
-
const ZAPIER_SELECTORS = {
|
|
23758
|
-
zapTriggerStep: (zapId) => `[data-testid='step-node-${zapId}']`,
|
|
23759
|
-
zapAccountSubstep: "[data-testid='substep-Account']",
|
|
23760
|
-
zapOpenSubstepContainer: "[data-testid='open-sub-step-container']",
|
|
23761
|
-
modal: "[data-testid='Modal']",
|
|
23762
|
-
fmPrettytext: ".fm-prettytext",
|
|
23763
|
-
spinner: "[data-testid='spinner']",
|
|
23764
|
-
skeletonBlock: "[data-testid='SkeletonBlock']",
|
|
23765
|
-
accountsLoader: "[data-testid='accounts-loader']",
|
|
23766
|
-
floatingBox: "[data-testid='floating-box']",
|
|
23767
|
-
connection: "[data-testid='Connection']",
|
|
23768
|
-
deleteConnectionModal: "[data-testid='DeleteAuthModal-root']",
|
|
23769
|
-
deleteConnectionDropdownButton: "[data-testid='connection-list-item-dropdown-item-Delete']",
|
|
23770
|
-
usageAmounts: "css=[class$=UsageBar__amounts]",
|
|
23771
|
-
universalSidebar: "[data-testid='universalSidebar']",
|
|
23772
|
-
sidebarFooter: "css=[class$=InAppSidebarFooter__footerWrapper]",
|
|
23773
|
-
contextualSideBar: "[data-testid='contextual-sidebar']",
|
|
23774
|
-
iconContainer: "[data-testid='iconContainer']",
|
|
23775
|
-
};
|
|
23776
|
-
|
|
23777
23898
|
class ZapierPage extends IntegrationBase {
|
|
23778
23899
|
constructor({ page, neetoPlaywrightUtilities, integrationRouteIndex, mailerUtils, }) {
|
|
23779
23900
|
super({
|
|
@@ -23977,6 +24098,72 @@ class ZapierPage extends IntegrationBase {
|
|
|
23977
24098
|
}
|
|
23978
24099
|
}
|
|
23979
24100
|
|
|
24101
|
+
class MemberApis {
|
|
24102
|
+
constructor(neetoPlaywrightUtilities) {
|
|
24103
|
+
this.neetoPlaywrightUtilities = neetoPlaywrightUtilities;
|
|
24104
|
+
this.create = (body) => this.neetoPlaywrightUtilities.apiRequest({
|
|
24105
|
+
method: "post",
|
|
24106
|
+
url: "/team_members/teams",
|
|
24107
|
+
body: { user: body },
|
|
24108
|
+
});
|
|
24109
|
+
this.fetch = (params) => this.neetoPlaywrightUtilities.apiRequest({
|
|
24110
|
+
method: "get",
|
|
24111
|
+
url: "/team_members/teams",
|
|
24112
|
+
params,
|
|
24113
|
+
});
|
|
24114
|
+
this.update = (memberId, body) => this.neetoPlaywrightUtilities.apiRequest({
|
|
24115
|
+
method: "put",
|
|
24116
|
+
url: `/team_members/teams/${memberId}`,
|
|
24117
|
+
body: { team: body },
|
|
24118
|
+
});
|
|
24119
|
+
this.bulkUpdate = (body) => this.neetoPlaywrightUtilities.apiRequest({
|
|
24120
|
+
method: "patch",
|
|
24121
|
+
url: "/team_members/teams/bulk_update",
|
|
24122
|
+
body: { users: body },
|
|
24123
|
+
});
|
|
24124
|
+
}
|
|
24125
|
+
}
|
|
24126
|
+
|
|
24127
|
+
class Member {
|
|
24128
|
+
constructor(neetoPlaywrightUtilities) {
|
|
24129
|
+
this.neetoPlaywrightUtilities = neetoPlaywrightUtilities;
|
|
24130
|
+
this.addMemberViaRequest = ({ email, role = MEMBER_TEXTS.agent, appName, }) => expect
|
|
24131
|
+
.poll(async () => {
|
|
24132
|
+
const response = await this.memberApis.create({
|
|
24133
|
+
emails: [email],
|
|
24134
|
+
organization_role: role,
|
|
24135
|
+
app_roles: [
|
|
24136
|
+
{ app_name: appName, active_role: role, is_enabled: true },
|
|
24137
|
+
],
|
|
24138
|
+
});
|
|
24139
|
+
return response === null || response === void 0 ? void 0 : response.status();
|
|
24140
|
+
}, { timeout: 30000 })
|
|
24141
|
+
.toBe(200);
|
|
24142
|
+
this.editMemberViaRequest = async ({ email, firstName, lastName, newRole, }) => {
|
|
24143
|
+
const response = await this.memberApis.fetch({ search: email });
|
|
24144
|
+
if (response) {
|
|
24145
|
+
const responseBodyBuffer = await response.body();
|
|
24146
|
+
const responseBody = JSON.parse(responseBodyBuffer.toString());
|
|
24147
|
+
const memberDetails = responseBody === null || responseBody === void 0 ? void 0 : responseBody.members[0];
|
|
24148
|
+
await this.memberApis.update(memberDetails.id, {
|
|
24149
|
+
active: true,
|
|
24150
|
+
first_name: firstName,
|
|
24151
|
+
last_name: lastName,
|
|
24152
|
+
organization_role: newRole,
|
|
24153
|
+
});
|
|
24154
|
+
}
|
|
24155
|
+
};
|
|
24156
|
+
this.deactivateMemberViaRequest = ({ email }) => this.memberApis.bulkUpdate({ active: false, emails: [email] });
|
|
24157
|
+
this.generateRandomTeamMembers = ({ count = 1, role = "standard" }) => dynamicArray(count, () => ({
|
|
24158
|
+
firstName: faker.person.firstName(),
|
|
24159
|
+
lastName: faker.person.lastName(),
|
|
24160
|
+
email: faker.internet.exampleEmail(),
|
|
24161
|
+
role,
|
|
24162
|
+
}));
|
|
24163
|
+
this.memberApis = new MemberApis(neetoPlaywrightUtilities);
|
|
24164
|
+
}
|
|
24165
|
+
}
|
|
24166
|
+
|
|
23980
24167
|
const DESCRIPTION_EDITOR_TEXTS = {
|
|
23981
24168
|
fontSize: "Font size",
|
|
23982
24169
|
paragraph: "Paragraph",
|
|
@@ -24285,7 +24472,7 @@ class EditorPage {
|
|
|
24285
24472
|
}
|
|
24286
24473
|
|
|
24287
24474
|
class ImageUploader {
|
|
24288
|
-
constructor(
|
|
24475
|
+
constructor(page, neetoPlaywrightUtilities) {
|
|
24289
24476
|
this.submitCroppedImage = async () => {
|
|
24290
24477
|
const cropImage = this.neetoPlaywrightUtilities.interceptMultipleResponses({
|
|
24291
24478
|
responseUrl: ROUTES.directUploads,
|
|
@@ -24425,44 +24612,6 @@ class ImageUploader {
|
|
|
24425
24612
|
}
|
|
24426
24613
|
}
|
|
24427
24614
|
|
|
24428
|
-
const MEMBER_SELECTORS = {
|
|
24429
|
-
membersTab: "members-nav-tab",
|
|
24430
|
-
newButton: "ntm-add-member-button",
|
|
24431
|
-
continueButton: "ntm-manage-member-continue-button",
|
|
24432
|
-
submitButton: "ntm-manage-member-submit-button",
|
|
24433
|
-
searchTextField: "ntm-search-members-input",
|
|
24434
|
-
deactivatedAgentsButton: "ntm-members-menubar-deactivated-block",
|
|
24435
|
-
activatedMembersButton: "ntm-members-menubar-active-block",
|
|
24436
|
-
columnCheckBox: "neeto-ui-columns-checkbox",
|
|
24437
|
-
roleLabel: (role) => `${joinHyphenCase(role)}-radio-label`,
|
|
24438
|
-
teamMembersTable: "ntm-members-table",
|
|
24439
|
-
dropDownIcon: "ntm-members-table-row-dropdown-button",
|
|
24440
|
-
editButton: "ntm-edit-member-button",
|
|
24441
|
-
menuBarHeading: "ntm-members-menubar-heading",
|
|
24442
|
-
removeMember: "ntm-deactivate-member-button",
|
|
24443
|
-
columnsButton: "columns-dropdown-button",
|
|
24444
|
-
columnsDropdownContainer: "columns-dropdown-container",
|
|
24445
|
-
emailDropdownItemLabel: "email-checkbox-label",
|
|
24446
|
-
roleDropdownItemLabel: "role-checkbox-label",
|
|
24447
|
-
inviteStatusDropdownItemLabel: "invite-status-checkbox-label",
|
|
24448
|
-
heading: "ntm-manage-members-pane-header",
|
|
24449
|
-
activateButton: "ntm-activate-members-button",
|
|
24450
|
-
deactivateButton: "ntm-deactivate-members-button",
|
|
24451
|
-
rolesButton: "ntm-manage-member-roles-button",
|
|
24452
|
-
statusTag: "ntm-member-status-tag",
|
|
24453
|
-
menubarSubLink: (sublink) => `members-${sublink}-block-sub-link`,
|
|
24454
|
-
takeActionStateOption: (option = "") => `ntm-${hyphenize(option)}-members-button`,
|
|
24455
|
-
checkboxLabel: (label) => `${hyphenize(label)}-checkbox-label`,
|
|
24456
|
-
};
|
|
24457
|
-
const MEMBER_FORM_SELECTORS = {
|
|
24458
|
-
emailTextField: "email-select-input-field",
|
|
24459
|
-
firstNameTextField: "ntm-edit-member-first-name-text-field",
|
|
24460
|
-
lastNameTextField: "ntm-edit-member-last-name-text-field",
|
|
24461
|
-
emailInput: "ntm-manage-member-email-input",
|
|
24462
|
-
emailErrorField: "emails-input-error",
|
|
24463
|
-
cancelButton: "ntm-manage-member-cancel-button",
|
|
24464
|
-
};
|
|
24465
|
-
|
|
24466
24615
|
class TeamMembers {
|
|
24467
24616
|
constructor({ page, neetoPlaywrightUtilities, }) {
|
|
24468
24617
|
this.navigateToTeamMembers = async () => {
|
|
@@ -24659,41 +24808,15 @@ class TeamMembers {
|
|
|
24659
24808
|
}
|
|
24660
24809
|
}
|
|
24661
24810
|
|
|
24662
|
-
const LOGIN_SELECTORS = {
|
|
24663
|
-
appleAuthenticationButton: "apple-authentication-button",
|
|
24664
|
-
emailTextField: "login-email-text-field",
|
|
24665
|
-
googleAuthenticationButton: "google-authentication-button",
|
|
24666
|
-
githubAuthenticationButton: "github-authentication-button",
|
|
24667
|
-
loginViaEmailButton: "login-via-email-button",
|
|
24668
|
-
passwordTextField: "login-password-text-field",
|
|
24669
|
-
rememberMeCheckBox: "login-remember-me-check-box",
|
|
24670
|
-
submitButton: "login-submit-button",
|
|
24671
|
-
twitterAuthenticationButton: "twitter-authentication-button",
|
|
24672
|
-
};
|
|
24673
|
-
|
|
24674
|
-
const SIGNUP_SELECTORS = {
|
|
24675
|
-
emailTextField: "signup-email-text-field",
|
|
24676
|
-
firstNameTextField: "signup-profile-first-name-text-field",
|
|
24677
|
-
lastNameTextField: "signup-profile-last-name-text-field",
|
|
24678
|
-
organizationNameTextField: "signup-organization-name-text-field",
|
|
24679
|
-
organizationSubmitButton: "signup-organization-submit-button",
|
|
24680
|
-
otpTextBox: "otpinput-otp-number",
|
|
24681
|
-
profileSubmitButton: "signup-profile-submit-button",
|
|
24682
|
-
signupViaEmailButton: "signup-via-email-button",
|
|
24683
|
-
submitButton: "signup-email-submit-button",
|
|
24684
|
-
subdomainNameTextField: "signup-organization-subdomain-text-field",
|
|
24685
|
-
subdomainError: "subdomain-input-error",
|
|
24686
|
-
tryFreeButton: "neeto-auth-signup-link",
|
|
24687
|
-
unregisterdEmailError: "unregisterd-email-error",
|
|
24688
|
-
};
|
|
24689
|
-
|
|
24690
24811
|
const loginWithoutSSO = async ({ page, neetoPlaywrightUtilities, loginPath = "/", }) => {
|
|
24691
24812
|
if (shouldSkipSetupAndTeardown())
|
|
24692
24813
|
return;
|
|
24693
|
-
await page.goto(loginPath);
|
|
24694
|
-
await page
|
|
24814
|
+
await page.goto(loginPath, { timeout: 20000 });
|
|
24815
|
+
await page
|
|
24816
|
+
.getByTestId(LOGIN_SELECTORS.emailTextField)
|
|
24817
|
+
.fill(CREDENTIALS.email);
|
|
24695
24818
|
await page
|
|
24696
|
-
.getByTestId(
|
|
24819
|
+
.getByTestId(LOGIN_SELECTORS.passwordTextField)
|
|
24697
24820
|
.fill(CREDENTIALS.password);
|
|
24698
24821
|
const login = neetoPlaywrightUtilities.interceptMultipleResponses({
|
|
24699
24822
|
times: 1,
|
|
@@ -24731,8 +24854,8 @@ class OrganizationPage {
|
|
|
24731
24854
|
const appNameInLowerCase = appName.toLowerCase();
|
|
24732
24855
|
const isNeetoAuth = appNameInLowerCase === "neetoauth";
|
|
24733
24856
|
isNeetoAuth
|
|
24734
|
-
? await this.page.goto(ROUTES.neetoAuthSignup)
|
|
24735
|
-
: await this.page.goto(`${ROUTES.neetoAuthSignup}?redirect_uri=${appNameInLowerCase}.net
|
|
24857
|
+
? await this.page.goto(ROUTES.neetoAuthSignup, { timeout: 20000 })
|
|
24858
|
+
: await this.page.goto(`${ROUTES.neetoAuthSignup}?redirect_uri=${appNameInLowerCase}.net`, { timeout: 20000 });
|
|
24736
24859
|
await this.page.getByTestId(SIGNUP_SELECTORS.emailTextField).fill(email);
|
|
24737
24860
|
const signup = this.neetoPlaywrightUtilities.interceptMultipleResponses({
|
|
24738
24861
|
responseUrl: ROUTES.signup,
|
|
@@ -24852,7 +24975,7 @@ class OrganizationPage {
|
|
|
24852
24975
|
await expect(this.page.getByTestId(COMMON_SELECTORS.pageLoader)).toBeHidden({ timeout: 15000 });
|
|
24853
24976
|
};
|
|
24854
24977
|
this.loginAndOnboard = async ({ email, firstName, lastName, country, handleOnboarding, baseURL = process.env.BASE_URL, }) => {
|
|
24855
|
-
await this.page.goto(`${baseURL}/${ROUTES.admin}
|
|
24978
|
+
await this.page.goto(`${baseURL}/${ROUTES.admin}`, { timeout: 20000 });
|
|
24856
24979
|
await this.loginViaSSO(email);
|
|
24857
24980
|
await this.setupProfile({ firstName, lastName, country });
|
|
24858
24981
|
await this.page.waitForURL(new RegExp(getGlobalUserState().domain), {
|
|
@@ -24862,7 +24985,7 @@ class OrganizationPage {
|
|
|
24862
24985
|
};
|
|
24863
24986
|
this.signUp = async ({ credentials, fetchOtpFromEmail, appName, }) => {
|
|
24864
24987
|
let otp = "123456";
|
|
24865
|
-
await this.page.goto(`${ROUTES.neetoAuthSignup}?redirect_uri=${credentials.domain}
|
|
24988
|
+
await this.page.goto(`${ROUTES.neetoAuthSignup}?redirect_uri=${credentials.domain}`, { timeout: 20000 });
|
|
24866
24989
|
await this.page
|
|
24867
24990
|
.getByTestId(SIGNUP_SELECTORS.emailTextField)
|
|
24868
24991
|
.fill(credentials.email);
|
|
@@ -24945,36 +25068,6 @@ class SidebarSection {
|
|
|
24945
25068
|
}
|
|
24946
25069
|
}
|
|
24947
25070
|
|
|
24948
|
-
const TAGS_SELECTORS = {
|
|
24949
|
-
newTagButton: "add-new-tag-button",
|
|
24950
|
-
tagNameTextField: "tag-name-text-field",
|
|
24951
|
-
editButton: "tags-edit-button",
|
|
24952
|
-
deleteButton: "tags-delete-button",
|
|
24953
|
-
cancelButton: "neeto-tags-manage-tag-cancel-button",
|
|
24954
|
-
submitButton: "neeto-tags-manage-tag-submit-button",
|
|
24955
|
-
searchTextField: "neeto-tags-search-text-input-field",
|
|
24956
|
-
descriptionTextArea: "tag-description-text-area",
|
|
24957
|
-
addTagButton: "neeto-tags-add-tag-button",
|
|
24958
|
-
tagSearchField: "select-tag-container",
|
|
24959
|
-
deleteTagButton: "tag-close-icon",
|
|
24960
|
-
metaDataCard: "metadata-card",
|
|
24961
|
-
metaDataBlock: "metadata-block",
|
|
24962
|
-
tagContainer: "tag-container",
|
|
24963
|
-
};
|
|
24964
|
-
const MERGE_TAGS_SELECTORS = {
|
|
24965
|
-
mergeTagsButton: "neeto-tags-merge-tags-button",
|
|
24966
|
-
mergeButton: "neeto-tags-merge-button",
|
|
24967
|
-
sourceSearchTextField: "neeto-tags-merge-source-search-text-input-field",
|
|
24968
|
-
sourceTagsList: "neeto-tags-merge-source-tags-list",
|
|
24969
|
-
destinationTagsList: "neeto-tags-merge-destination-tags-list",
|
|
24970
|
-
destinationSearchTextField: "neeto-tags-merge-destination-search-text-input-field",
|
|
24971
|
-
cancelButton: "neeto-tags-merge-cancel-button",
|
|
24972
|
-
proceedButton: "neeto-tags-merge-proceed-button",
|
|
24973
|
-
disabledTag: ".neeto-ui-cursor-not-allowed",
|
|
24974
|
-
sourceTagRow: "neeto-tags-merge-source-tags",
|
|
24975
|
-
destinationTagRow: "neeto-tags-merge-destination-tags",
|
|
24976
|
-
};
|
|
24977
|
-
|
|
24978
25071
|
class TagsApi {
|
|
24979
25072
|
constructor(neetoPlaywrightUtilities) {
|
|
24980
25073
|
this.neetoPlaywrightUtilities = neetoPlaywrightUtilities;
|
|
@@ -25120,26 +25213,6 @@ const networkConditions = {
|
|
|
25120
25213
|
},
|
|
25121
25214
|
};
|
|
25122
25215
|
|
|
25123
|
-
const ROLES_SELECTORS = {
|
|
25124
|
-
newButton: "ntm-add-role-button",
|
|
25125
|
-
proceedButton: "ntm-add-role-submit-button",
|
|
25126
|
-
cancelButton: "ntm-add-role-cancel-button",
|
|
25127
|
-
tableHeaderRoleName: "ntm-roles-table-role-header",
|
|
25128
|
-
nameTextField: "ntm-add-role-name-text-field",
|
|
25129
|
-
searchTextField: "ntm-search-roles-input",
|
|
25130
|
-
updateRolePaneHeading: "ntm-add-role-title",
|
|
25131
|
-
updateRoleCancelButton: "ntm-add-role-cancel-button",
|
|
25132
|
-
descriptionTextField: "ntm-add-role-description-text-field",
|
|
25133
|
-
permissionCategoryTitle: "ntm-roles-permission-category-title",
|
|
25134
|
-
headerColumn: "ntm-roles-table-header",
|
|
25135
|
-
dropDownIcon: "ntm-roles-table-header-role-dropdown-button",
|
|
25136
|
-
tableHeaderRoleTitle: "ntm-roles-table-header-role-title",
|
|
25137
|
-
permissionCheckbox: "ntm-roles-permission-checkbox",
|
|
25138
|
-
editRoleButton: "ntm-roles-table-edit-role-button",
|
|
25139
|
-
deleteRoleButton: "ntm-roles-table-delete-role-button",
|
|
25140
|
-
permissionCard: "ntm-roles-permission-card",
|
|
25141
|
-
};
|
|
25142
|
-
|
|
25143
25216
|
const initializeCredentials = (product) => {
|
|
25144
25217
|
var _a;
|
|
25145
25218
|
if (process.env.SKIP_SETUP === "true" && getGlobalUserState()) {
|
|
@@ -25167,24 +25240,39 @@ const initializeCredentials = (product) => {
|
|
|
25167
25240
|
}
|
|
25168
25241
|
};
|
|
25169
25242
|
|
|
25170
|
-
const addMemberViaRequest = ({ email, role = MEMBER_TEXTS.agent, appName, neetoPlaywrightUtilities, }) =>
|
|
25171
|
-
|
|
25172
|
-
|
|
25173
|
-
|
|
25174
|
-
|
|
25175
|
-
|
|
25176
|
-
|
|
25177
|
-
|
|
25178
|
-
|
|
25179
|
-
|
|
25180
|
-
|
|
25181
|
-
|
|
25243
|
+
const addMemberViaRequest = async ({ email, role = MEMBER_TEXTS.agent, appName, neetoPlaywrightUtilities, }) => {
|
|
25244
|
+
let response;
|
|
25245
|
+
await expect
|
|
25246
|
+
.poll(async () => {
|
|
25247
|
+
response = await neetoPlaywrightUtilities.apiRequest({
|
|
25248
|
+
method: "post",
|
|
25249
|
+
url: API_ROUTES.teamMembers.index,
|
|
25250
|
+
body: {
|
|
25251
|
+
user: {
|
|
25252
|
+
emails: [email],
|
|
25253
|
+
organization_role: role,
|
|
25254
|
+
app_roles: [
|
|
25255
|
+
{ app_name: appName, active_role: role, is_enabled: true },
|
|
25256
|
+
],
|
|
25257
|
+
},
|
|
25182
25258
|
},
|
|
25183
|
-
}
|
|
25184
|
-
|
|
25185
|
-
|
|
25186
|
-
|
|
25187
|
-
.
|
|
25259
|
+
});
|
|
25260
|
+
return response === null || response === void 0 ? void 0 : response.status();
|
|
25261
|
+
}, { timeout: 30000 })
|
|
25262
|
+
.toBe(200);
|
|
25263
|
+
const responseBodyBuffer = await (response === null || response === void 0 ? void 0 : response.body());
|
|
25264
|
+
const { job_id: jobId } = JSON.parse(String(responseBodyBuffer));
|
|
25265
|
+
await expect
|
|
25266
|
+
.poll(async () => {
|
|
25267
|
+
const jobResponse = await neetoPlaywrightUtilities.apiRequest({
|
|
25268
|
+
url: API_ROUTES.teamMembers.creationStatus(jobId),
|
|
25269
|
+
});
|
|
25270
|
+
const responseBodyBuffer = await (jobResponse === null || jobResponse === void 0 ? void 0 : jobResponse.body());
|
|
25271
|
+
const { is_completed: isCompleted } = JSON.parse(String(responseBodyBuffer));
|
|
25272
|
+
return isCompleted;
|
|
25273
|
+
}, { timeout: 30000 })
|
|
25274
|
+
.toBe(true);
|
|
25275
|
+
};
|
|
25188
25276
|
const editMemberViaRequest = async ({ email, firstName, lastName, newRole, neetoPlaywrightUtilities, }) => {
|
|
25189
25277
|
const response = await neetoPlaywrightUtilities.apiRequest({
|
|
25190
25278
|
method: "get",
|
|
@@ -157273,5 +157361,5 @@ const definePlaywrightConfig = (overrides) => {
|
|
|
157273
157361
|
});
|
|
157274
157362
|
};
|
|
157275
157363
|
|
|
157276
|
-
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, ENGAGE_TEXTS, 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, MailerUtils, 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 };
|
|
157364
|
+
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, ENGAGE_TEXTS, ENVIRONMENT, EXPANDED_FONT_SIZE, EditorPage, EmbedBase, FONT_SIZE_SELECTORS, GLOBAL_TRANSLATIONS_PATTERN, GOOGLE_CALENDAR_DATE_FORMAT, GOOGLE_LOGIN_SELECTORS, GOOGLE_LOGIN_TEXTS, GooglePage, HELP_CENTER_SELECTORS, HelpAndProfilePage, INTEGRATIONS_TEXTS, INTEGRATION_SELECTORS, IS_STAGING_ENV, ImageUploader, IntegrationBase, KEYBOARD_SHORTCUTS_SELECTORS, LIST_MODIFIER_SELECTORS, LIST_MODIFIER_TAGS, LOGIN_SELECTORS, MEMBER_FORM_SELECTORS, MEMBER_SELECTORS, MEMBER_TEXTS, MERGE_TAGS_SELECTORS, MailerUtils, MailosaurUtils, Member, NEETO_AUTH_BASE_URL, NEETO_EDITOR_SELECTORS, NEETO_FILTERS_SELECTORS, NEETO_IMAGE_UPLOADER_SELECTORS, NEETO_ROUTES, NEETO_TEXT_MODIFIER_SELECTORS, OTP_EMAIL_PATTERN, OrganizationPage, PLURAL, PROFILE_SECTION_SELECTORS, PROJECT_TRANSLATIONS_PATH, ROLES_SELECTORS, ROUTES, 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, WEBHOOK_SELECTORS, WebhooksPage, ZAPIER_LIMIT_EXHAUSTED_MESSAGE, ZAPIER_SELECTORS, ZAPIER_TEST_EMAIL, ZAPIER_WEB_TEXTS, ZapierPage, basicHTMLContent, clearCredentials, commands, cpuThrottlingUsingCDP, currencyUtils, decodeQRCodeFromFile, definePlaywrightConfig, executeWithThrottledResources, extractSubdomainFromError, filterUtils, generateRandomBypassEmail, generateStagingData, getByDataQA, getGlobalUserState, getImagePathAndName, getListCount, headerUtils, hexToRGB, hyphenize, i18nFixture, initializeCredentials, initializeTotp, joinHyphenCase, joinString, login, loginWithoutSSO, memberUtils, networkConditions, networkThrottlingUsingCDP, readFileSyncIfExists, removeCredentialFile, shouldSkipSetupAndTeardown, skipTest, squish, stealth as stealthTest, tableUtils, toCamelCase, updateCredentials, writeDataToFile };
|
|
157277
157365
|
//# sourceMappingURL=index.js.map
|