@bigbinary/neeto-commons-frontend 2.1.37 → 2.1.38
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/cypress-utils.cjs.js +85 -27
- package/cypress-utils.cjs.js.map +1 -1
- package/cypress-utils.d.ts +146 -5
- package/cypress-utils.js +85 -28
- package/cypress-utils.js.map +1 -1
- package/package.json +1 -1
package/cypress-utils.cjs.js
CHANGED
|
@@ -191,31 +191,43 @@ Object.defineProperty(requestApis, "allPath", {
|
|
|
191
191
|
get: allPath
|
|
192
192
|
});
|
|
193
193
|
|
|
194
|
+
function _taggedTemplateLiteral(strings, raw) {
|
|
195
|
+
if (!raw) {
|
|
196
|
+
raw = strings.slice(0);
|
|
197
|
+
}
|
|
198
|
+
return Object.freeze(Object.defineProperties(strings, {
|
|
199
|
+
raw: {
|
|
200
|
+
value: Object.freeze(raw)
|
|
201
|
+
}
|
|
202
|
+
}));
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
var _templateObject;
|
|
194
206
|
var commonSelectors = {
|
|
195
207
|
alertTitle: dataCy("alert-title"),
|
|
196
208
|
alertModalMessage: dataCy("alert-message"),
|
|
197
209
|
alertModalSubmitButton: dataCy("alert-submit-button"),
|
|
198
|
-
checkbox: "
|
|
210
|
+
checkbox: dataCy("nui-checkbox-input"),
|
|
199
211
|
checkboxLabel: dataCy("nui-checkbox-label"),
|
|
200
212
|
dropdownContainer: dataCy("nui-dropdown-container"),
|
|
201
213
|
dropdownIcon: dataCy("nui-dropdown-icon"),
|
|
202
214
|
heading: dataCy("main-header"),
|
|
203
|
-
paneBody: "
|
|
204
|
-
paneHeader: "
|
|
205
|
-
profileSidebar: "
|
|
215
|
+
paneBody: dataCy("pane-body"),
|
|
216
|
+
paneHeader: dataCy("pane-header"),
|
|
217
|
+
profileSidebar: dataCy("profile-section"),
|
|
206
218
|
selectOption: function selectOption(label) {
|
|
207
219
|
return dataCy("".concat(hyphenize(label), "-select-option"));
|
|
208
220
|
},
|
|
209
221
|
toastMessage: dataCy("toastr-message-container"),
|
|
210
|
-
toastCloseButton: "
|
|
222
|
+
toastCloseButton: dataCy("toastr-close-button"),
|
|
211
223
|
windowAlert: "#alert-box",
|
|
212
224
|
body: "body",
|
|
213
225
|
toastIcon: ".Toastify__toast-icon",
|
|
214
|
-
paneModalCrossIcon: "
|
|
226
|
+
paneModalCrossIcon: dataCy("pane-close-button"),
|
|
215
227
|
inputField: dataCy("nui-input-field"),
|
|
216
228
|
alertConfirmationText: dataCy("alert-confirmation-text"),
|
|
217
229
|
alertCancelButton: dataCy("alert-cancel-button"),
|
|
218
|
-
alertModalCrossIcon: "
|
|
230
|
+
alertModalCrossIcon: dataCy("modal-close-button"),
|
|
219
231
|
saveChangesButton: dataCy("save-changes-button"),
|
|
220
232
|
cancelButton: dataCy("cancel-button"),
|
|
221
233
|
inputFieldError: dataCy("nui-input-error"),
|
|
@@ -225,17 +237,41 @@ var commonSelectors = {
|
|
|
225
237
|
},
|
|
226
238
|
noDataTitle: dataCy("no-data-title"),
|
|
227
239
|
noDataDescription: dataCy("no-data-description"),
|
|
228
|
-
|
|
240
|
+
backdrop: dataCy("neeto-backdrop"),
|
|
229
241
|
menuBarHeading: dataCy("menubar-heading"),
|
|
230
|
-
|
|
242
|
+
nthTabItem: function nthTabItem(index) {
|
|
231
243
|
return dataCy("tab-item", ":eq(".concat(index, ")"));
|
|
232
244
|
},
|
|
233
245
|
dropdownWrapper: function dropdownWrapper(index) {
|
|
234
246
|
return dataCy("nui-select-container-wrapper", ":eq(".concat(index, ")"));
|
|
235
247
|
},
|
|
236
248
|
toggleButton: dataCy("menubar-toggle-button"),
|
|
237
|
-
tooltip: "
|
|
238
|
-
articlePageTitle: ".serene-article__title"
|
|
249
|
+
tooltip: dataCy("tooltip-box"),
|
|
250
|
+
articlePageTitle: ".serene-article__title",
|
|
251
|
+
tabItem: dataCy("tab-item"),
|
|
252
|
+
labelInputError: dataCy("label-input-error"),
|
|
253
|
+
urlInputError: dataCy("url-input-error"),
|
|
254
|
+
noDataPrimaryButton: dataCy("no-data-primary-button"),
|
|
255
|
+
modalHeader: dataCy("modal-header"),
|
|
256
|
+
nameInputError: dataCy("name-input-error"),
|
|
257
|
+
selectContainer: dataCy("nui-select-container"),
|
|
258
|
+
dropdownMenu: dataCy("nui-select-menu"),
|
|
259
|
+
nthDropdownIcon: function nthDropdownIcon(index) {
|
|
260
|
+
return dataCy("nui-dropdown-icon", ":eq(".concat(index, ")"));
|
|
261
|
+
},
|
|
262
|
+
sidebarToggle: dataCy("neeto-molecules-sidebar-toggler"),
|
|
263
|
+
customDataCy: function customDataCy(name) {
|
|
264
|
+
return dataCy(name);
|
|
265
|
+
},
|
|
266
|
+
leftSubHeader: dataCy("subheader-left"),
|
|
267
|
+
subheader: dataCy("subheader"),
|
|
268
|
+
settingsLink: dataCy("Settings"),
|
|
269
|
+
nthInputField: function nthInputField(index) {
|
|
270
|
+
return dataCy("nui-input-field"(_templateObject || (_templateObject = _taggedTemplateLiteral([":eq(", ")"])), index));
|
|
271
|
+
},
|
|
272
|
+
ticketFieldTextInput: function ticketFieldTextInput(label) {
|
|
273
|
+
return dataCy("".concat(hyphenize(label), "-text-input"));
|
|
274
|
+
}
|
|
239
275
|
};
|
|
240
276
|
var tableSelectors = {
|
|
241
277
|
nthColumn: function nthColumn(n) {
|
|
@@ -252,10 +288,12 @@ var tableSelectors = {
|
|
|
252
288
|
var profileSelectors = {
|
|
253
289
|
tab: dataCy("profile-section"),
|
|
254
290
|
logoutLink: dataCy("profile-logout-button"),
|
|
255
|
-
profileOptionsContainer: '[class="tippy-box sidebar-featured-tooltip__content"]',
|
|
256
291
|
myProfileButton: dataCy("my-profile-button"),
|
|
257
292
|
organizationSettingsButton: dataCy("profile-organization-settings-button"),
|
|
258
|
-
loader: dataTestId("spinner")
|
|
293
|
+
loader: dataTestId("spinner"),
|
|
294
|
+
appSwitcherBody: dataCy("app-switcher-body-wrapper"),
|
|
295
|
+
sidebarInfo: dataCy("sidebar-info"),
|
|
296
|
+
appSwitcherBackButton: dataCy("app-switcher-back-button")
|
|
259
297
|
};
|
|
260
298
|
|
|
261
299
|
var commonTexts = {
|
|
@@ -282,7 +320,13 @@ var commonTexts = {
|
|
|
282
320
|
unsavedChangesAlertTitle: "You have unsaved changes!",
|
|
283
321
|
unsavedChangesAlertMessage: "Are you sure you want to continue? All of your unsaved changes will be lost.",
|
|
284
322
|
clearFilters: "Clear filters",
|
|
285
|
-
filters: "Filters"
|
|
323
|
+
filters: "Filters",
|
|
324
|
+
descriptionRequiredMessage: "Description is required.",
|
|
325
|
+
active: "active",
|
|
326
|
+
deactivated: "deactivated",
|
|
327
|
+
nameExistsMsg: "Name already exists",
|
|
328
|
+
cancel: "Cancel",
|
|
329
|
+
"continue": "Continue"
|
|
286
330
|
};
|
|
287
331
|
|
|
288
332
|
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 +610,6 @@ var memberSelectors = {
|
|
|
566
610
|
continueButton: dataCy("ntm-manage-member-continue-button"),
|
|
567
611
|
submitButton: dataCy("ntm-manage-member-submit-button"),
|
|
568
612
|
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
613
|
deactivatedAgentsButton: dataCy("ntm-members-menubar-deactivated-block"),
|
|
573
614
|
activatedMembersButton: dataCy("ntm-members-menubar-active-block"),
|
|
574
615
|
columnCheckBox: dataCy("neeto-ui-columns-checkbox"),
|
|
@@ -579,7 +620,6 @@ var memberSelectors = {
|
|
|
579
620
|
editButton: dataCy("ntm-edit-member-button"),
|
|
580
621
|
menuBarHeading: dataCy("ntm-members-menubar-heading"),
|
|
581
622
|
activateOrDeactivateMember: dataCy("ntm-deactivate-member-button"),
|
|
582
|
-
subHeader: "[data-testid='subheader']",
|
|
583
623
|
columnsButton: dataCy("columns-dropdown-button"),
|
|
584
624
|
columnsDropdownContainer: dataCy("columns-dropdown-container"),
|
|
585
625
|
emailDropdownItemLabel: dataCy("email-checkbox-label"),
|
|
@@ -594,13 +634,30 @@ var memberSelectors = {
|
|
|
594
634
|
statusTag: dataCy("ntm-member-status-tag")
|
|
595
635
|
};
|
|
596
636
|
var memberFormSelectors = {
|
|
597
|
-
emailTextField: "
|
|
637
|
+
emailTextField: dataCy("email-select-input-field"),
|
|
598
638
|
firstNameTextField: dataCy("ntm-edit-member-first-name-text-field"),
|
|
599
639
|
lastNameTextField: dataCy("ntm-edit-member-last-name-text-field"),
|
|
600
640
|
emailInput: dataCy("ntm-manage-member-email-input"),
|
|
601
641
|
emailErrorField: dataCy("emails-input-error"),
|
|
602
642
|
cancelButton: dataCy("ntm-manage-member-cancel-button")
|
|
603
643
|
};
|
|
644
|
+
var neetoFiltersSelectors = {
|
|
645
|
+
emailSelectContainer: dataCy("email-select-container-wrapper"),
|
|
646
|
+
filterPaneHeading: dataCy("neeto-filters-pane-header"),
|
|
647
|
+
neetoFiltersEmailBlock: dataCy("neeto-filters-email-block"),
|
|
648
|
+
neetoFiltersRoleBlock: dataCy("neeto-filters-role-block"),
|
|
649
|
+
neetoFiltersBarClearButton: dataCy("neeto-filters-bar-clear-btn"),
|
|
650
|
+
neetoFiltersNameFilterField: dataCy("neeto-filters-name-filter"),
|
|
651
|
+
neetoFilterNameBlock: dataCy("neeto-filters-name-block"),
|
|
652
|
+
roleSelectContainer: dataCy("role-select-container-wrapper"),
|
|
653
|
+
filterButton: dataCy("neeto-filters-toggle-btn"),
|
|
654
|
+
filtersClearButton: dataCy("neeto-filters-clear-btn"),
|
|
655
|
+
filterDoneButton: dataCy("neeto-filters-done-btn"),
|
|
656
|
+
filteredMembersCount: dataCy("ntm-filtered-members-count"),
|
|
657
|
+
allMenubarBlock: dataCy("ntm-members-menubar-all-block"),
|
|
658
|
+
filtersEmailFilter: dataCy("neeto-filters-email-filter"),
|
|
659
|
+
paneModalCrossIcon: dataCy("neeto-filters-close-button")
|
|
660
|
+
};
|
|
604
661
|
|
|
605
662
|
var signUpSelectors = {
|
|
606
663
|
emailTextField: dataCy("signup-email-text-field"),
|
|
@@ -625,13 +682,13 @@ var helpIconSelectors = {
|
|
|
625
682
|
whatsNewButton: dataCy("help-link-changelog-button"),
|
|
626
683
|
whatsNewWidgetInfo: "h1",
|
|
627
684
|
whatsNewWidgetCloseButton: ".nc-widget-header__btn",
|
|
628
|
-
keyboardShortcutPaneHeading: "
|
|
629
|
-
keyboardShortcutPaneCrossIcon: "
|
|
685
|
+
keyboardShortcutPaneHeading: dataCy("keyboard-shortcuts-pane-title"),
|
|
686
|
+
keyboardShortcutPaneCrossIcon: dataCy("keyboard-shortcuts-pane-close-button")
|
|
630
687
|
};
|
|
631
688
|
var chatWidgetSelectors = {
|
|
632
689
|
chatWidgetHomeCard: ".neeto-chat-widget-home__card-content",
|
|
633
|
-
widgetSubmitButton: "
|
|
634
|
-
chatBubbleMessage: "
|
|
690
|
+
widgetSubmitButton: dataCy("neeto-chat-widget-pre-chat-submit-btn"),
|
|
691
|
+
chatBubbleMessage: dataCy("neeto-chat-widget-chat-message-bubble"),
|
|
635
692
|
chatCloseButton: ".neeto-chat-widget-icon--close",
|
|
636
693
|
widgetIframe: "#neetochat-iframe"
|
|
637
694
|
};
|
|
@@ -1251,11 +1308,11 @@ var verifyMemberDetails = function verifyMemberDetails(_ref3) {
|
|
|
1251
1308
|
});
|
|
1252
1309
|
!skipSearchRequest && cy.wait("@searchMember");
|
|
1253
1310
|
return cy.contains(tableSelectors.tableRow, email).within(function () {
|
|
1254
|
-
cy.get(
|
|
1255
|
-
cy.get(
|
|
1311
|
+
cy.get(tableSelectors.nthColumn(3)).should("have.text", email);
|
|
1312
|
+
cy.get(tableSelectors.nthColumn(2)).within(function () {
|
|
1256
1313
|
name && cy.get("p").should("have.text", name);
|
|
1257
1314
|
});
|
|
1258
|
-
role && cy.get(
|
|
1315
|
+
role && cy.get(tableSelectors.nthColumn(4)).should("have.text", role);
|
|
1259
1316
|
statusTag && cy.get(memberSelectors.statusTag).should("have.text", statusTag);
|
|
1260
1317
|
});
|
|
1261
1318
|
};
|
|
@@ -1450,7 +1507,7 @@ var deactivateMemberViaRequest = function deactivateMemberViaRequest(email) {
|
|
|
1450
1507
|
cy.reloadAndWait(requestCount);
|
|
1451
1508
|
};
|
|
1452
1509
|
var clickOnColumnIcon = function clickOnColumnIcon() {
|
|
1453
|
-
cy.get(
|
|
1510
|
+
cy.get(commonSelectors.subheader).should("exist").within(function () {
|
|
1454
1511
|
cy.get(memberSelectors.columnsButton).click();
|
|
1455
1512
|
});
|
|
1456
1513
|
};
|
|
@@ -1760,6 +1817,7 @@ exports.memberTableTexts = memberTableTexts;
|
|
|
1760
1817
|
exports.memberTexts = memberTexts;
|
|
1761
1818
|
exports.memberUtils = memberUtils;
|
|
1762
1819
|
exports.navigationUtils = navigationUtils;
|
|
1820
|
+
exports.neetoFiltersSelectors = neetoFiltersSelectors;
|
|
1763
1821
|
exports.profileSelectors = profileSelectors;
|
|
1764
1822
|
exports.profileTexts = profileTexts;
|
|
1765
1823
|
exports.sendEmail = sendEmail;
|