mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
F OpenNebula/one#5901: Add cypress identifiers (#2783)
This commit is contained in:
parent
403f780497
commit
a1a19c7a63
@ -43,7 +43,11 @@ const VmGroupCard = ({ vmgroup, rootProps }) => {
|
||||
const { color: stateColor, name: stateName } = getState(LOCK)
|
||||
|
||||
return (
|
||||
<Box {...rootProps} sx={{ display: 'flex', p: 2, gap: 2 }}>
|
||||
<Box
|
||||
{...rootProps}
|
||||
sx={{ display: 'flex', p: 2, gap: 2 }}
|
||||
data-cy={`vmgroup-${ID}`}
|
||||
>
|
||||
<Box
|
||||
display="flex"
|
||||
sx={{
|
||||
|
@ -162,8 +162,12 @@ const RoleAffinityPanel = ({
|
||||
onChange={handleAffinityTypeChange}
|
||||
fullWidth
|
||||
>
|
||||
<ToggleButton value="AFFINED">Affined</ToggleButton>
|
||||
<ToggleButton value="ANTI_AFFINED">Anti-Affined</ToggleButton>
|
||||
<ToggleButton data-cy="policy-AFFINED" value="AFFINED">
|
||||
Affined
|
||||
</ToggleButton>
|
||||
<ToggleButton data-cy="policy-ANTI_AFFINED" value="ANTI_AFFINED">
|
||||
Anti-Affined
|
||||
</ToggleButton>
|
||||
</ToggleButtonGroup>
|
||||
<List
|
||||
dense
|
||||
@ -180,7 +184,8 @@ const RoleAffinityPanel = ({
|
||||
<ListItem
|
||||
key={role.id || index}
|
||||
button
|
||||
onClick={() => handleRoleSelect(role.NAME)}
|
||||
onClick={() => handleRoleSelect(role?.NAME)}
|
||||
data-cy={`role-${role?.NAME}`}
|
||||
sx={{
|
||||
py: 1,
|
||||
my: 0.5,
|
||||
@ -209,6 +214,7 @@ const RoleAffinityPanel = ({
|
||||
color="primary"
|
||||
startIcon={<Group />}
|
||||
disabled={selectedRoles.length < 2}
|
||||
data-cy="add-group"
|
||||
onClick={handleAddGroup}
|
||||
size="large"
|
||||
fullWidth
|
||||
|
@ -57,10 +57,10 @@ const RoleVmVmPanel = ({ roles, onChange, selectedRoleIndex }) => {
|
||||
<TextField
|
||||
label="Role Name"
|
||||
name="NAME"
|
||||
data-cy={`role-name-${selectedRoleIndex}`}
|
||||
value={roles?.[selectedRoleIndex]?.NAME ?? ''}
|
||||
onChange={handleInputChange}
|
||||
disabled={!roles?.[selectedRoleIndex]}
|
||||
inputProps={{ 'data-cy': `role-name-${selectedRoleIndex}` }}
|
||||
fullWidth
|
||||
/>
|
||||
</Box>
|
||||
@ -71,13 +71,26 @@ const RoleVmVmPanel = ({ roles, onChange, selectedRoleIndex }) => {
|
||||
<Select
|
||||
label="VM-VM Affinity"
|
||||
name="POLICY"
|
||||
data-cy="policy-selector"
|
||||
value={roles?.[selectedRoleIndex]?.POLICY ?? 'None'}
|
||||
disabled={!roles?.[selectedRoleIndex]}
|
||||
onChange={handleInputChange}
|
||||
>
|
||||
<MenuItem value="None">None</MenuItem>
|
||||
<MenuItem value="AFFINED">Affined</MenuItem>
|
||||
<MenuItem value="ANTI_AFFINED">Anti-Affined</MenuItem>
|
||||
<MenuItem data-cy="policy-selector-policy-None" value="None">
|
||||
None
|
||||
</MenuItem>
|
||||
<MenuItem
|
||||
data-cy="policy-selector-policy-AFFINED"
|
||||
value="AFFINED"
|
||||
>
|
||||
Affined
|
||||
</MenuItem>
|
||||
<MenuItem
|
||||
data-cy="policy-selector-policy-ANTI_AFFINED"
|
||||
value="ANTI_AFFINED"
|
||||
>
|
||||
Anti-Affined
|
||||
</MenuItem>
|
||||
</Select>
|
||||
</FormControl>
|
||||
</Box>
|
||||
|
Loading…
x
Reference in New Issue
Block a user