virt-manager/tests/uitests/about.py

27 lines
705 B
Python
Raw Normal View History

2018-01-09 22:48:42 +03:00
import datetime
from tests.uitests import utils as uiutils
2018-01-09 22:49:27 +03:00
class VMMAbout(uiutils.UITestCase):
2018-01-09 22:48:42 +03:00
"""
2018-01-09 22:49:27 +03:00
UI tests for the 'About' dialog
2018-01-09 22:48:42 +03:00
"""
##############
# Test cases #
##############
def testAbout(self):
2018-01-19 18:51:33 +03:00
self.app.root.find("Help", "menu").click()
self.app.root.find("About", "menu item").click()
win = self.app.root.find_fuzzy("About", "dialog")
l = win.find_fuzzy("Copyright", "label")
2018-01-09 22:48:42 +03:00
curyear = datetime.datetime.today().strftime("%Y")
if curyear not in l.text:
print("Current year=%s not in about.ui dialog!" % curyear)
win.keyCombo("<ESC>")
uiutils.check_in_loop(lambda: win.visible is False)