saleor-dashboard/cypress/elements/shared/sharedElements.js
Karolina Rakoczy 5bee739872
Saleor 4581 tests for products images (#1450)
* tests for images on product list

* image on product details page should be displayed

* test for upload image

* fix collection utils import

* fix creating test data

* update jest
2021-10-14 13:47:41 +03:00

29 lines
1 KiB
JavaScript

export const SHARED_ELEMENTS = {
header: "[data-test-id='page-header']",
progressBar: '[role="progressbar"]',
circularProgress: '[class*="CircularProgress-circle"]',
autocompleteCircle: '[class*="arrowInnerContainer"]',
skeleton: '[data-test-id="skeleton"]',
table: 'table[class*="Table"]',
tableRow: '[data-test="id"], [class*="MuiTableRow"]',
notificationSuccess: '[data-test="notification"][data-test-type="success"]',
dialog: '[role="dialog"]',
searchInput: '[data-test-id="searchInput"]',
selectOption: '[data-test="selectFieldOption"]',
svgImage: "svg",
fileInput: 'input[type="file"]',
urlInput: 'input[type="url"]',
richTextEditor: {
loader: '[class*="codex-editor__loader"]',
empty: '[class*="codex-editor--empty"]'
},
filters: {
filterGroupActivateCheckbox: '[data-test="filterGroupActive"]',
filterRow: '[data-test="channel-availability-item"]'
}
};
export const selectorWithDataValue = value => `[data-value="${value}"]`;
export const getElementByDataTestId = dataTestId =>
`[data-test-id=${dataTestId}]`;