saleor-dashboard/cypress/elements/shared/sharedElements.js
Karolina Rakoczy f1b313ea69
Saleor 3873 tests for navigation (#1234)
* add test for creating menu

* tests for navigation

* fix imports
2021-07-15 15:31:05 +03:00

21 lines
756 B
JavaScript

export const SHARED_ELEMENTS = {
header: "[data-test-id='page-header']",
progressBar: '[role="progressbar"]',
circularProgress: '[class*="CircularProgress-circle"]',
skeleton: '[data-test-id="skeleton"]',
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}]`;