package.cjs.cypress-utils.constants.selectors.common.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of neeto-commons-frontend Show documentation
Show all versions of neeto-commons-frontend Show documentation
A package encapsulating common code across neeto projects including initializers, utility functions, common components and hooks and so on.
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.tableSelectors = exports.profileSelectors = exports.commonSelectors = void 0;
var _common = require("../../utils/common");
var commonSelectors = {
alertTitle: (0, _common.dataCy)("alert-title"),
alertModalMessage: (0, _common.dataCy)("alert-message"),
alertModalSubmitButton: (0, _common.dataCy)("alert-submit-button"),
checkbox: (0, _common.dataCy)("nui-checkbox-input"),
checkboxLabel: (0, _common.dataCy)("nui-checkbox-label"),
dropdownContainer: (0, _common.dataCy)("nui-dropdown-container"),
dropdownIcon: (0, _common.dataCy)("nui-dropdown-icon"),
heading: (0, _common.dataCy)("main-header"),
paneBody: (0, _common.dataCy)("pane-body"),
paneHeader: (0, _common.dataCy)("pane-header"),
profileSidebar: (0, _common.dataCy)("profile-section"),
selectOption: function selectOption(label) {
return (0, _common.dataCy)("".concat((0, _common.hyphenize)(label), "-select-option"));
},
toastMessage: (0, _common.dataCy)("toastr-message-container"),
toastCloseButton: (0, _common.dataCy)("toastr-close-button"),
windowAlert: "#alert-box",
body: "body",
toastIcon: ".Toastify__toast-icon",
paneModalCrossIcon: (0, _common.dataCy)("pane-close-button"),
inputField: (0, _common.dataCy)("nui-input-field"),
alertConfirmationText: (0, _common.dataCy)("alert-confirmation-text"),
alertCancelButton: (0, _common.dataCy)("alert-cancel-button"),
alertModalCrossIcon: (0, _common.dataCy)("modal-close-button"),
saveChangesButton: (0, _common.dataCy)("save-changes-button"),
cancelButton: (0, _common.dataCy)("cancel-button"),
inputFieldError: (0, _common.dataCy)("nui-input-error"),
selectDropDownError: (0, _common.dataCy)("nui-select-error"),
subTitleHeading: function subTitleHeading(index) {
return (0, _common.dataCy)("menubar-subtitle-heading", ":eq(".concat(index, ")"));
},
noDataTitle: (0, _common.dataCy)("no-data-title"),
noDataDescription: (0, _common.dataCy)("no-data-description"),
backdrop: (0, _common.dataCy)("neeto-backdrop"),
menuBarHeading: (0, _common.dataCy)("menubar-heading"),
nthTabItem: function nthTabItem(index) {
return (0, _common.dataCy)("tab-item", ":eq(".concat(index, ")"));
},
dropdownWrapper: function dropdownWrapper(index) {
return (0, _common.dataCy)("nui-select-container-wrapper", ":eq(".concat(index, ")"));
},
toggleButton: (0, _common.dataCy)("menubar-toggle-button"),
tooltip: (0, _common.dataCy)("tooltip-box"),
articlePageTitle: ".serene-article__title",
tabItem: (0, _common.dataCy)("tab-item"),
labelInputError: (0, _common.dataCy)("label-input-error"),
urlInputError: (0, _common.dataCy)("url-input-error"),
noDataPrimaryButton: (0, _common.dataCy)("no-data-primary-button"),
modalHeader: (0, _common.dataCy)("modal-header"),
nameInputError: (0, _common.dataCy)("name-input-error"),
selectContainer: (0, _common.dataCy)("nui-select-container"),
dropdownMenu: (0, _common.dataCy)("nui-select-menu"),
nthDropdownIcon: function nthDropdownIcon(index) {
return (0, _common.dataCy)("nui-dropdown-icon", ":eq(".concat(index, ")"));
},
sidebarToggle: (0, _common.dataCy)("neeto-molecules-sidebar-toggler"),
customDataCy: function customDataCy(name) {
return (0, _common.dataCy)(name);
},
leftSubHeader: (0, _common.dataCy)("subheader-left"),
subheader: (0, _common.dataCy)("subheader"),
settingsLink: (0, _common.dataCy)("Settings"),
nthInputField: function nthInputField(index) {
return (0, _common.dataCy)("nui-input-field", ":eq(".concat(index, ")"));
},
ticketFieldTextInput: function ticketFieldTextInput(label) {
return (0, _common.dataCy)("".concat((0, _common.hyphenize)(label), "-text-input"));
}
};
exports.commonSelectors = commonSelectors;
var tableSelectors = {
nthColumn: function nthColumn(n) {
return "td:nth-child(".concat(n, ")");
},
tableBody: ".ant-table-body",
tableHeader: ".ant-table-thead th",
tableRow: ".ant-table-tbody tr",
spinner: ".ant-spin",
nthHeading: function nthHeading(n) {
return "tr > th:nth-child(".concat(n, ")");
}
};
exports.tableSelectors = tableSelectors;
var profileSelectors = {
tab: (0, _common.dataCy)("profile-section"),
logoutLink: (0, _common.dataCy)("profile-logout-button"),
myProfileButton: (0, _common.dataCy)("my-profile-button"),
organizationSettingsButton: (0, _common.dataCy)("profile-organization-settings-button"),
loader: (0, _common.dataTestId)("spinner"),
appSwitcherBody: (0, _common.dataCy)("app-switcher-body-wrapper"),
sidebarInfo: (0, _common.dataCy)("sidebar-info"),
appSwitcherBackButton: (0, _common.dataCy)("app-switcher-back-button")
};
exports.profileSelectors = profileSelectors;
//# sourceMappingURL=common.js.map