-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add configFile parameter (#147)
- Loading branch information
Showing
11 changed files
with
137 additions
and
11 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# using specific config file | ||
|
||
These tests specify non-default Cypress configuration file to use | ||
|
||
These tests run: | ||
- [ ] before the build | ||
- [x] after the build | ||
- [ ] on deploy success | ||
|
||
## Local testing | ||
|
||
``` | ||
DEBUG=netlify-plugin-cypress npm run netlify:build | ||
``` |
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,5 @@ | ||
{ | ||
"pluginsFile": false, | ||
"supportFile": false, | ||
"fixturesFolder": 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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"pluginsFile": false, | ||
"supportFile": false, | ||
"fixturesFolder": false, | ||
"env": { | ||
"CUSTOM_FILE": 42 | ||
} | ||
} |
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,7 @@ | ||
/// <reference types="cypress" /> | ||
describe('custom config file', () => { | ||
it('uses cypress.netlify.json', () => { | ||
// this property is set in the cypress.netlify.json file | ||
expect(Cypress.env()).to.have.property('CUSTOM_FILE', 42) | ||
}) | ||
}) |
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,18 @@ | ||
[build] | ||
command = "echo 'Netlify build command ...'" | ||
publish = "public" | ||
|
||
[[plugins]] | ||
# local Cypress plugin will test our site after it is built | ||
# in production, please use: package = "netlify-plugin-cypress" | ||
package = "../../" | ||
|
||
# do not run tests after deploy (testing) | ||
[plugins.inputs] | ||
enable = false | ||
configFile = "cypress.netlify.json" | ||
|
||
# run tests postBuild | ||
[plugins.inputs.postBuild] | ||
enable = true | ||
configFile = "cypress.netlify.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"name": "config-file", | ||
"version": "0.1.0", | ||
"private": true, | ||
"scripts": { | ||
"start": "../../node_modules/.bin/react-scripts start", | ||
"build": "../../node_modules/.bin/react-scripts build", | ||
"cypress:open": "../../node_modules/.bin/cypress open", | ||
"cypress:run": "../../node_modules/.bin/cypress run", | ||
"netlify:build": "../../node_modules/.bin/netlify build" | ||
} | ||
} |
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 @@ | ||
<h1>Basic</h1> |