From 71e210a004fd039819da50f4e0de47e98093fe41 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 9 Nov 2023 11:35:34 +0100 Subject: [PATCH] test: Fix TestMachinesHostDevs race 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 --- test/check-machines-hostdevs | 1 + 1 file changed, 1 insertion(+) diff --git a/test/check-machines-hostdevs b/test/check-machines-hostdevs index 41313beb7..62e1565f7 100755 --- a/test/check-machines-hostdevs +++ b/test/check-machines-hostdevs @@ -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