Skip to content

Commit

Permalink
fix layout tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lenadax committed Sep 9, 2024
1 parent 64d39a2 commit 202f674
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/cone/app/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def test_suite(): # pragma: no cover
suite.addTest(unittest.findTestCases(test_browser_copysupport))
suite.addTest(unittest.findTestCases(test_browser_exception))
suite.addTest(unittest.findTestCases(test_browser_form))
# suite.addTest(unittest.findTestCases(test_browser_layout)) # XXX: link with id 3 not there
suite.addTest(unittest.findTestCases(test_browser_layout))
suite.addTest(unittest.findTestCases(test_browser_login))
suite.addTest(unittest.findTestCases(test_browser_order))
# suite.addTest(unittest.findTestCases(test_browser_referencebrowser)) # XXX: extraction errors
Expand Down
11 changes: 5 additions & 6 deletions src/cone/app/tests/test_browser_layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,7 @@ def test_navtree(self):
self.assertTrue(res.find('ajax:action="navtree:#navtree:replace"') != -1)
self.assertTrue(res.find('class="contextsensitiv nav-item mb-1 text-white"') != -1)

# Node's which are in navtree
root = get_root()
# Nodes which are in navtree
root.properties.in_navtree = True
root['1'] = BaseNode()
root['1'].properties.in_navtree = True
Expand Down Expand Up @@ -327,7 +326,7 @@ class InvisibleNavNode(BaseNode):
with self.layer.authenticated('manager'):
res = render_tile(root, request, 'navtree')
self.checkOutput("""
...<li class="state-initial navtreelevel_1">
...<li class="state-initial list-group-item ps-4 p-0 border-0">
<a href="http://example.com/4"...
""", res)

Expand All @@ -337,14 +336,14 @@ class InvisibleNavNode(BaseNode):
with self.layer.authenticated('manager'):
res = render_tile(root, request, 'navtree')
self.checkOutput("""
...<li class="nav-item navtreelevel_1">
...<li class="active list-group-item ps-4 p-0 border-0">
<a href="http://example.com/1"...
""", res)

with self.layer.authenticated('manager'):
res = render_tile(root['1'], request, 'navtree')
self.checkOutput("""
...<li class="nav-item active navtreelevel_1">
...<li class="active list-group-item ps-4 p-0 border-0">
<a href="http://example.com/1"...
""", res)

Expand Down Expand Up @@ -387,7 +386,7 @@ class InvisibleNavNode(BaseNode):
with self.layer.authenticated('manager'):
res = render_tile(root['1']['11'], request, 'navtree')
self.checkOutput("""
...<li class="nav-item active navtreelevel_1">
...<li class="active list-group-item ps-4 p-0 border-0">
<a href="http://example.com/1/11"...
""", res)

Expand Down

0 comments on commit 202f674

Please sign in to comment.