From ee5d2eba208e329f820f77b87031b5b01c52948c Mon Sep 17 00:00:00 2001 From: Cesare De Cal Date: Thu, 4 Jul 2024 08:02:27 +0200 Subject: [PATCH] Update README.md --- README.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d5cb1ce..3f395e6 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,7 @@ You will find a folder called `.github/workflows` at the root level which has tw ## Run e2e tests -While all types of tests are important, due to the limited time available end-to-end tests are available. PlayWright is the testing library of choice for this project. Find the end-to-end (e2e) tests in `frontend/tests/home.spec.ts`. These are not integration tests (that mock the backend API), but I analyzed the options and considered that end-to-end tests would be the most complete and would test both frontend and backend functionalities at the same time. +While all types of tests are important, due to the limited time available end-to-end tests are available. Playwright is the testing library of choice for this project. Find the end-to-end (e2e) tests in `frontend/tests/home.spec.ts`. These are not integration tests (that mock the backend API), but I analyzed the options and considered that end-to-end tests would be the most complete and would test both frontend and backend functionalities at the same time. The tests check the following: @@ -101,6 +101,21 @@ The tests check the following: * ✅ Search bar inputs are maintained even after switching between tabs * ✅ Pagination and sorting work as expected +At the moment you can only run e2e locally by using the + +```bash +$ cd frontend +$ npm run test:e2e +``` + +`node` must be installed on your computer for this to work, including the Playwright browser executables. The browsers can be installed with the following command: + +```bash +npx playwright install +``` + +In the feature running the e2e tests can be moved to the pipeline. Setting the appropriate environment variables will be required for that to work correctly. + ## Building the Docker image one by one This step is not necessary because Docker Compose will automatically build and start all the Docker containers for you. However, you can build and run Docker containers one by one if you so decide (useful if you want to try out changes in a single `Dockerfile` or want to test just the frontend or backend). Let us first navigate to the frontend project: