Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

chore(driverProviders): add warnings to extra driver provider parameters #3873

Merged
merged 1 commit into from
Dec 22, 2016

Conversation

cnishina
Copy link
Contributor

  • builds the driver provider in lib/driverProviders/index instead of lib/runner

closes #1945

Copy link
Contributor

@sjelin sjelin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just some nits

warn += 'local' !== providerType && config.seleniumServerJar ? 'seleniumServerJar, ' : '';
warn += 'mock' !== providerType && config.mockSelenium ? 'mockSelenium, ' : '';
if (warn !== '') {
logger.warn(warnInto);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two will be on separate lines; is that intentional?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could make them a single line.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.


let warnInto = 'Using driver provider ' + providerType + ', but also found extra';
let warn = '';
warn += 'direct' !== providerType && config.directConnect ? 'directConnect: ' : '';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be 'directConnect, '?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The driver provider is direct. Probably should call it directConnect.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No I meant at the end: you have 'directConnect: ' but it should be 'directConnect, '

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack. Fixed.

export let logWarnings = (providerType: string, config: Config): void => {

let warnInto = 'Using driver provider ' + providerType + ', but also found extra';
let warn = '';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might make more sense to have this be a string[], and then do a join(', ') at the end. This way you won't get an extra comma

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. I thought about it after I wrote it...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@cnishina cnishina force-pushed the warn_configparser branch 2 times, most recently from 8050720 to 8364545 Compare December 22, 2016 22:29
- builds the driver provider in lib/driverProviders/index instead of lib/runner

closes angular#1945
@cnishina cnishina merged commit ca4f1ac into angular:master Dec 22, 2016
@cnishina cnishina deleted the warn_configparser branch January 6, 2017 20:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Warn user for conflicting selenium arguments in the config file
3 participants