saleor-dashboard/cypress/elements/shared/sharedElements.js

22 lines
756 B
JavaScript
Raw Normal View History

export const SHARED_ELEMENTS = {
header: "[data-test-id='page-header']",
progressBar: '[role="progressbar"]',
2021-07-12 13:35:26 +00:00
circularProgress: '[class*="CircularProgress-circle"]',
skeleton: '[data-test-id="skeleton"]',
2021-07-05 10:21:35 +00:00
table: 'table[class*="Table"]',
tableRow: '[data-test="id"]',
confirmationMsg: "[data-test='notification-success']",
notificationSuccess: '[data-test="notification-success"]',
dialog: '[role="dialog"]',
searchInput: '[data-test-id="searchInput"]',
selectOption: '[data-test="selectFieldOption"]',
richTextEditor: {
empty: '[class*="codex-editor--empty"]'
}
};
export const selectorWithDataValue = value => `[data-value="${value}"]`;
export const getElementByDataTestId = dataTestId =>
`[data-test-id=${dataTestId}]`;