The tests are in cypress/integration folder
- feeds-spec.js shows how to check the favorite articles feed and the global feed
- follow-user-spec.js shows how to create two users and check if one user can follow the other
- login-spec.js checks if the user can log in via UI and via API
- new-post-spec.js verifies that a new article can be published and updated
- profile-spec.js lets the user edit their profile
- register-spec.js tests if a new user can register
- tags-spec.js checks if tags work
- pagination-spec.js creates many articles via API calls and then checks if they are displayed across two pages
- force-logout-spec.js verifies that unauthorized API calls force the user session to finish
Full code coverage
Front- and back-end coverage for this application is collected using the @cypress/code-coverage plugin. You can run the locally instrumented server and client using
npm run dev:coverage command. The backend coverage is exposed in server/server/index.js via endpoint listed in cypress.json (usually
GET /__coverage). The frontend coverage is collected by instrumenting the web application source code on the fly, see the client/.babelrc file.
The combined report is saved in
coverage/index.html after the tests finish:
The coverage is sent to Coveralls.io using command
npm run coveralls from CircleCI.
To learn more, read the Cypress code coverage guide.