Passing custom arguments to e2e
Bug Report or Feature Request (mark with an x)
- [x ] bug report -> please search issues before submitting
- [ ] feature request
Area
- [x ] devkit
- [ ] schematics
Versions
angular 6 node v8.9.4 npm v6.1.0 Windows 10.
Repro steps
After upgrading project to Angular 6 an e2e testing stopped to passing additional command line arguments. Command: ng e2e my-project arg1 arg2 arg3
The log given by the failure
NodeJS.Process.agrv[] array includes only 2 default arguments without arg1 arg2 arg3
Desired functionality
Argument should be passed as it was with Angular 5.
Inability to pass additional args through is affecting our upgrade from 5.2 to 6. Any timeline for when this will be fixed ?
For context we pass a "shards" arg to ng test, which is used in karma.conf to configure the karma-parallel plugin. Unable to do that now and given how slow angular unit tests are, this is a deal breaker.
Would really like to be able to do something like the following:
ng e2e <e2e-project-name> --capabilities.chromeOptions.binary="custom/path/chrome/binary"
Is this possible?
@jgf5013 most likely not. What you can do now is use npm to run e2e command and pass argument to it.
npm run e2e --my-param=test -- --suite=someSuite
// args after -- are append to the command listed in package.json
Then you can access value of my-param via process.env.npm_config_my-param (or something similar on process.env)
Closing since protractor builder is deprecated and we won't be adding new features.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.