Skip to content

Commit

Permalink
Merge pull request #58 from KKoukiou/logo-not-loading-workaround
Browse files Browse the repository at this point in the history
tests: temporarily ignore in pixel tests the logo
  • Loading branch information
KKoukiou authored Nov 22, 2023
2 parents 039c723 + 84e8b4f commit d356db3
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 9 deletions.
2 changes: 2 additions & 0 deletions test/anacondalib.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@

from storage import Storage

pixel_tests_ignore = [".logo", "#betanag-icon"]


class VirtInstallMachineCase(MachineCase):
efi = False
Expand Down
2 changes: 1 addition & 1 deletion test/check-language
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class TestLanguage(anacondalib.VirtInstallMachineCase):
"language-step-basic",
# HACK pf-v5-c-menu__item-text is ignored because some of our CI infrastructure is
# missing CJK and Cyrillic fonts..
ignore=["#betanag-icon", ".pf-v5-c-menu__item-text"],
ignore=anacondalib.pixel_tests_ignore + [".pf-v5-c-menu__item-text"],
)

b.wait_in_text("h2 + h3", "Wählen Sie eine Sprache aus")
Expand Down
2 changes: 1 addition & 1 deletion test/check-review
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class TestReview(anacondalib.VirtInstallMachineCase):
b.assert_pixels(
"#app",
"review-step-basic",
ignore=["#betanag-icon"],
ignore=anacondalib.pixel_tests_ignore,
)

def testNoConfirmation(self):
Expand Down
10 changes: 6 additions & 4 deletions test/check-storage
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class TestStorage(anacondalib.VirtInstallMachineCase, StorageHelpers):
b.assert_pixels(
"#app",
"storage-step-basic",
ignore=["#betanag-icon"],
ignore=anacondalib.pixel_tests_ignore,
)

# This attaches a disk to the running VM
Expand Down Expand Up @@ -100,7 +100,7 @@ class TestStorage(anacondalib.VirtInstallMachineCase, StorageHelpers):
b.assert_pixels(
"#app",
"storage-step-basic-live",
ignore=["#betanag-icon"],
ignore=anacondalib.pixel_tests_ignore,
)

s.modify_storage()
Expand Down Expand Up @@ -151,7 +151,7 @@ class TestStorage(anacondalib.VirtInstallMachineCase, StorageHelpers):
b.assert_pixels(
"#app",
"storage-step-encrypt",
ignore=["#betanag-icon"],
ignore=anacondalib.pixel_tests_ignore,
)

s.check_encryption_selected(False)
Expand All @@ -162,7 +162,7 @@ class TestStorage(anacondalib.VirtInstallMachineCase, StorageHelpers):
b.assert_pixels(
"#app",
"storage-step-password",
ignore=["#betanag-icon"],
ignore=anacondalib.pixel_tests_ignore,
)

# No password set
Expand Down Expand Up @@ -411,6 +411,7 @@ class TestStorageMountPoints(anacondalib.VirtInstallMachineCase, StorageHelpers)
b.assert_pixels(
"#app",
"mount-point-mapping-table",
ignore=anacondalib.pixel_tests_ignore,
)

self.addCleanup(lambda: dbus_reset_users(self.machine))
Expand Down Expand Up @@ -554,6 +555,7 @@ class TestStorageMountPoints(anacondalib.VirtInstallMachineCase, StorageHelpers)
b.assert_pixels(
"#app",
"review-multiple-disks",
ignore=anacondalib.pixel_tests_ignore,
)

@nondestructive
Expand Down
2 changes: 1 addition & 1 deletion test/check-users
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class TestUsers(anacondalib.VirtInstallMachineCase):
b.assert_pixels(
"#app",
"users-step-basic",
ignore=["#betanag-icon"],
ignore=anacondalib.pixel_tests_ignore,
)
i.reach(i.steps.REVIEW)

Expand Down
2 changes: 0 additions & 2 deletions test/helpers/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,6 @@ def open(self, step=None):
step = self.steps._steps_jump[step][0]
self.browser.open(f"/cockpit/@localhost/anaconda-webui/index.html#/{step}")
self.wait_current_page(step)
# Ensure that the logo is visible before proceeding as pixel tests get racy otherwise
self.browser.wait_js_cond("document.querySelector('.logo').complete && document.querySelector('.logo').naturalHeight !== 0")

def click_step_on_sidebar(self, step=None):
step = step or self.get_current_page()
Expand Down

0 comments on commit d356db3

Please sign in to comment.