Resolves a bug where when running Cypress in interactive mode (cypress open) and using the Electron browser, the tests would not run at all.
Got around this by not expecting users to prepend their cypress open command with ELECTRON_EXTRA_LAUNCH_ARGS variable (like we require them to do for cypress run).
In interactive mode, we don't listen to CDP or take snapshots or write archives at all.
API Change
Instead of only passing on to our installPlugin function, we require config to be passed as well (so we can know if they are in interactive mode on the server side of things).
So it's now:
import { defineConfig } from 'cypress';
import { installPlugin } from '../src';
export default defineConfig({
e2e: {
setupNodeEvents(on, config) {
// `config` now supplied to `installPlugin`
installPlugin(on, config);
},
},
});
How to test
Run yarn test:server
Run yarn cypress open --project packages/cypress/tests (to run the Cypress tests in interactive mode)
Verify Electron boots up and displays the tests
Click through the tests
Verify there are no errors (CDP or otherwise) in browser or server consoles
Issue: #AP-4060
What Changed
Resolves a bug where when running Cypress in interactive mode (
cypress open
) and using the Electron browser, the tests would not run at all.Got around this by not expecting users to prepend their
cypress open
command withELECTRON_EXTRA_LAUNCH_ARGS
variable (like we require them to do forcypress run
).In interactive mode, we don't listen to CDP or take snapshots or write archives at all.
API Change
Instead of only passing
on
to ourinstallPlugin
function, we requireconfig
to be passed as well (so we can know if they are in interactive mode on the server side of things).So it's now:
How to test
Run
yarn test:server
Run
yarn cypress open --project packages/cypress/tests
(to run the Cypress tests in interactive mode)Verify Electron boots up and displays the tests
Click through the tests
Verify there are no errors (CDP or otherwise) in browser or server consoles
[x] Author QA