For component testing the project uses vitest. The component tests include DOM- , unit- and snapshot testing, and can be found in the folder with the corresponding component or page.
cd frontendnpm run test
For E2E testing the project uses cypress. The tests can be found in the cypress folder in the root of the frontend directory, and consists of two complex user scenarios:
- This test simulates the process of:
- creating a profile
- navigating to the sell page
- filling in the necessary product information
- listing an item for sale
- verifying that its appearance on their profile page
- This test simulates the process of:
- creating a profile
- navigating to the explore page
- performing a search,
- applying filters
- selecting a product
- sending a bid message to the seller
We selected these user scenarios because we felt that they represent the most important and significant aspects of our functionality. They were also complex enough to cover a wide range of different features.
cd frontendnpm run cypress
cd frontendnpx cypress open
The project uses eslint for linting. To begin linting, run npm run lint in the frontend folder