virt-manager/tests/uitests/test_about.py
Cole Robinson aa8572048b uitests: Add a fixture for passing in VMMDogtailApp
Reproducing what the custom unittest TestCase does. Convert
test_about as a demo

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-11 14:25:53 -04:00

25 lines
686 B
Python

# This work is licensed under the GNU GPLv2 or later.
# See the COPYING file in the top-level directory.
import datetime
from . import lib
###################################
# UI tests for the 'About' dialog #
###################################
def testAbout(app):
app.root.find("Help", "menu").click()
app.root.find("About", "menu item").click()
win = app.root.find_fuzzy("About", "dialog")
l = win.find_fuzzy("Copyright", "label")
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>")
lib.utils.check(lambda: win.visible is False)