2021-03-26 09:33:35 +00:00
|
|
|
export const SHARED_ELEMENTS = {
|
2021-04-12 15:22:12 +00:00
|
|
|
header: "[data-test-id='page-header']",
|
2021-05-16 11:38:53 +00:00
|
|
|
progressBar: '[role="progressbar"]',
|
2021-07-12 13:35:26 +00:00
|
|
|
circularProgress: '[class*="CircularProgress-circle"]',
|
2021-09-10 08:59:46 +00:00
|
|
|
autocompleteCircle: '[class*="arrowInnerContainer"]',
|
2023-03-24 08:03:48 +00:00
|
|
|
dataGridTable: "[data-testid='data-grid-canvas']",
|
2021-05-31 07:50:31 +00:00
|
|
|
skeleton: '[data-test-id="skeleton"]',
|
2021-07-05 10:21:35 +00:00
|
|
|
table: 'table[class*="Table"]',
|
2022-02-11 11:28:55 +00:00
|
|
|
tableRow: '[data-test-id*="id"], [class*="MuiTableRow"]',
|
2023-01-03 08:18:56 +00:00
|
|
|
notificationSuccess:
|
|
|
|
'[data-test-id="notification"][data-test-type="success"]',
|
|
|
|
notificationFailure: '[data-test-id="notification"][data-test-type="error"]',
|
2021-07-15 12:31:05 +00:00
|
|
|
dialog: '[role="dialog"]',
|
2022-02-11 11:28:55 +00:00
|
|
|
searchInput: '[data-test-id="search-input"]',
|
|
|
|
selectOption: '[data-test-id*="select-field-option"]',
|
2021-10-14 10:47:41 +00:00
|
|
|
svgImage: "svg",
|
|
|
|
fileInput: 'input[type="file"]',
|
|
|
|
urlInput: 'input[type="url"]',
|
2021-07-12 08:50:50 +00:00
|
|
|
richTextEditor: {
|
2021-09-02 10:36:46 +00:00
|
|
|
loader: '[class*="codex-editor__loader"]',
|
2022-10-21 08:14:40 +00:00
|
|
|
empty: '[class*="codex-editor--empty"]',
|
2021-08-18 11:58:07 +00:00
|
|
|
},
|
2021-12-22 11:27:28 +00:00
|
|
|
contentEditable: '[contenteditable="true"]',
|
2021-08-18 11:58:07 +00:00
|
|
|
filters: {
|
2022-02-11 11:28:55 +00:00
|
|
|
filterGroupActivateCheckbox: '[data-test-id*="filter-group-active"]',
|
2022-10-21 08:14:40 +00:00
|
|
|
filterRow: '[data-test-id*="channel-availability-item"]',
|
2022-02-07 09:30:52 +00:00
|
|
|
},
|
2022-10-21 08:14:40 +00:00
|
|
|
warningDialog: '[data-test-id="warning-dialog"]',
|
|
|
|
pageHeader: "[data-test-id='page-header']",
|
2022-10-27 09:27:34 +00:00
|
|
|
multiAutocomplete: {
|
|
|
|
selectedOptions: '[id*="selected-option-"]',
|
|
|
|
},
|
2021-03-26 09:33:35 +00:00
|
|
|
};
|
2021-07-05 13:05:13 +00:00
|
|
|
|
2021-07-12 08:50:50 +00:00
|
|
|
export const selectorWithDataValue = value => `[data-value="${value}"]`;
|
|
|
|
|
2021-07-05 13:05:13 +00:00
|
|
|
export const getElementByDataTestId = dataTestId =>
|
2022-02-11 11:28:55 +00:00
|
|
|
`[data-test-id*=${dataTestId}]`;
|