Skip to content

Commit

Permalink
test: Fix TestMachinesHostDevs race
Browse files Browse the repository at this point in the history
Wait for the "Remove host device from VM?" dialog to disappear before
opening the "Add host device" dialog in the next test step. Otherwise it
often happend that the latter dialog just got opened, while
deleteResource.jsx' dialog shutdown handler called `Dialogs.close()`,
which would then close the new instead of the old dialog.

This is purely a test race, as a human user/browser won't allow
interaction with the main page as long as the modal dialog is still
open. But our CDP driver allows that.

Fixes #1292
  • Loading branch information
martinpitt committed Nov 9, 2023
1 parent 7cd906d commit 71e210a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/check-machines-hostdevs
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ class TestMachinesHostDevs(VirtualMachinesCase):
b.wait_in_text("#delete-resource-modal-vendor", self._vendor)

b.click('.pf-v5-c-modal-box__footer button:contains("Remove")')
b.wait_not_present("#delete-resource-modal")
b.wait_not_present(f"#vm-subVmTest1-hostdev-{self.vm_dev_id}-product")

# Check the error if selecting no devices when the VM is running
Expand Down

0 comments on commit 71e210a

Please sign in to comment.