Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve integration test reliability #7131

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mtaylorgds
Copy link
Contributor

@mtaylorgds mtaylorgds commented Mar 21, 2025

Following a recent release of Chrome/Chromium, integration tests have become less reliable. It seems like when a page change occurs (for example, when visiting a URL, or after submitting a form) the new page is less likely to have loaded by the time the next line in the test occurs than was previously the case.

The Capybara find method waits (with a timeout) for the specified element, so this commit updates all of the integration tests to add an appropriate find call after a page transition (or, in the case of no page transition but a validation message being expected, a find for that error message).

@govuk-ci govuk-ci temporarily deployed to smart-answers-pr-7131 March 21, 2025 10:22 Inactive
@mtaylorgds mtaylorgds force-pushed the add-waits-to-integration-tests branch from 16d7824 to c20f4b7 Compare March 21, 2025 10:26
@govuk-ci govuk-ci temporarily deployed to smart-answers-pr-7131 March 21, 2025 10:27 Inactive
Following a recent release of Chrome/Chromium, integration tests have
 become less reliable. It seems like when a page change occurs (for
 example, when visiting a URL, or after submitting a form) the new page
 is less likely to have loaded by the time the next line in the test
 occurs than was previously the case.

The Capybara `find` method waits (with a timeout) for the specified
 element, so this commit updates all of the integration tests to add an
 appropriate `find` call after a page transition (or, in the case of no
 page transition but a validation message being expected, a `find` for
 that error message).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants