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

Refactor Cypress helper #1667

Merged
merged 1 commit into from
Aug 16, 2023
Merged

Conversation

machikoyasuda
Copy link
Member

closes #1443

This code, a selectCourtesyCard test helper method, was previously quite brittle, and would break if any new Eligibility Verifiers were added - b/c the code was going by order of verifiers -- which can change -- and not actually looking for the radio input label that says "Courtesy Cards." This method broke when we added the Veterans verifier: https://github.com/cal-itp/benefits/pull/1436/files#diff-d8c366d9dffb4c84efb0c81d20aae1435d1a10f57a019a62d8131839878b194e

This PR refactors this method by having Cypress actually look for elements to click by copy, so it will not break when we add new verifiers.

@machikoyasuda machikoyasuda self-assigned this Aug 16, 2023
@machikoyasuda machikoyasuda requested a review from a team as a code owner August 16, 2023 17:49
@github-actions github-actions bot added the tests Related to automated testing (unit, UI, integration, etc.) label Aug 16, 2023
@machikoyasuda machikoyasuda merged commit c82b88b into dev Aug 16, 2023
14 checks passed
@machikoyasuda machikoyasuda deleted the refactor/1443-cypress--cc-select branch August 16, 2023 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Related to automated testing (unit, UI, integration, etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor cypress helper for Courtesy Cards
2 participants