mirror of
https://github.com/cypress-io/cypress.git
synced 2026-05-07 23:40:21 -05:00
Merge branch 'develop' into 10.0-release
* develop: feat: gray out the path to system node in cypress run header (#20121) feat: redesign server errors (#20072) test: fix awesome-typescript-loader test and remove test-binary job (#20131) fix: Fix issues with stack traces and command log in Chrome 99 (#20049) fix: `cy.type(' ')` fires click event on button-like elements. (#20067) fix: `change`, `input` events are not fired when the same option is selected again. (#19623) build: publish vue3 on latest (#20099) chore: release @cypress/webpack-preprocessor-v5.11.1 chore: release @cypress/webpack-dev-server-v1.8.1 fix: detect newly added specs in dev-server compilation (#17950) chore: Remove pkg/driver //@ts-nocheck part 3 (#19837) chore: set up semantic-pull-request GitHub Action (#20091) chore: release @cypress/react-v5.12.2 fix: remove nullish coalescing in js files to support node 12 (#20094) docs: update @cypress/webpack-preprocessor links (#19902) refactor: use aliases instead of meta (#19566)
This commit is contained in:
@@ -19,8 +19,9 @@ describe('e2e plugins', function () {
|
||||
expectedExitCode: 1,
|
||||
onRun (exec) {
|
||||
return exec().then(({ stdout }) => {
|
||||
expect(stdout).to.include('The following error was thrown by a plugin. We stopped running your tests because a plugin crashed. Please check your e2e.setupNodeEvents method in `cypress.config.js`')
|
||||
expect(stdout).to.include('Error: Root async error from config file')
|
||||
expect(stdout).to.include('We stopped running your tests because your config process crashed.')
|
||||
expect(stdout).to.include('Your configFile threw an error from:')
|
||||
expect(stdout).to.include('Error: Root async error from plugins file')
|
||||
})
|
||||
},
|
||||
})
|
||||
@@ -153,6 +154,16 @@ describe('e2e plugins', function () {
|
||||
})
|
||||
})
|
||||
|
||||
it('fails when invalid event handler is registered', function () {
|
||||
return systemTests.exec(this, {
|
||||
spec: 'app.cy.js',
|
||||
project: 'plugin-invalid-event-handler-error',
|
||||
sanitizeScreenshotDimensions: true,
|
||||
snapshot: true,
|
||||
expectedExitCode: 1,
|
||||
})
|
||||
})
|
||||
|
||||
it('fails when setupNodeEvents is not a function', function () {
|
||||
return systemTests.exec(this, {
|
||||
spec: 'app.cy.js',
|
||||
@@ -163,6 +174,46 @@ describe('e2e plugins', function () {
|
||||
})
|
||||
})
|
||||
|
||||
it('fails when its set from config but does not exist', function () {
|
||||
return systemTests.exec(this, {
|
||||
spec: 'app_spec.js',
|
||||
project: 'plugin-missing',
|
||||
sanitizeScreenshotDimensions: true,
|
||||
snapshot: true,
|
||||
expectedExitCode: 1,
|
||||
})
|
||||
})
|
||||
|
||||
it('fails when there is no function exported', function () {
|
||||
return systemTests.exec(this, {
|
||||
spec: 'app_spec.js',
|
||||
project: 'plugin-no-function-return',
|
||||
sanitizeScreenshotDimensions: true,
|
||||
snapshot: true,
|
||||
expectedExitCode: 1,
|
||||
})
|
||||
})
|
||||
|
||||
it('fails when require throws synchronously', function () {
|
||||
return systemTests.exec(this, {
|
||||
spec: 'app_spec.js',
|
||||
project: 'plugins-root-sync-error',
|
||||
sanitizeScreenshotDimensions: true,
|
||||
snapshot: true,
|
||||
expectedExitCode: 1,
|
||||
})
|
||||
})
|
||||
|
||||
it('fails when function throws synchronously', function () {
|
||||
return systemTests.exec(this, {
|
||||
spec: 'app_spec.js',
|
||||
project: 'plugins-function-sync-error',
|
||||
sanitizeScreenshotDimensions: true,
|
||||
snapshot: true,
|
||||
expectedExitCode: 1,
|
||||
})
|
||||
})
|
||||
|
||||
describe('preprocessor', function () {
|
||||
it('passes with working preprocessor', function () {
|
||||
return systemTests.exec(this, {
|
||||
|
||||
Reference in New Issue
Block a user