Skip to content

Commit 0c4cbe1

Browse files
committed
build!: revise Cypress base URL value for staging scenario
1 parent 5a450ea commit 0c4cbe1

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

plugins/cypress/readme.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ hooks:
3636

3737
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.
3838

39+
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.
40+
3941
### Running on another hook
4042
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:
4143

plugins/cypress/src/tasks/cypress.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export class CypressCi extends Task<typeof CypressSchema> {
2727
cypressEnv.CYPRESS_BASE_URL = `https://${reviewState.appName}.herokuapp.com`
2828
cypressEnv.CYPRESS_REVIEW_APP = 'true'
2929
} else {
30-
cypressEnv.CYPRESS_BASE_URL = `https://${process.env.CY_CUSTOM_DOMAIN_STAGING}`
30+
cypressEnv.CYPRESS_BASE_URL = process.env.CYPRESS_CUSTOM_STAGING_URL || ''
3131
}
3232

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

0 commit comments

Comments
 (0)