sauceAgent passed incorrectly to SauceLabs.js #3410
Description
It looks like there is an issue with the way the sauceAgent config param is passed to the SauceLabs node module. It is expecting 'proxy' to be passed in rather than 'agent'.
the sauceAgent config is a string according to this which is fine:
https://github.com/angular/protractor/blob/master/lib/config.ts
..and it looks like the intent is that this is the proxy address to be passed to SauceLabs node module when behind a proxy - docs are a bit unclear.
when we just set the webDriverProxy, the tests run against saucelabs via the proxy ok, but the final result rest api call fails (outside webdriver) - even though we have the sauceAgent proxy set too. This means that all tests are left in an error state.
When i locally update this file to match the expected constructor parameter it works fine:
https://github.com/angular/protractor/blob/master/lib/driverProviders/sauce.ts
from this:
this.sauceServer_ = new SauceLabs({
username: this.config_.sauceUser,
password: this.config_.sauceKey,
agent: this.config_.sauceAgent
});
to this:
this.sauceServer_ = new SauceLabs({
username: this.config_.sauceUser,
password: this.config_.sauceKey,
proxy: this.config_.sauceAgent
});
this means that the parameter matches the expected constructor parameter - 'agent' does not seem to be referenced in SauceLabs.js:
https://github.com/danjenkins/node-saucelabs/blob/master/lib/SauceLabs.js
this options is then used to setup the proxy like this:
options.agent = new HttpsProxyAgent(url.parse(options.proxy));
happy to provide more details if required.