Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
csr authored Jul 4, 2024
1 parent a4a2cc4 commit ee5d2eb
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand All @@ -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:
Expand Down

0 comments on commit ee5d2eb

Please sign in to comment.