Skip to content

Commit

Permalink
docs(tests): enumerate steps for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
thekaveman committed Oct 1, 2021
1 parent 3d2f3e6 commit afa307b
Showing 1 changed file with 21 additions and 19 deletions.
40 changes: 21 additions & 19 deletions docs/getting-started/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,34 +9,36 @@ See the [`cypress` Command Line](https://docs.cypress.io/guides/guides/command-l

### Using Docker Compose

Run the tests with Docker Compose against the `client` service:
Run the tests with Docker Compose against the `client` service.

First ensure your `.env` file has an updated `CYPRESS_baseUrl` variable:
1. Ensure your `.env` file has an updated `CYPRESS_baseUrl` variable:

```env
# using the Docker Compose service address
CYPRESS_baseURL=http://client:8000
```
```env
# using the Docker Compose service address
CYPRESS_baseURL=http://client:8000
```

Then from within the `localhost` directory:
2. From within the `localhost` directory:

```bash
docker compose run tests-e2e
```
```bash
docker compose run tests-e2e
```

### From the Dev Container

`cypress` is installed and available to run directly in the devcontainer.

First ensure your `.env` file has an updated `CYPRESS_baseUrl` variable:
1. Ensure your `.env` file has an updated `CYPRESS_baseUrl` variable:

```env
# using localhost since we're inside the container
CYPRESS_baseURL=http://localhost:8000
```
```env
# using localhost since we're inside the container
CYPRESS_baseURL=http://localhost:8000
```

Then Rebuild and Reopen, and start the `benefits` app with `F5`. Then from within the `tests/e2e` directory:
2. Rebuild and Reopen the devcontainer
3. Start the `benefits` app with `F5`
4. From within the `tests/e2e` directory:

```bash
npx cypress run
```
```bash
npx cypress run
```

0 comments on commit afa307b

Please sign in to comment.