Open Anyman552 opened 6 years ago
Ah this definitely seems like a bug. Thank you for the thorough issue!
We could go with the approach you've suggested and just document that users must pass the config as the first option in protractorArgs
. I'd want to make sure that we aren't accidentally removing too much though.
Would you be up for submitting a PR with some tests? I'm currently pretty swamped with my day job but i'd be happy to collaborate on a fix.
I'm not sure if passing the config as first option is the solutution.
I'll take a look on it and submit a PR.
I've submitted a PR: #94
Hi there!
everything works fine until i want to use the retryconfig-feature. The first test run works well. But if there is a failure i get an error at the next test attempt:
Protractor seems to throw the error because of more than one config files. So i looked at protractorArgs in index.js:
it adds the retryconfig but do not remove the origin one. If i remove the origin config from the array everything works fine:
protractorFlake({ protractorPath: 'C:\Users\Anyman552\AppData\Roaming\npm\node_modules\protractor\bin\protractor', maxAttempts: 3, parser: 'standard', // expects node to be in path // set this to wherever the node bin is located nodeBin: 'node', // set color to one of the colors available at 'chalk' - https://github.com/chalk/ansi-styles#colors color: 'magenta', protractorArgs: ["protractor.conf.local.js"], // specify a different protractor config to apply after the first execution attempt // either specify a config file, or cli args (ex. --capabilities.browser=chrome) protractorRetryConfig: 'retryconfig.js' }, function (status, output) { process.exit(status); });
the retryconfig is the same as the origin one with some other params.
Thanks, Anyman552