Files
cypress/system-tests/projects/plugin-browser/cypress.config.js
T
Jennifer Shehane 7f6e0309a0 breaking: remove deprecated before:browser:launch signature code that allowed Arrays (#30460)
* 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>
2024-10-28 10:18:09 -04:00

30 lines
649 B
JavaScript

module.exports = {
'e2e': {
'supportFile': false,
setupNodeEvents (on, config) {
on('before:browser:launch', (browser, launchOptions) => {
const { name } = browser
if ((name) === 'chrome') {
launchOptions.args = [name, 'foo', 'bar', 'baz']
return launchOptions
}
if ((name) === 'electron') {
launchOptions.preferences = {
browser: 'electron',
foo: 'bar',
}
return launchOptions
}
throw new Error(`unrecognized browser name: '${name}' for before:browser:launch`)
})
return config
},
},
}