saleor-dashboard/cypress/elements/shared/sharedElements.js
Karolina Rakoczy 10fb086d6e
Add tests for product types for 3.1 (#1806)
* tests for product types for 3.1

* updated stories

* chage test cases names for product types

* add test for setting attribute as variant selection in product type

* add test for setting attribute as variant selection in product type

* split product types spec file

* uncomment purchase with product types test

* Update cypress/integration/configuration/productTypes/attributesInProduductTypes.js

Co-authored-by: Ewa Czerniak <ewa.czerniak@saleor.io>

Co-authored-by: Ewa Czerniak <ewa.czerniak@saleor.io>
2022-02-07 10:30:52 +01:00

31 lines
1.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"]'
},
contentEditable: '[contenteditable="true"]',
filters: {
filterGroupActivateCheckbox: '[data-test="filterGroupActive"]',
filterRow: '[data-test="channel-availability-item"]'
},
warningDialog: '[data-test-id="warning-dialog"]'
};
export const selectorWithDataValue = value => `[data-value="${value}"]`;
export const getElementByDataTestId = dataTestId =>
`[data-test-id=${dataTestId}]`;