tests: uitests: Add a NewVM failure test

Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
Cole Robinson 2020-02-03 06:17:36 -05:00
parent b24892448c
commit 5c64d35756

View File

@ -420,7 +420,7 @@ class NewVM(uiutils.UITestCase):
self.assertFalse(newvm.showing)
def testNewXenPV(self):
def testNewVMXenPV(self):
"""
Test the create wizard with a fake xen PV install
"""
@ -442,6 +442,27 @@ class NewVM(uiutils.UITestCase):
newvm.find_fuzzy("Finish", "button").click()
def testNewVMInstallFail(self):
newvm = self._open_create_wizard()
newvm.find_fuzzy("Manual", "radio").click()
self.forward(newvm)
newvm.find("oslist-entry").text = "generic"
newvm.find("oslist-popover").find_fuzzy("generic").click()
self.forward(newvm)
self.forward(newvm)
self.forward(newvm)
# '/' in name will trigger libvirt error
newvm.find_fuzzy("Name", "text").text = "test/bad"
newvm.find_fuzzy("Finish", "button").click()
alert = self.app.root.find("vmm dialog", "alert")
alert.find_fuzzy("Unable to complete install")
alert.find_fuzzy("Close", "button").click()
# Closing dialog should trigger storage cleanup path
newvm.find_fuzzy("Cancel", "button").click()
def testNewVMCustomizeXMLEdit(self):
"""
Test new VM with raw XML editing via customize wizard