# cypress/e2e

A set of Cypress 'smoke tests' that are run against real deployments.

These tests are good because they test the entire stack (end-to-end/e2e). They're bad because real network conditions and edge-cache invalidation delays make them flakey. To work around the pitfalls of this approach we have a separate suite: [cypress/local](../local) which runs against a controlled (mostly) local stack.

You can run tests locally against `staging` or `production` to debug CI. Make sure you have the correct env-vars defined for each env before running tests otherwise some tests will fail.

## Prerequisites

- `yarn install`
- Create a `./.env` based on the `./.env.shadow` template

## Run against staging (`staging.songwhip.com`)

```
yarn test:cypress:e2e:staging
```

## Run against production (`songwhip.com`)

```
yarn test:cypress:e2e:production
```

## Run against local (`localhost:3000`)

```
yarn test:cypress:e2e
```
