Skip to content

Commit

Permalink
test: Fail on React DOM nesting errors
Browse files Browse the repository at this point in the history
Most errors were fixed recently. The remaining ones on the Storage page
conflict with the ongoing page redesign, and may well already be fixed
by it. Ignore them specifically for now.

This will prevent introducing new DOM nesting errors in the future.
  • Loading branch information
martinpitt committed Oct 25, 2023
1 parent 19a2a1c commit 94ae7a2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 0 additions & 2 deletions test/common/testlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -1701,8 +1701,6 @@ def login_and_go(self, path: Optional[str] = None, user: Optional[str] = None, h

# List of allowed console.error() messages during tests; these match substrings
default_allowed_console_errors = [
# HACK: Fix these ASAP, these are major bugs
"Warning: validateDOMNesting.*cannot appear as a",
# HACK: These should be fixed, but debugging these is not trivial, and the impact is very low
"Warning: .* setState.*on an unmounted component",
"Warning: Can't perform a React state update on an unmounted component",
Expand Down
3 changes: 3 additions & 0 deletions test/verify/check-storage-luks
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,9 @@ class TestStorageLuks(storagelib.StorageCase):
b.logout()
testlib.wait(lambda: m.execute("(loginctl list-users | grep admin) || true") == "")

# FIXME: race condition after unmounting; hard to investigate, re-check after storage redesign
self.allow_browser_errors("validateDOMNesting.*cannot appear as a child.*<tr> ul")

def testNoFsys(self):
m = self.machine
b = self.browser
Expand Down
6 changes: 6 additions & 0 deletions test/verify/check-storage-lvm2
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,9 @@ class TestStorageLvm2(storagelib.StorageCase):
b.wait_not_in_text("#devices", "vgroup1")
self.assertEqual(m.execute(f"grep {mount_point_thin} /etc/fstab || true"), "")

# FIXME: Grow/Shrink buttons are in a dd > div > dd without dl wrapper
self.allow_browser_errors("validateDOMNesting.*cannot appear as a descendant.*<dd> dd")

def testUnpartitionedSpace(self):
m = self.machine
b = self.browser
Expand Down Expand Up @@ -334,6 +337,9 @@ class TestStorageLvm2(storagelib.StorageCase):
self.content_row_wait_in_col(1, 1, "lvol0")
b.wait_not_in_text("#storage-detail", "snap0")

# FIXME: Grow/Shrink buttons are in a dd > div > dd without dl wrapper
self.allow_browser_errors("validateDOMNesting.*cannot appear as a descendant.*<dd> dd")


if __name__ == '__main__':
testlib.test_main()

0 comments on commit 94ae7a2

Please sign in to comment.