I test web apps via 3 types of tests: 1
I test web apps via 3 types of tests:
1. End-to-end (E2E) - Goal: Smoke test each page to assure it loads successfully. Only check for static elements. Avoid checking for anything that might change. No mocks. Typically use @playwrightweb or @Cypress_io.
2. Integration test: Goal: Test features and workflows in detail against mocked endpoints via @ApiMocking. Typically use @playwrightweb or @Cypress_io.
3. Unit test - Goal: Assure a single function or component works. Typically use @vitest_dev and focus on pure functions. Use Vitest with @TestingLib and jsdom to test React components in isolation. I typically only unit test reusable React components. I sometimes point those unit tests against a @storybookjs story (so I know the Story works, and have visual feedback)