-
Notifications
You must be signed in to change notification settings - Fork 356
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[cypress.rake] Add cypress.env.json generation
Cypress handles environment variables itself, so `process.env` isn't available. As a result, "Option 2" is what is being done here: https://docs.cypress.io/guides/guides/environment-variables.html#Option-2-cypress-env-json which makes sure a default config file exists as part of the `setup` step for running the specs. A `file` task is used here to only run it if the file doesn't exist, but makes it a dependency for the `:setup` task. By default, screenshots are disabledin CI, but enabled in dev. The cypress.env.json file is also ignored by git, so local edits can happen and can be customized for each developer. On CI, it will just be copied in and the defaults from `.cypress.ci.env.json` will be what is conifigured in that environment.
- Loading branch information
1 parent
b07ea0a
commit 29fc118
Showing
5 changed files
with
23 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"disable_screenshots": "true" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"disable_screenshots": "false" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,3 +21,4 @@ config/webpack/paths.json | |
*.sw[po] | ||
cypress/screenshots | ||
cypress/videos | ||
cypress.env.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters