igniteram / protractor-cli

:dart: An Interactive command line interface & config helper for Protractor.js !
http://npm.im/protractor-cli
MIT License
14 stars 4 forks source link

E/configParser - ReferenceError: WARN is not defined #28

Closed pitzqa closed 6 years ago

pitzqa commented 6 years ago

Hello, I faced Same issue "E/configParser - ReferenceError: WARN is not defined" while running my protractor.conf.js file in protractor cli.

protractor.conf.js file,

const HtmlScreenshotReporter = require('protractor-jasmine2-screenshot-reporter');

exports.config = { allScriptsTimeout: 120000, seleniumAddress: 'http://localhost:4444/wd/hub', baseUrl: 'https://*/login', capabilities: { browserName: 'chrome' }, framework: 'jasmine', specs: [ '/home/kl/Desktop/EV/ev-ng/e2e' ], logLevel: WARN, beforeLaunch: () => { require('ts-node').register({ project: './tsconfig.e2e.json' }); }, jasmineNodeOpts: { defaultTimeoutInterval: 120000, showColors: true, random: false, }, onPrepare: () => { jasmine.getEnv().addReporter(new HtmlScreenshotReporter({ dest: 'target/screenshots', filename: 'protractor_jasmine_report.html' })); }, };

example 1

igniteram commented 6 years ago

@pitzqa Yes, I caught this small issue while unit testing. I have already raised a PR https://github.com/igniteram/protractor-cli/pull/27 which would fix this.

Meanwhile you can just put the WARN in string qoutes --> 'WARN' in protractor.conf.js file

pitzqa commented 6 years ago

@igniteram Its working. Thank You so much.

igniteram commented 6 years ago

fixed this issue with https://github.com/igniteram/protractor-cli/pull/27, please download the latest protractor-cli to see the changes. Closing this issue!