Skip to content

Commit

Permalink
Update expected tooltip HTML in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gasman authored and laymonage committed Jan 30, 2024
1 parent 59cf559 commit 3b3e20a
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions wagtail_modeladmin/test/tests/test_simple_modeladmin.py
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,14 @@ def test_simple(self):
self.assertContains(response, "The Lord of the Rings")

# "Last updated" timestamp should be present
self.assertContains(response, 'data-tippy-content="Sept. 30, 2021, 10:01 a.m."')
if WAGTAIL_VERSION >= (6, 0):
self.assertContains(
response, 'data-w-tooltip-content-value="Sept. 30, 2021, 10:01 a.m."'
)
else:
self.assertContains(
response, 'data-tippy-content="Sept. 30, 2021, 10:01 a.m."'
)
# History link should be present
self.assertContains(response, 'href="/admin/modeladmintest/book/history/1/"')

Expand Down Expand Up @@ -1101,10 +1108,16 @@ def test_simple(self):
response = self.client.get("/admin/modeladmintest/book/history/1/")
self.assertEqual(response.status_code, 200)
self.assertContains(response, "<td>Created</td>", html=True)
self.assertContains(
response,
'data-tippy-content="Sept. 30, 2021, 10:01 a.m."',
)
if WAGTAIL_VERSION >= (6, 0):
self.assertContains(
response,
'data-w-tooltip-content-value="Sept. 30, 2021, 10:01 a.m."',
)
else:
self.assertContains(
response,
'data-tippy-content="Sept. 30, 2021, 10:01 a.m."',
)


class TestQuoting(WagtailTestUtils, TestCase):
Expand Down

0 comments on commit 3b3e20a

Please sign in to comment.