cypress-test-example-repos icon indicating copy to clipboard operation
cypress-test-example-repos copied to clipboard

Find a way to pass group id

Open bahmutov opened this issue 7 years ago • 5 comments

Currently we call a command on recipes like this

npm run test:ci

Which in turn calls run-p command

"test:ci": "run-p --race start cypress:run"

Problem - we cannot pass additional CLI arguments. For example npm run test:ci -- --group-id 1 breaks because it calls run-p --race start cypress:run --group-id 1 - which causes run-p to report "unknown option" :(

bahmutov avatar Dec 15 '17 21:12 bahmutov

Can you just get rid of the race altogether and just just npm start and use wait-on ??

brian-mann avatar Dec 15 '17 22:12 brian-mann

It would match better what we actually recommend to our users (and be a lot less confusing)

https://docs.cypress.io/guides/guides/continuous-integration.html#Booting-Your-Server

brian-mann avatar Dec 15 '17 22:12 brian-mann

well we need single command I believe, so not wait-on but start-server-then-test

bahmutov avatar Dec 15 '17 22:12 bahmutov

Why do we need a single command? You'll just background the server process.

brian-mann avatar Dec 15 '17 22:12 brian-mann

because we are iterating over each folder, running "test" command. Why split it into background task, keep track of the test then kill the background task? That's what start-server ... does - so just need to use it.

bahmutov avatar Dec 15 '17 22:12 bahmutov