Front end apps on
vets-website should have unit tests and end-to-end tests. It is the application team's responsibility to create and maintain adequate automated test coverage for their applications.
Requires Local Build to Run
New code added to
vets-websiteshould be unit tested.
Updated code should pass or adjust existing unit tests.
Unit tests should cover at least 75% of code paths.
Unit Testing Guidelines
Applications should have end-to-end tests.
Applications that are built with the VA Forms Library should be tested with the form tester.
These tests validate multi-page applications with client-side routing. They are primarily used to assert that:
Client applications render their inputs
Client-side navigation occurs when the required fields are populated
See the Client Application Documentation site for conventions and tooling used for end to end tests.
Client applications must include accessibility tests in their end-to-end suite.
Pull requests without accessibility test coverage will not be accepted.
These tests should be run on all client-side routes and critical user interactions.
Use the Cypress custom command
cy.axeCheck()to run an accessibility check.
Tests written with the form tester will automatically test accessibility.
No explicit accessibility testing is required with such tests.
On every page, accessibility is checked once upon navigating to that page and again after filling out the page (or running its page hook) and expanding all expandable content.
Help and feedback
Create an issue ticket to suggest changes to this page