@bigbinary/neeto-commons-frontend 2.1.37 → 2.1.39
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/README.md +1 -1
- package/cypress-utils.cjs.js +79 -32
- package/cypress-utils.cjs.js.map +1 -1
- package/cypress-utils.d.ts +146 -5
- package/cypress-utils.js +79 -33
- package/cypress-utils.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/cypress-utils.cjs.js
CHANGED
|
@@ -195,27 +195,27 @@ var commonSelectors = {
|
|
|
195
195
|
alertTitle: dataCy("alert-title"),
|
|
196
196
|
alertModalMessage: dataCy("alert-message"),
|
|
197
197
|
alertModalSubmitButton: dataCy("alert-submit-button"),
|
|
198
|
-
checkbox: "
|
|
198
|
+
checkbox: dataCy("nui-checkbox-input"),
|
|
199
199
|
checkboxLabel: dataCy("nui-checkbox-label"),
|
|
200
200
|
dropdownContainer: dataCy("nui-dropdown-container"),
|
|
201
201
|
dropdownIcon: dataCy("nui-dropdown-icon"),
|
|
202
202
|
heading: dataCy("main-header"),
|
|
203
|
-
paneBody: "
|
|
204
|
-
paneHeader: "
|
|
205
|
-
profileSidebar: "
|
|
203
|
+
paneBody: dataCy("pane-body"),
|
|
204
|
+
paneHeader: dataCy("pane-header"),
|
|
205
|
+
profileSidebar: dataCy("profile-section"),
|
|
206
206
|
selectOption: function selectOption(label) {
|
|
207
207
|
return dataCy("".concat(hyphenize(label), "-select-option"));
|
|
208
208
|
},
|
|
209
209
|
toastMessage: dataCy("toastr-message-container"),
|
|
210
|
-
toastCloseButton: "
|
|
210
|
+
toastCloseButton: dataCy("toastr-close-button"),
|
|
211
211
|
windowAlert: "#alert-box",
|
|
212
212
|
body: "body",
|
|
213
213
|
toastIcon: ".Toastify__toast-icon",
|
|
214
|
-
paneModalCrossIcon: "
|
|
214
|
+
paneModalCrossIcon: dataCy("pane-close-button"),
|
|
215
215
|
inputField: dataCy("nui-input-field"),
|
|
216
216
|
alertConfirmationText: dataCy("alert-confirmation-text"),
|
|
217
217
|
alertCancelButton: dataCy("alert-cancel-button"),
|
|
218
|
-
alertModalCrossIcon: "
|
|
218
|
+
alertModalCrossIcon: dataCy("modal-close-button"),
|
|
219
219
|
saveChangesButton: dataCy("save-changes-button"),
|
|
220
220
|
cancelButton: dataCy("cancel-button"),
|
|
221
221
|
inputFieldError: dataCy("nui-input-error"),
|
|
@@ -225,17 +225,41 @@ var commonSelectors = {
|
|
|
225
225
|
},
|
|
226
226
|
noDataTitle: dataCy("no-data-title"),
|
|
227
227
|
noDataDescription: dataCy("no-data-description"),
|
|
228
|
-
|
|
228
|
+
backdrop: dataCy("neeto-backdrop"),
|
|
229
229
|
menuBarHeading: dataCy("menubar-heading"),
|
|
230
|
-
|
|
230
|
+
nthTabItem: function nthTabItem(index) {
|
|
231
231
|
return dataCy("tab-item", ":eq(".concat(index, ")"));
|
|
232
232
|
},
|
|
233
233
|
dropdownWrapper: function dropdownWrapper(index) {
|
|
234
234
|
return dataCy("nui-select-container-wrapper", ":eq(".concat(index, ")"));
|
|
235
235
|
},
|
|
236
236
|
toggleButton: dataCy("menubar-toggle-button"),
|
|
237
|
-
tooltip: "
|
|
238
|
-
articlePageTitle: ".serene-article__title"
|
|
237
|
+
tooltip: dataCy("tooltip-box"),
|
|
238
|
+
articlePageTitle: ".serene-article__title",
|
|
239
|
+
tabItem: dataCy("tab-item"),
|
|
240
|
+
labelInputError: dataCy("label-input-error"),
|
|
241
|
+
urlInputError: dataCy("url-input-error"),
|
|
242
|
+
noDataPrimaryButton: dataCy("no-data-primary-button"),
|
|
243
|
+
modalHeader: dataCy("modal-header"),
|
|
244
|
+
nameInputError: dataCy("name-input-error"),
|
|
245
|
+
selectContainer: dataCy("nui-select-container"),
|
|
246
|
+
dropdownMenu: dataCy("nui-select-menu"),
|
|
247
|
+
nthDropdownIcon: function nthDropdownIcon(index) {
|
|
248
|
+
return dataCy("nui-dropdown-icon", ":eq(".concat(index, ")"));
|
|
249
|
+
},
|
|
250
|
+
sidebarToggle: dataCy("neeto-molecules-sidebar-toggler"),
|
|
251
|
+
customDataCy: function customDataCy(name) {
|
|
252
|
+
return dataCy(name);
|
|
253
|
+
},
|
|
254
|
+
leftSubHeader: dataCy("subheader-left"),
|
|
255
|
+
subheader: dataCy("subheader"),
|
|
256
|
+
settingsLink: dataCy("Settings"),
|
|
257
|
+
nthInputField: function nthInputField(index) {
|
|
258
|
+
return dataCy("nui-input-field", ":eq(".concat(index, ")"));
|
|
259
|
+
},
|
|
260
|
+
ticketFieldTextInput: function ticketFieldTextInput(label) {
|
|
261
|
+
return dataCy("".concat(hyphenize(label), "-text-input"));
|
|
262
|
+
}
|
|
239
263
|
};
|
|
240
264
|
var tableSelectors = {
|
|
241
265
|
nthColumn: function nthColumn(n) {
|
|
@@ -252,10 +276,12 @@ var tableSelectors = {
|
|
|
252
276
|
var profileSelectors = {
|
|
253
277
|
tab: dataCy("profile-section"),
|
|
254
278
|
logoutLink: dataCy("profile-logout-button"),
|
|
255
|
-
profileOptionsContainer: '[class="tippy-box sidebar-featured-tooltip__content"]',
|
|
256
279
|
myProfileButton: dataCy("my-profile-button"),
|
|
257
280
|
organizationSettingsButton: dataCy("profile-organization-settings-button"),
|
|
258
|
-
loader: dataTestId("spinner")
|
|
281
|
+
loader: dataTestId("spinner"),
|
|
282
|
+
appSwitcherBody: dataCy("app-switcher-body-wrapper"),
|
|
283
|
+
sidebarInfo: dataCy("sidebar-info"),
|
|
284
|
+
appSwitcherBackButton: dataCy("app-switcher-back-button")
|
|
259
285
|
};
|
|
260
286
|
|
|
261
287
|
var commonTexts = {
|
|
@@ -282,7 +308,13 @@ var commonTexts = {
|
|
|
282
308
|
unsavedChangesAlertTitle: "You have unsaved changes!",
|
|
283
309
|
unsavedChangesAlertMessage: "Are you sure you want to continue? All of your unsaved changes will be lost.",
|
|
284
310
|
clearFilters: "Clear filters",
|
|
285
|
-
filters: "Filters"
|
|
311
|
+
filters: "Filters",
|
|
312
|
+
descriptionRequiredMessage: "Description is required.",
|
|
313
|
+
active: "active",
|
|
314
|
+
deactivated: "deactivated",
|
|
315
|
+
nameExistsMsg: "Name already exists",
|
|
316
|
+
cancel: "Cancel",
|
|
317
|
+
"continue": "Continue"
|
|
286
318
|
};
|
|
287
319
|
|
|
288
320
|
function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -566,9 +598,6 @@ var memberSelectors = {
|
|
|
566
598
|
continueButton: dataCy("ntm-manage-member-continue-button"),
|
|
567
599
|
submitButton: dataCy("ntm-manage-member-submit-button"),
|
|
568
600
|
searchTextField: dataCy("ntm-search-members-input"),
|
|
569
|
-
email: "td:nth-child(3)",
|
|
570
|
-
name: "td:nth-child(2)",
|
|
571
|
-
role: "td:nth-child(4)",
|
|
572
601
|
deactivatedAgentsButton: dataCy("ntm-members-menubar-deactivated-block"),
|
|
573
602
|
activatedMembersButton: dataCy("ntm-members-menubar-active-block"),
|
|
574
603
|
columnCheckBox: dataCy("neeto-ui-columns-checkbox"),
|
|
@@ -579,7 +608,6 @@ var memberSelectors = {
|
|
|
579
608
|
editButton: dataCy("ntm-edit-member-button"),
|
|
580
609
|
menuBarHeading: dataCy("ntm-members-menubar-heading"),
|
|
581
610
|
activateOrDeactivateMember: dataCy("ntm-deactivate-member-button"),
|
|
582
|
-
subHeader: "[data-testid='subheader']",
|
|
583
611
|
columnsButton: dataCy("columns-dropdown-button"),
|
|
584
612
|
columnsDropdownContainer: dataCy("columns-dropdown-container"),
|
|
585
613
|
emailDropdownItemLabel: dataCy("email-checkbox-label"),
|
|
@@ -594,13 +622,30 @@ var memberSelectors = {
|
|
|
594
622
|
statusTag: dataCy("ntm-member-status-tag")
|
|
595
623
|
};
|
|
596
624
|
var memberFormSelectors = {
|
|
597
|
-
emailTextField: "
|
|
625
|
+
emailTextField: dataCy("email-select-input-field"),
|
|
598
626
|
firstNameTextField: dataCy("ntm-edit-member-first-name-text-field"),
|
|
599
627
|
lastNameTextField: dataCy("ntm-edit-member-last-name-text-field"),
|
|
600
628
|
emailInput: dataCy("ntm-manage-member-email-input"),
|
|
601
629
|
emailErrorField: dataCy("emails-input-error"),
|
|
602
630
|
cancelButton: dataCy("ntm-manage-member-cancel-button")
|
|
603
631
|
};
|
|
632
|
+
var neetoFiltersSelectors = {
|
|
633
|
+
emailSelectContainer: dataCy("email-select-container-wrapper"),
|
|
634
|
+
filterPaneHeading: dataCy("neeto-filters-pane-header"),
|
|
635
|
+
neetoFiltersEmailBlock: dataCy("neeto-filters-email-block"),
|
|
636
|
+
neetoFiltersRoleBlock: dataCy("neeto-filters-role-block"),
|
|
637
|
+
neetoFiltersBarClearButton: dataCy("neeto-filters-bar-clear-btn"),
|
|
638
|
+
neetoFiltersNameFilterField: dataCy("neeto-filters-name-filter"),
|
|
639
|
+
neetoFilterNameBlock: dataCy("neeto-filters-name-block"),
|
|
640
|
+
roleSelectContainer: dataCy("role-select-container-wrapper"),
|
|
641
|
+
filterButton: dataCy("neeto-filters-toggle-btn"),
|
|
642
|
+
filtersClearButton: dataCy("neeto-filters-clear-btn"),
|
|
643
|
+
filterDoneButton: dataCy("neeto-filters-done-btn"),
|
|
644
|
+
filteredMembersCount: dataCy("ntm-filtered-members-count"),
|
|
645
|
+
allMenubarBlock: dataCy("ntm-members-menubar-all-block"),
|
|
646
|
+
filtersEmailFilter: dataCy("neeto-filters-email-filter"),
|
|
647
|
+
paneModalCrossIcon: dataCy("neeto-filters-close-button")
|
|
648
|
+
};
|
|
604
649
|
|
|
605
650
|
var signUpSelectors = {
|
|
606
651
|
emailTextField: dataCy("signup-email-text-field"),
|
|
@@ -625,13 +670,13 @@ var helpIconSelectors = {
|
|
|
625
670
|
whatsNewButton: dataCy("help-link-changelog-button"),
|
|
626
671
|
whatsNewWidgetInfo: "h1",
|
|
627
672
|
whatsNewWidgetCloseButton: ".nc-widget-header__btn",
|
|
628
|
-
keyboardShortcutPaneHeading: "
|
|
629
|
-
keyboardShortcutPaneCrossIcon: "
|
|
673
|
+
keyboardShortcutPaneHeading: dataCy("keyboard-shortcuts-pane-title"),
|
|
674
|
+
keyboardShortcutPaneCrossIcon: dataCy("keyboard-shortcuts-pane-close-button")
|
|
630
675
|
};
|
|
631
676
|
var chatWidgetSelectors = {
|
|
632
|
-
chatWidgetHomeCard: "
|
|
633
|
-
widgetSubmitButton: "
|
|
634
|
-
chatBubbleMessage: "
|
|
677
|
+
chatWidgetHomeCard: dataCy("neeto-chat-widget-cta-title"),
|
|
678
|
+
widgetSubmitButton: dataCy("neeto-chat-widget-pre-chat-submit-btn"),
|
|
679
|
+
chatBubbleMessage: dataCy("neeto-chat-widget-chat-message-bubble"),
|
|
635
680
|
chatCloseButton: ".neeto-chat-widget-icon--close",
|
|
636
681
|
widgetIframe: "#neetochat-iframe"
|
|
637
682
|
};
|
|
@@ -707,8 +752,6 @@ var helpIconTexts = {
|
|
|
707
752
|
welcome: "Welcome",
|
|
708
753
|
keyboardShortcuts: "Keyboard shortcuts",
|
|
709
754
|
liveChat: "Live chat",
|
|
710
|
-
newConversation: "New Conversation",
|
|
711
|
-
chatMessage: "Hello. Go ahead and ask us anything.",
|
|
712
755
|
whatsNew: "What's new"
|
|
713
756
|
};
|
|
714
757
|
var profileTexts = {
|
|
@@ -889,6 +932,7 @@ Object.defineProperty(fake, "streetAddress", {
|
|
|
889
932
|
});
|
|
890
933
|
fake.phoneNumber = phoneNumber;
|
|
891
934
|
|
|
935
|
+
/* eslint-disable xss/no-location-href-assign */
|
|
892
936
|
var verifyTabMenu = function verifyTabMenu(_ref) {
|
|
893
937
|
var tabSelector = _ref.tabSelector,
|
|
894
938
|
_ref$alias = _ref.alias,
|
|
@@ -980,7 +1024,9 @@ var verifyChatWithUsTab = function verifyChatWithUsTab(_ref3) {
|
|
|
980
1024
|
});
|
|
981
1025
|
cy.get(chatWidgetSelectors.chatWidgetHomeCard, {
|
|
982
1026
|
timeout: 10000
|
|
983
|
-
}).
|
|
1027
|
+
}).click({
|
|
1028
|
+
force: true
|
|
1029
|
+
});
|
|
984
1030
|
requestCount && cy.wait("@".concat(alias), requestCount);
|
|
985
1031
|
requestCount && cy.interceptNonVersionedApi({
|
|
986
1032
|
url: requestApis.allChatPath,
|
|
@@ -989,7 +1035,7 @@ var verifyChatWithUsTab = function verifyChatWithUsTab(_ref3) {
|
|
|
989
1035
|
});
|
|
990
1036
|
cy.get(chatWidgetSelectors.widgetSubmitButton).click();
|
|
991
1037
|
requestCount && cy.waitForMultipleRequest("@".concat(alias), requestCount);
|
|
992
|
-
cy.get(chatWidgetSelectors.chatBubbleMessage).should("
|
|
1038
|
+
cy.get(chatWidgetSelectors.chatBubbleMessage).should("be.visible");
|
|
993
1039
|
});
|
|
994
1040
|
cy.get(chatWidgetSelectors.chatCloseButton).click();
|
|
995
1041
|
cy.get(chatWidgetSelectors.widgetIframe).should("not.exist");
|
|
@@ -1251,11 +1297,11 @@ var verifyMemberDetails = function verifyMemberDetails(_ref3) {
|
|
|
1251
1297
|
});
|
|
1252
1298
|
!skipSearchRequest && cy.wait("@searchMember");
|
|
1253
1299
|
return cy.contains(tableSelectors.tableRow, email).within(function () {
|
|
1254
|
-
cy.get(
|
|
1255
|
-
cy.get(
|
|
1300
|
+
cy.get(tableSelectors.nthColumn(3)).should("have.text", email);
|
|
1301
|
+
cy.get(tableSelectors.nthColumn(2)).within(function () {
|
|
1256
1302
|
name && cy.get("p").should("have.text", name);
|
|
1257
1303
|
});
|
|
1258
|
-
role && cy.get(
|
|
1304
|
+
role && cy.get(tableSelectors.nthColumn(4)).should("have.text", role);
|
|
1259
1305
|
statusTag && cy.get(memberSelectors.statusTag).should("have.text", statusTag);
|
|
1260
1306
|
});
|
|
1261
1307
|
};
|
|
@@ -1450,7 +1496,7 @@ var deactivateMemberViaRequest = function deactivateMemberViaRequest(email) {
|
|
|
1450
1496
|
cy.reloadAndWait(requestCount);
|
|
1451
1497
|
};
|
|
1452
1498
|
var clickOnColumnIcon = function clickOnColumnIcon() {
|
|
1453
|
-
cy.get(
|
|
1499
|
+
cy.get(commonSelectors.subheader).should("exist").within(function () {
|
|
1454
1500
|
cy.get(memberSelectors.columnsButton).click();
|
|
1455
1501
|
});
|
|
1456
1502
|
};
|
|
@@ -1760,6 +1806,7 @@ exports.memberTableTexts = memberTableTexts;
|
|
|
1760
1806
|
exports.memberTexts = memberTexts;
|
|
1761
1807
|
exports.memberUtils = memberUtils;
|
|
1762
1808
|
exports.navigationUtils = navigationUtils;
|
|
1809
|
+
exports.neetoFiltersSelectors = neetoFiltersSelectors;
|
|
1763
1810
|
exports.profileSelectors = profileSelectors;
|
|
1764
1811
|
exports.profileTexts = profileTexts;
|
|
1765
1812
|
exports.sendEmail = sendEmail;
|