From f873b444eb070118fc549163909f14f423e68c79 Mon Sep 17 00:00:00 2001 From: "Storm B. Heg" Date: Thu, 20 Jul 2023 17:34:28 +0200 Subject: [PATCH] Convert a single test case to use BS4 wrapper Touch up on the comments while we are at it. --- wagtail/admin/tests/test_privacy.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/wagtail/admin/tests/test_privacy.py b/wagtail/admin/tests/test_privacy.py index e6bb5b63e52b..ac697e19a712 100644 --- a/wagtail/admin/tests/test_privacy.py +++ b/wagtail/admin/tests/test_privacy.py @@ -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, '
') - self.assertContains( - response, '
' - ) + # 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): """