This repository was archived by the owner on Jul 29, 2024. It is now read-only.
This repository was archived by the owner on Jul 29, 2024. It is now read-only.
Protractor CLI rejects cucumberOpts
as invalid #3978
Closed
Description
Hello there!
It looks like the whitelist defined in the cli.ts
rejects the cucumberOpts
key which the protractor-cucumber-framework
uses.
- Node Version:
6.9.4
- Protractor Version:
5.0.0
Running protractor with the below config file results in this output:
Error: Found extra flags: cucumberOpts
exports.config = {
seleniumServerJar: path.resolve(node_modules, 'protractor/node_modules/webdriver-manager/selenium/selenium-server-standalone-2.53.1.jar'),
framework: 'custom',
frameworkPath: require.resolve('protractor-cucumber-framework'),
specs: [ 'features/**/*.feature' ],
cucumberOpts: {
require: [
'features/**/*.ts'
],
format: 'pretty',
compiler: 'ts:ts-node/register',
}
};
I guess there are several ways to resolve this issue:
- run the protractor/cucumber combo with a
--disableChecks
switch (that's more of a workaround, though) - change the whitelist to include
cucumberOpts
, which allows people to run their cucumber tests same as they used to, but requires the Protractor Team to amend the whitelist whenever a new framework comes along or changes the way it's configured (which breaks "half of SOLID" ;-)) - change the CLI to only perform the checks on keys recognised and supported by Protractor, ignoring any additional keys, which to me seems the most sensible approach.
Looking forward to hearing your thoughts!
Jan