Skip to content

Commit f28aec9

Browse files
authored
Merge pull request #531 from maykinmedia/flakiness/medebeoordelaar-is-klaar
⚗️ Trying to make firefox E2E tests pass more often
2 parents 0c2da26 + 493d557 commit f28aec9

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

backend/src/openarchiefbeheer/destruction/tests/e2e/features/test_feature_co_review.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,14 @@ async def test_scenario_co_reviewer_select_zaken_visible_to_reviewer(self):
6161
await self.when.user_fills_form_field(page, "Opmerking", "gh-497")
6262
await self.when.user_clicks_button(page, "Medebeoordeling afronden", 1)
6363

64+
# Make sure that the request for finishing the co-review is done
65+
await page.wait_for_url(f"{self.live_server_url}/destruction-lists")
66+
6467
# Log out.
6568
await self.when.user_logs_out(page)
6669

6770
# Reviewer should see review completed.
6871
await self.when.reviewer_logs_in(page)
6972
await self.when.user_clicks_button(page, "Destruction list to co-review")
70-
await self.then.page_should_contain_element_with_title(page, "Medebeoordelaar is klaar met beoordelen")
73+
# Making the timeout higher because this is dependent on the polling
74+
await self.then.page_should_contain_element_with_title(page, "Medebeoordelaar is klaar met beoordelen", timeout=10000)

backend/src/openarchiefbeheer/utils/tests/gherkin.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -523,9 +523,11 @@ async def page_should_contain_text(self, page, text, timeout=None):
523523
element = page.locator(f"text={text}")
524524
await expect(element.nth(0)).to_be_visible(timeout=timeout)
525525

526-
async def page_should_contain_element_with_title(self, page, title):
526+
async def page_should_contain_element_with_title(
527+
self, page, title, timeout=5000
528+
):
527529
element = page.get_by_title(title)
528-
await expect(element).to_be_visible()
530+
await expect(element).to_be_visible(timeout=timeout)
529531

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

0 commit comments

Comments
 (0)