Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions plugins/cypress/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ hooks:

The `CypressCI` task runs on the `test:review` and `test:staging` hooks by default. These will run your Cypress end-to-end tests against the currently deployed review or staging app respectively.

For the Cypress end-to-end tests to be run against the staging app, you will need to add to the project's Vault `continuous-integration` secrets a `CYPRESS_CUSTOM_STAGING_URL` environment variable whose value is the staging app's Heroku URL.

### Running on another hook
You can also configure Cypress to run on any other hook; for example, if you want to run it with `npm run test` via the `npm` plugin, you can manually configure Cypress to run on `npm`'s `test:local` hook:

Expand Down
2 changes: 1 addition & 1 deletion plugins/cypress/src/tasks/cypress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class CypressCi extends Task<typeof CypressSchema> {
cypressEnv.CYPRESS_BASE_URL = `https://${reviewState.appName}.herokuapp.com`
cypressEnv.CYPRESS_REVIEW_APP = 'true'
} else {
cypressEnv.CYPRESS_BASE_URL = `https://${process.env.CY_CUSTOM_DOMAIN_STAGING}`
cypressEnv.CYPRESS_BASE_URL = process.env.CYPRESS_CUSTOM_STAGING_URL || ''
}

this.logger.info(`running cypress against ${cypressEnv.CYPRESS_BASEURL}`)
Expand Down