Fix flaky E2E tests

This commit is contained in:
Sascha Ißbrücker
2024-03-24 22:07:11 +01:00
parent 9df80e01de
commit 77e1525402
2 changed files with 20 additions and 3 deletions

View File

@@ -38,6 +38,9 @@ class LinkdingE2ETestCase(LiveServerTestCase, BookmarkFactoryMixin):
def assertReloads(self, count: int):
self.assertEqual(self.num_loads, count)
def locate_bookmark_list(self):
return self.page.locator("ul[ld-bookmark-list]")
def locate_bookmark(self, title: str):
bookmark_tags = self.page.locator("li[ld-bookmark-item]")
return bookmark_tags.filter(has_text=title)