test: Add two pixel tests
This commit is contained in:
parent
222f588056
commit
01de9c25c4
2 changed files with 7 additions and 2 deletions
|
|
@ -20,16 +20,19 @@ class TestApplication(testlib.MachineCase):
|
||||||
b = self.browser
|
b = self.browser
|
||||||
m = self.machine
|
m = self.machine
|
||||||
|
|
||||||
|
hostname = "starterbox"
|
||||||
|
self.write_file("/etc/hostname", hostname)
|
||||||
|
|
||||||
self.login_and_go("/starter-kit")
|
self.login_and_go("/starter-kit")
|
||||||
# verify expected heading
|
# verify expected heading
|
||||||
b.wait_text(".pf-c-card__title", "Starter Kit")
|
b.wait_text(".pf-c-card__title", "Starter Kit")
|
||||||
|
|
||||||
# verify expected host name
|
# verify expected host name
|
||||||
hostname = m.execute("hostname").strip()
|
|
||||||
b.wait_in_text(".pf-c-alert__title", "Running on " + hostname)
|
b.wait_in_text(".pf-c-alert__title", "Running on " + hostname)
|
||||||
|
b.assert_pixels(".pf-c-card__body", "hostname")
|
||||||
|
|
||||||
# change current hostname
|
# change current hostname
|
||||||
self.write_file("/etc/hostname", "new-" + hostname)
|
m.write("/etc/hostname", "new-" + hostname)
|
||||||
# verify new hostname name
|
# verify new hostname name
|
||||||
b.wait_in_text(".pf-c-alert__title", "Running on new-" + hostname)
|
b.wait_in_text(".pf-c-alert__title", "Running on new-" + hostname)
|
||||||
|
|
||||||
|
|
@ -60,6 +63,7 @@ class TestApplication(testlib.MachineCase):
|
||||||
b.enter_page("/starter-kit")
|
b.enter_page("/starter-kit")
|
||||||
# page label (from js) should be translated
|
# page label (from js) should be translated
|
||||||
b.wait_in_text(".pf-c-alert__title", "Läuft auf")
|
b.wait_in_text(".pf-c-alert__title", "Läuft auf")
|
||||||
|
b.assert_pixels(".pf-c-card__body", "gastgebername")
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
|
||||||
1
test/reference
Submodule
1
test/reference
Submodule
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 5ab8003236a9e6c86e271fc0d7423110ef14bf4f
|
||||||
Loading…
Add table
Add a link
Reference in a new issue