Testing

We use Vitest (opens in a new tab) and React Testing Library (opens in a new tab) for testing our components and functions. For E2E tests, we use Playwright (opens in a new tab).

ℹ️

For testing translations, we agreed on validating the translation key for component tests instead of the resolved value. For E2E tests, we validate the resolved value in the UI.

Component tests

For every new component, it's required to write a corresponding component test, that checks the output dependent on the given inputs like props, state, etc.

Unit tests

For i.e. utility functions, it's required to write a corresponding unit test that checks the output dependent on the given inputs of that function.

E2E tests

For new workflows, it's required to simulate them by implementing an E2E test. For example, the login and logout workflow or the workflow for creating, editing and deleting a user.