-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes #1042 enable plugins to return a promise and modify config
- Loading branch information
1 parent
44e84d9
commit 0e07d80
Showing
12 changed files
with
184 additions
and
47 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 |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
"plugin:cypress-dev/general" | ||
], | ||
"env": { | ||
"es6": true, | ||
"node": 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
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
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
1 change: 1 addition & 0 deletions
1
packages/server/test/support/fixtures/projects/plugin-config/cypress.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 @@ | ||
{} |
14 changes: 14 additions & 0 deletions
14
...s/server/test/support/fixtures/projects/plugin-config/cypress/integration/app_spec.coffee
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 @@ | ||
it "overrides config", -> | ||
## overrides come from plugins | ||
expect(Cypress.config("defaultCommandTimeout")).to.eq(500) | ||
expect(Cypress.config("videoCompression")).to.eq(20) | ||
|
||
## overrides come from CLI | ||
expect(Cypress.config("pageLoadTimeout")).to.eq(10000) | ||
|
||
it "overrides env", -> | ||
## overrides come from plugins | ||
expect(Cypress.env("foo")).to.eq("bar") | ||
|
||
## overrides come from CLI | ||
expect(Cypress.env("bar")).to.eq("bar") |
12 changes: 12 additions & 0 deletions
12
packages/server/test/support/fixtures/projects/plugin-config/cypress/plugins/index.js
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 @@ | ||
module.exports = (on, config) => { | ||
return new Promise((resolve) => { | ||
setTimeout(resolve, 100) | ||
}) | ||
.then(() => { | ||
config.defaultCommandTimeout = 500 | ||
config.videoCompression = 20 | ||
config.env.foo = 'bar' | ||
|
||
return config | ||
}) | ||
} |
Oops, something went wrong.