uitests: Finish uiutil.py coverage

Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
Cole Robinson 2020-08-23 13:48:59 -04:00
parent fea7f3e262
commit d111df4e62
4 changed files with 27 additions and 3 deletions

View File

@ -0,0 +1,23 @@
[org/virt-manager/virt-manager/vmlist-fields]
disk-usage=true
network-traffic=true
host-cpu-usage=true
memory-usage=true
[org/virt-manager/virt-manager/connections]
uris=['test:///default', 'foo:///']
autoconnect=['test:///default']
[org/virt-manager/virt-manager]
manager-window-width=550
manager-window-height=550
[org/virt-manager/virt-manager/new-vm]
graphics-type='system'
[org/virt-manager/virt-manager/stats]
enable-disk-poll=true
enable-net-poll=true
enable-memory-poll=true
update-interval=1

View File

@ -54,9 +54,11 @@ class Details(uiutils.UITestCase):
self._testSmokeTest(None)
def testDetailsHardwareSmokeTestAlternate(self):
self.app.open(keyfile="allstats.ini")
self._testSmokeTest("test alternate devs title")
def _testRename(self, origname, newname):
# Enable all stats prefs to hit some extra code
win = self._open_details_window(origname)
# Ensure the Overview page is the first selected

View File

@ -94,9 +94,7 @@ class VMMPrefs(uiutils.UITestCase):
"""
Preload some keyfile settings and verify they work as expected
"""
import os
keyfile = os.path.dirname(__file__) + "/data/keyfile/defaultconn.ini"
self.app.open(use_uri=False, keyfile=keyfile)
self.app.open(use_uri=False, keyfile="defaultconn.ini")
managerwin = self.app.topwin
# test:///default should be connected

View File

@ -479,6 +479,7 @@ class VMMDogtailApp(object):
if keyfile:
import atexit
import tempfile
keyfile = os.path.dirname(__file__) + "/data/keyfile/" + keyfile
tempname = tempfile.mktemp(prefix="virtmanager-uitests-keyfile")
open(tempname, "w").write(open(keyfile).read())
atexit.register(lambda: os.unlink(tempname))