All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.cypress-utils.constants.selectors.common.js Maven / Gradle / Ivy

Go to download

A package encapsulating common code across neeto projects including initializers, utility functions, common components and hooks and so on.

There is a newer version: 4.12.3
Show newest version
import { dataCy, dataTestId, hyphenize } from "../../utils/common";
export var commonSelectors = {
  alertTitle: dataCy("alert-title"),
  alertModalMessage: dataCy("alert-message"),
  alertModalSubmitButton: dataCy("alert-submit-button"),
  checkbox: dataCy("nui-checkbox-input"),
  checkboxLabel: dataCy("nui-checkbox-label"),
  dropdownContainer: dataCy("nui-dropdown-container"),
  dropdownIcon: dataCy("nui-dropdown-icon"),
  heading: dataCy("main-header"),
  paneBody: dataCy("pane-body"),
  paneHeader: dataCy("pane-header"),
  profileSidebar: dataCy("profile-section"),
  selectOption: function selectOption(label) {
    return dataCy("".concat(hyphenize(label), "-select-option"));
  },
  toastMessage: dataCy("toastr-message-container"),
  toastCloseButton: dataCy("toastr-close-button"),
  windowAlert: "#alert-box",
  body: "body",
  toastIcon: ".Toastify__toast-icon",
  paneModalCrossIcon: dataCy("pane-close-button"),
  inputField: dataCy("nui-input-field"),
  alertConfirmationText: dataCy("alert-confirmation-text"),
  alertCancelButton: dataCy("alert-cancel-button"),
  alertModalCrossIcon: dataCy("modal-close-button"),
  saveChangesButton: dataCy("save-changes-button"),
  cancelButton: dataCy("cancel-button"),
  inputFieldError: dataCy("nui-input-error"),
  selectDropDownError: dataCy("nui-select-error"),
  subTitleHeading: function subTitleHeading(index) {
    return dataCy("menubar-subtitle-heading", ":eq(".concat(index, ")"));
  },
  noDataTitle: dataCy("no-data-title"),
  noDataDescription: dataCy("no-data-description"),
  backdrop: dataCy("neeto-backdrop"),
  menuBarHeading: dataCy("menubar-heading"),
  nthTabItem: function nthTabItem(index) {
    return dataCy("tab-item", ":eq(".concat(index, ")"));
  },
  dropdownWrapper: function dropdownWrapper(index) {
    return dataCy("nui-select-container-wrapper", ":eq(".concat(index, ")"));
  },
  toggleButton: dataCy("menubar-toggle-button"),
  tooltip: dataCy("tooltip-box"),
  articlePageTitle: ".serene-article__title",
  tabItem: dataCy("tab-item"),
  labelInputError: dataCy("label-input-error"),
  urlInputError: dataCy("url-input-error"),
  noDataPrimaryButton: dataCy("no-data-primary-button"),
  modalHeader: dataCy("modal-header"),
  nameInputError: dataCy("name-input-error"),
  selectContainer: dataCy("nui-select-container"),
  dropdownMenu: dataCy("nui-select-menu"),
  nthDropdownIcon: function nthDropdownIcon(index) {
    return dataCy("nui-dropdown-icon", ":eq(".concat(index, ")"));
  },
  sidebarToggle: dataCy("neeto-molecules-sidebar-toggler"),
  customDataCy: function customDataCy(name) {
    return dataCy(name);
  },
  leftSubHeader: dataCy("subheader-left"),
  subheader: dataCy("subheader"),
  settingsLink: dataCy("Settings"),
  nthInputField: function nthInputField(index) {
    return dataCy("nui-input-field", ":eq(".concat(index, ")"));
  },
  ticketFieldTextInput: function ticketFieldTextInput(label) {
    return dataCy("".concat(hyphenize(label), "-text-input"));
  }
};
export 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, ")");
  }
};
export var profileSelectors = {
  tab: dataCy("profile-section"),
  logoutLink: dataCy("profile-logout-button"),
  myProfileButton: dataCy("my-profile-button"),
  organizationSettingsButton: dataCy("profile-organization-settings-button"),
  loader: dataTestId("spinner"),
  appSwitcherBody: dataCy("app-switcher-body-wrapper"),
  sidebarInfo: dataCy("sidebar-info"),
  appSwitcherBackButton: dataCy("app-switcher-back-button")
};
//# sourceMappingURL=common.js.map




© 2015 - 2024 Weber Informatics LLC | Privacy Policy