Skip to content

Commit

Permalink
Convert a single test case to use BS4 wrapper
Browse files Browse the repository at this point in the history
Touch up on the comments while we are at it.
  • Loading branch information
Stormheg committed Jul 27, 2023
1 parent 5c481d1 commit 466b578
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions wagtail/admin/tests/test_privacy.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,11 +364,14 @@ def test_explorer_private(self):
# Check the response
self.assertEqual(response.status_code, 200)

# Check the privacy indicator is private
self.assertContains(response, '<div class="" data-privacy-sidebar-private>')
self.assertContains(
response, '<div class="w-hidden" data-privacy-sidebar-public>'
)
# Check the private privacy indicator is visible
private_indicator = response.select_one("[data-privacy-sidebar-private]")
# There should not be any classes applied
self.assertEqual(private_indicator["class"], [])

# Privacy indicator should be hidden
public_indicator = response.select_one("[data-privacy-sidebar-public].w-hidden")
self.assertIsNotNone(public_indicator)

def test_explorer_private_child(self):
"""
Expand Down

0 comments on commit 466b578

Please sign in to comment.