mirror of
https://github.com/cypress-io/cypress.git
synced 2026-02-13 18:50:18 -06:00
* chore: release 13.15.1 (#30454) * chore: Update Chrome (beta) to 131.0.6778.13 (#30451) Co-authored-by: cypress-bot[bot] <41898282+cypress-bot[bot]@users.noreply.github.com> * remove deprecated before:browser:launch signature code * Update changelog * Update snapshots & failing tests BREAKING: remove deprecated before:browser:launch signature code that allowed Arrays * Add back options * update test spec to use non deprecated before:browser:launch signature * removed test for deprecated before:browser:launch signature --------- Co-authored-by: Bill Glesias <bglesias@gmail.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: cypress-bot[bot] <41898282+cypress-bot[bot]@users.noreply.github.com>
57 lines
2.0 KiB
TypeScript
57 lines
2.0 KiB
TypeScript
import systemTests from '../lib/system-tests'
|
|
|
|
const beforeBrowserLaunchProject = 'plugin-before-browser-launch-deprecation'
|
|
|
|
describe('deprecated before:browser:launch args', () => {
|
|
systemTests.setup()
|
|
|
|
systemTests.it('fails when adding unknown properties to launchOptions', {
|
|
browser: '!webkit', // TODO(webkit): fix+unskip (add executeBeforeBrowserLaunch to WebKit)
|
|
config: {
|
|
env: {
|
|
BEFORE_BROWSER_LAUNCH_HANDLER: 'return-unknown-properties',
|
|
},
|
|
},
|
|
project: beforeBrowserLaunchProject,
|
|
spec: 'app.cy.js',
|
|
expectedExitCode: 1,
|
|
snapshot: true,
|
|
})
|
|
|
|
// TODO: these errors could be greatly improved by the code frame
|
|
// improvements - because we "wrap" the user error with our own
|
|
// error which reads strangely - the message + stack are both
|
|
// printed. we should print that we are aborting the run because
|
|
// the before:browser:launch handler threw an error / rejected
|
|
systemTests.it('displays errors thrown and aborts the run', {
|
|
browser: '!webkit', // TODO(webkit): fix+unskip (add executeBeforeBrowserLaunch to WebKit)
|
|
config: {
|
|
env: {
|
|
BEFORE_BROWSER_LAUNCH_HANDLER: 'throw-explicit-error',
|
|
},
|
|
},
|
|
project: beforeBrowserLaunchProject,
|
|
spec: 'app.cy.js,app_spec2.js',
|
|
expectedExitCode: 1,
|
|
snapshot: true,
|
|
})
|
|
|
|
// TODO: these errors could be greatly improved by the code frame
|
|
// improvements - because we "wrap" the user error with our own
|
|
// error which reads strangely - the message + stack are both
|
|
// printed. we should print that we are aborting the run because
|
|
// the before:browser:launch handler threw an error / rejected
|
|
systemTests.it('displays promises rejected and aborts the run', {
|
|
browser: '!webkit', // TODO(webkit): fix+unskip (add executeBeforeBrowserLaunch to WebKit)
|
|
config: {
|
|
env: {
|
|
BEFORE_BROWSER_LAUNCH_HANDLER: 'reject-promise',
|
|
},
|
|
},
|
|
project: beforeBrowserLaunchProject,
|
|
spec: 'app.cy.js,app_spec2.js',
|
|
expectedExitCode: 1,
|
|
snapshot: true,
|
|
})
|
|
})
|