Skip to content

Commit

Permalink
✅ - test: attempt to fix the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
svenvandescheur committed Oct 21, 2024
1 parent 1e58dc8 commit 8f15fa4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,7 @@ async def test_scenario_reviewer_cannot_create_list(self):

await self.when.reviewer_logs_in(page)
await self.then.path_should_be(page, "/destruction-lists")

await self.when.user_clicks_button(page, "Vernietigingslijst opstellen")
await self.then.path_should_be(page, "/login?next=/destruction-lists/create")
await self.then.not_.page_should_contain_text(page, "Vernietigingslijst opstellen")

async def test_scenario_archivist_cannot_create_list(self):
async with browser_page() as page:
Expand All @@ -73,9 +71,7 @@ async def test_scenario_archivist_cannot_create_list(self):

await self.when.archivist_logs_in(page)
await self.then.path_should_be(page, "/destruction-lists")

await self.when.user_clicks_button(page, "Vernietigingslijst opstellen")
await self.then.path_should_be(page, "/login?next=/destruction-lists/create")
await self.then.not_.page_should_contain_text(page, "Vernietigingslijst opstellen")

async def test_zaaktype_filters_on_create_page(self):

Expand Down
2 changes: 1 addition & 1 deletion backend/src/openarchiefbeheer/utils/tests/gherkin.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ def get_number_of_items():

async def page_should_contain_text(self, page, text):
locator = page.get_by_text(text).nth(0)
await expect(locator).to_be_attached()
await expect(locator).to_be_visible()

async def path_should_be(self, page, path):
await self.url_should_be(page, self.testcase.live_server_url + path)
Expand Down

0 comments on commit 8f15fa4

Please sign in to comment.