1
0
mirror of https://github.com/virt-manager/virt-manager.git synced 2025-03-11 16:58:31 +03:00

uitests: try to make flakey createvm test more robust

Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
Cole Robinson 2020-08-25 11:03:12 -04:00
parent 1684049fa3
commit d140596ce9

@ -360,10 +360,9 @@ class NewVM(uiutils.UITestCase):
TCG = newvm.find_fuzzy("TCG", "menu item") TCG = newvm.find_fuzzy("TCG", "menu item")
uiutils.check(lambda: KVM.focused) uiutils.check(lambda: KVM.focused)
uiutils.check(lambda: TCG.showing) uiutils.check(lambda: TCG.showing)
self.pressKey("Esc")
# Validate some initial defaults # Validate some initial defaults
newvm.find_fuzzy("Import", "radio").click()
newvm.find_fuzzy("Import", "radio").click()
local = newvm.find_fuzzy("Local", "radio") local = newvm.find_fuzzy("Local", "radio")
uiutils.check(lambda: not local.sensitive) uiutils.check(lambda: not local.sensitive)
newvm.find_fuzzy("Machine Type", "combo").click() newvm.find_fuzzy("Machine Type", "combo").click()
@ -372,11 +371,20 @@ class NewVM(uiutils.UITestCase):
newvm.find_fuzzy("Machine Type", "combo").click() newvm.find_fuzzy("Machine Type", "combo").click()
self.sleep(.2) self.sleep(.2)
newvm.find("virt", "menu item").click() newvm.find("virt", "menu item").click()
self.sleep(.5)
importradio = newvm.find("Import", "radio")
importradio.click()
uiutils.check(lambda: importradio.checked)
self.forward(newvm) self.forward(newvm)
# Set the import media details # Set the import media details
newvm.find_fuzzy(None, importentry = newvm.find_fuzzy(None, "text", "existing storage")
"text", "existing storage").text = "/dev/default-pool/default-vol" # For some reason 'Import' doesn't take effect sometimes
# And we end up in 'Manual' install mode, this will
# make it explicit when it fails
uiutils.check(lambda: importentry.onscreen)
importentry.text = "/dev/default-pool/default-vol"
# Make sure the info box shows up # Make sure the info box shows up
newvm.find("Kernel/initrd settings can be configured") newvm.find("Kernel/initrd settings can be configured")
newvm.find("oslist-entry").text = "generic" newvm.find("oslist-entry").text = "generic"