Skip to content

Commit

Permalink
docs: remove sections about Cypress
Browse files Browse the repository at this point in the history
  • Loading branch information
angela-tran committed Nov 22, 2024
1 parent 8ce82b5 commit 88ce34d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 68 deletions.
13 changes: 0 additions & 13 deletions docs/configuration/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,19 +218,6 @@ The number of seconds `requests` will wait for the client to establish a connect

The number of seconds the client will wait for the server to send a response. Defaults to 1 second.

## Cypress tests

!!! tldr "Cypress docs"

[`CYPRESS_*` variables](https://docs.cypress.io/guides/guides/environment-variables#Option-3-CYPRESS_)

### `CYPRESS_baseUrl`

The base URL for the (running) application, against which all Cypress `.visit()` etc. commands are run.

When Cypress is running inside the devcontainer, this should be `http://localhost:8000`. When Cypress is running outside the
devcontainer, check the [`DJANGO_LOCAL_PORT`](#django_local_port).

## Sentry

### `SENTRY_DSN`
Expand Down
55 changes: 0 additions & 55 deletions docs/tests/automated-tests.md
Original file line number Diff line number Diff line change
@@ -1,60 +1,5 @@
# Automated tests

## Cypress

Feature and user interface tests are implemented with [`cypress`](https://www.cypress.io/) and can be found in the
[`tests/cypress`](https://github.com/cal-itp/benefits/tree/main/tests/cypress) directory in the repository.

See the [`cypress` Command Line](https://docs.cypress.io/guides/guides/command-line) guide for more information.

### Running

These are instructions for running `cypress` locally on your machine, _without_ the [devcontainer](../development/README.md#vs-code-with-devcontainers). These steps
will install `cypress` and its dependencies on your machine. Make sure to run these commands in a Terminal.

1. Ensure you have Node.js and NPM available on your local machine:

```bash
node -v
npm -v
```

If not, [install Node.js](https://nodejs.org/en/download/) locally.

1. Start the local eligibility verification server:

```bash
docker compose up --detach server
```

1. Start the the application:

```bash
docker compose run --detach --service-ports client bin/test_start.sh
```

1. Change into the `cypress` directory:

```bash
cd tests/cypress
```

1. Install all packages and `cypress`. Verify `cypress` installation succeeds:

```bash
npm install
```

1. Run `cypress` with test environment variables and configuration variables:

```bash
CYPRESS_baseUrl=http://localhost:8000 npm run cypress:open
```

See `tests/cypress/package.json` for more cypress scripts.

As of Cypress 12.5.1 with Firefox 109, there is a CSRF issue that prevents the tests from passing; unclear if this is a bug in Cypress or what. Use one of the other browser options.

## Pytest

The tests done at a request/unit level are run via [pytest-django](https://pytest-django.readthedocs.io/en/latest/index.html).
Expand Down

0 comments on commit 88ce34d

Please sign in to comment.