e2e tests
acouch opened this issue · comments
e2e tests are a useful tool for testing the end result of UI interactions that are missed by unit tests. This issue is to identify a preferred e2e testing suite or pros and cons for options for teams using this tool, and add some basic tests to get teams started.
Describe the solution you'd like
It looks like two options are:
Playwright
A number of teams use Playwright
Pros
- High adoption rate across industry
- Has adoption across Nava for potential support
- Has a UI to be able to walk through tests in the browser for troubleshooting
- Multiple browser support
Cons
- Written in JS which some Rails teams might not have support for
- Might not scale to large tests suites (had this issue w/ Cypress personally, maybe not an issue w/ Playwright)
Capybara
After brief googling, it looks like Capybara is a popular solution for Rails projects.
Pros
- It is written in rails so it might be easier / faster for some teams to implement
- can switch backends for faster tests
- supports async javascript
Cons
I don't know having never used it
Additional context
If the group wants to pick an option I'd be happy to implement but will not have capacity once grants.gov starts up again.
Priority
None
@acouch What good timing! We just merged in playwright to handle end-to-end testing in the infra template. We decided that end-to-end testing is something we want for most projects and they are largely application-stack agnostic, so we've put it in the infra template. I'm going to make this issue as closed, but please feel free to re-open if you disagree or have alternate suggestions!