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
Refactored form tester page hooks to support post-hooks #13740
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 🚀
Could I get reviews from the following? 🙏
It should be quick; the changes to your tests are minimal. |
|
||
// Check the privacy agreement box if it exists. | ||
if (!pathname.endsWith('/confirmation')) { | ||
cy.location('pathname', NO_LOG_OPTION) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's possible the submission timeout could still happen, but it's rare. Going to keep on eye on tests and re-introduce the extended timeout if it reappears.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Description
Background
Previously, page hooks would cause the secondary aXe check on pages to run at the wrong time.
Since page hooks needed to explicitly click the "Continue" button to move to the next page, and that secondary aXe check was set to automatically run after page hooks, the check would incorrectly run on the next page.
Solution
This refactor fixes that bug, but also reduces the amount of boilerplate needed in page hooks and allows for a way to override the default behavior.
afterHook
helper function that takes a function and runs that instead of the default behavior of clicking "Continue".Testing done
Tests are still passing. Observed the Cypress test runner log to verify that aXe checks are happening in the right place.
Acceptance criteria
Definition of done