-
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.
feat: show better error message if testing type is not configured (#2…
…2000) * feat: show better error message if testing type is not configured * Add tests * Update tests * Fix some tests * Fix some tests * Fix test * Fix tests * Update packages/errors/src/errors.ts Co-authored-by: Jennifer Shehane <jennifer@cypress.io> * Update with code review * Fix test * Add on link Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
- Loading branch information
1 parent
b24a77d
commit e5c1f91
Showing
24 changed files
with
139 additions
and
7 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
43 changes: 43 additions & 0 deletions
43
packages/errors/__snapshot-html__/TESTING_TYPE_NOT_CONFIGURED.html
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
19 changes: 19 additions & 0 deletions
19
system-tests/__snapshots__/testing_type_not_configured_error_spec.ts.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,19 @@ | ||
exports['testing type not configured error on run mode / reports correct exit code when failing attempting to run e2e'] = ` | ||
The testing type selected (e2e) is not configured in your config file. | ||
Please run ‘cypress open’ and choose your testing type to automatically update your configuration file. | ||
https://on.cypress.io/configuration | ||
` | ||
|
||
exports['testing type not configured error on run mode / reports correct exit code when failing attempting to run component'] = ` | ||
The testing type selected (component) is not configured in your config file. | ||
Please run ‘cypress open’ and choose your testing type to automatically update your configuration file. | ||
https://on.cypress.io/configuration | ||
` |
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 |
---|---|---|
@@ -1 +1,3 @@ | ||
module.exports = {} | ||
module.exports = { | ||
e2e: {}, | ||
} |
4 changes: 4 additions & 0 deletions
4
system-tests/projects/invalid-root-level-config/invalid-component-baseUrl-config.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 |
---|---|---|
@@ -1,5 +1,9 @@ | ||
module.exports = { | ||
component: { | ||
baseUrl: 'https://foo.com', | ||
devServer: { | ||
framework: 'create-react-app', | ||
bundler: 'webpack', | ||
}, | ||
}, | ||
} |
4 changes: 4 additions & 0 deletions
4
...ojects/invalid-root-level-config/invalid-component-experimentalSessionAndOrigin-config.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 |
---|---|---|
@@ -1,5 +1,9 @@ | ||
module.exports = { | ||
component: { | ||
experimentalSessionAndOrigin: true, | ||
devServer: { | ||
framework: 'create-react-app', | ||
bundler: 'webpack', | ||
}, | ||
}, | ||
} |
4 changes: 3 additions & 1 deletion
4
system-tests/projects/multiple-support-files/cypress.config.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 |
---|---|---|
@@ -1 +1,3 @@ | ||
module.exports = {} | ||
module.exports = { | ||
e2e: {}, | ||
} |
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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
import { defineConfig } from 'cypress' | ||
|
||
export default defineConfig({}) | ||
export default defineConfig({ | ||
e2e: {}, | ||
}) |
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 |
---|---|---|
@@ -1 +1,3 @@ | ||
module.exports = {} | ||
module.exports = { | ||
e2e: {}, | ||
} |
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 |
---|---|---|
@@ -1 +1,3 @@ | ||
module.exports = {} | ||
module.exports = { | ||
e2e: {}, | ||
} |
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 |
---|---|---|
|
@@ -21,6 +21,7 @@ describe('e2e cy.origin retries', () => { | |
hosts: { | ||
'*.foobar.com': '127.0.0.1', | ||
}, | ||
e2e: {}, | ||
}, | ||
}) | ||
|
||
|
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 |
---|---|---|
|
@@ -126,6 +126,7 @@ describe('e2e sessions', () => { | |
hosts: { | ||
'*.foo.com': '127.0.0.1', | ||
}, | ||
e2e: {}, | ||
}, | ||
}) | ||
|
||
|
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
19 changes: 19 additions & 0 deletions
19
system-tests/test/testing_type_not_configured_error_spec.ts
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,19 @@ | ||
const systemTests = require('../lib/system-tests').default | ||
|
||
describe('testing type not configured error on run mode', () => { | ||
systemTests.setup() | ||
|
||
systemTests.it('reports correct exit code when failing attempting to run e2e', { | ||
project: 'simple-ct', | ||
testingType: 'e2e', | ||
snapshot: true, | ||
expectedExitCode: 1, | ||
}) | ||
|
||
systemTests.it('reports correct exit code when failing attempting to run component', { | ||
project: 'e2e', | ||
testingType: 'component', | ||
snapshot: true, | ||
expectedExitCode: 1, | ||
}) | ||
}) |
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 |
---|---|---|
|
@@ -5,6 +5,7 @@ describe('e2e viewport', () => { | |
settings: { | ||
viewportWidth: 800, | ||
viewportHeight: 600, | ||
e2e: {}, | ||
}, | ||
}) | ||
|
||
|
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
e5c1f91
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Circle has built the
linux x64
version of the Test Runner.Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.
Run this command to install the pre-release locally:
e5c1f91
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Circle has built the
darwin x64
version of the Test Runner.Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.
Run this command to install the pre-release locally: