Skip to content

Commit

Permalink
Fix disabled VM action dropdown item tooltip
Browse files Browse the repository at this point in the history
When using `isDisabled` property in Buttons/Dropdowns/etc, their tooltips
are not getting triggered.
We need to use `isAriaDisabled` instead of `isDisabled` in this case.

See more info: patternfly/patternfly-react#5826
  • Loading branch information
KKoukiou committed Oct 9, 2024
1 parent 796a415 commit 7197f8c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/vm/vmActions.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ const VmActions = ({ vm, vms, onAddErrorNotification, isDetailsPage }) => {
<Tooltip key={`${id}-delete`} id={`${id}-delete-tooltip`} content={_("This VM is transient. Shut it down if you wish to delete it.")}>
<DropdownItem id={`${id}-delete`}
className='pf-m-danger'
isDisabled>
isAriaDisabled>
{_("Delete")}
</DropdownItem>
</Tooltip>
Expand Down
2 changes: 1 addition & 1 deletion test/check-machines-lifecycle
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ class TestMachinesLifecycle(machineslib.VirtualMachinesCase):
m.execute(f"virsh undefine {name}")
b.wait_visible(f"tr[data-row-id=vm-{name}-system][data-vm-transient=true]")
b.click(f"#vm-{name}-system-action-kebab")
b.wait_visible(f".pf-m-disabled #vm-{name}-system-delete") # delete buton should be disabled
b.wait_visible(f".pf-m-aria-disabled #vm-{name}-system-delete") # delete buton should be disabled
b.click(f"#vm-{name}-system-forceOff")
b.wait_visible(f"#vm-{name}-system-confirm-action-modal")
b.click(f".pf-v5-c-modal-box__footer #vm-{name}-system-forceOff")
Expand Down

0 comments on commit 7197f8c

Please sign in to comment.