forked from redhat-developer/rhdh-e2e-test-utils
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathglobal-obj.ts
More file actions
26 lines (25 loc) · 1.18 KB
/
Copy pathglobal-obj.ts
File metadata and controls
26 lines (25 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
export const WAIT_OBJECTS = {
MuiLinearProgress: 'div[class*="MuiLinearProgress-root"]',
MuiCircularProgress: '[class*="MuiCircularProgress-root"]',
};
export const UI_HELPER_ELEMENTS = {
MuiToggleButtonLabel: 'span[class^="MuiToggleButton-label"]',
MuiBoxLabel: 'div[class*="MuiBox-root"] label',
MuiTableHead: 'th[class*="MuiTableCell-root"]',
MuiTableCell: 'td[class*="MuiTableCell-root"]',
MuiTableRow: 'tr[class*="MuiTableRow-root"]',
MuiTypographyColorPrimary: ".MuiTypography-colorPrimary",
MuiSwitchColorPrimary: ".MuiSwitch-colorPrimary",
MuiButtonTextPrimary: ".MuiButton-textPrimary",
MuiCard: (cardHeading: string) =>
`//div[contains(@class,'MuiCardHeader-root') and descendant::*[text()='${cardHeading}']]/..`,
MuiCardRoot: (cardText: string) =>
`//div[contains(@class,'MuiCard-root')][descendant::text()[contains(., '${cardText}')]]`,
MuiTable: "table.MuiTable-root",
MuiCardHeader: 'div[class*="MuiCardHeader-root"]',
MuiInputBase: 'div[class*="MuiInputBase-root"]',
MuiTypography: 'span[class*="MuiTypography-root"]',
MuiAlert: 'div[class*="MuiAlert-message"]',
tabs: '[role="tab"]',
rowByText: (text: string) => `tr:has(:text-is("${text}"))`,
};