Cypress 10 Is it possible to open cypress immediately without selecting testing type & browser?

Viewed 55

I want to launch cypress open without having to select my testing type and browser each time. I will only be using e2e testing and chrome as my browser and it gets cumbersome to have to select the option each time I open cypress

1 Answers

Yes, from the command line or in package.json scripts section pass the options --e2e --browser chrome in

command line

yarn cypress open --e2e --browser chrome
// or
npx cypress open --e2e --browser chrome

package.json

{
  "name": "cypress-testing",
  "version": "1.0.0",
  "main": "index.js",
  "license": "MIT",
  "dependencies": {
    ...
  },
  "scripts": {
    "cy:open": "yarn cypress open --e2e --browser chrome",
  }
}
Related