Skip to content

Commit

Permalink
Merge pull request #531 from maykinmedia/flakiness/medebeoordelaar-is…
Browse files Browse the repository at this point in the history
…-klaar

⚗️ Trying to make firefox E2E tests pass more often
  • Loading branch information
SilviaAmAm authored Dec 5, 2024
2 parents 0c2da26 + 493d557 commit f28aec9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,14 @@ async def test_scenario_co_reviewer_select_zaken_visible_to_reviewer(self):
await self.when.user_fills_form_field(page, "Opmerking", "gh-497")
await self.when.user_clicks_button(page, "Medebeoordeling afronden", 1)

# Make sure that the request for finishing the co-review is done
await page.wait_for_url(f"{self.live_server_url}/destruction-lists")

# Log out.
await self.when.user_logs_out(page)

# Reviewer should see review completed.
await self.when.reviewer_logs_in(page)
await self.when.user_clicks_button(page, "Destruction list to co-review")
await self.then.page_should_contain_element_with_title(page, "Medebeoordelaar is klaar met beoordelen")
# Making the timeout higher because this is dependent on the polling
await self.then.page_should_contain_element_with_title(page, "Medebeoordelaar is klaar met beoordelen", timeout=10000)
6 changes: 4 additions & 2 deletions backend/src/openarchiefbeheer/utils/tests/gherkin.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,9 +523,11 @@ async def page_should_contain_text(self, page, text, timeout=None):
element = page.locator(f"text={text}")
await expect(element.nth(0)).to_be_visible(timeout=timeout)

async def page_should_contain_element_with_title(self, page, title):
async def page_should_contain_element_with_title(
self, page, title, timeout=5000
):
element = page.get_by_title(title)
await expect(element).to_be_visible()
await expect(element).to_be_visible(timeout=timeout)

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 f28aec9

Please sign in to comment.