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

Commit

Permalink
fix(sauce): sauceAgent passed incorrectly to sauce node module (#3415)
Browse files Browse the repository at this point in the history
closes #3410
  • Loading branch information
cnishina authored Jul 26, 2016
1 parent 0f35006 commit 7266902
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
19 changes: 16 additions & 3 deletions lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,23 @@ export interface Config {
*/
sauceKey?: string;
/**
* Use sauceAgent if you need customize agent for https connection to
* saucelabs.com (i.e. your computer behind corporate proxy)
* Use sauceAgent if you need custom HTTP agent to connect to saucelabs.com.
* This is needed if your computer is behind a corporate proxy.
*
* To match sauce agent implementation, use
* [HttpProxyAgent](https://github.com/TooTallNate/node-http-proxy-agent)
* to generate the agent or use sauceProxy as an alternative. If a
* sauceProxy is provided, the sauceAgent will be overridden.
*/
sauceAgent?: HttpProxyAgent;
/**
* Use sauceProxy if you are behind a corporate proxy to connect to
* saucelabs.com.
*
* The sauceProxy is used to generate an HTTP agent. If a sauceProxy is
* provided, the sauceAgent will be overridden.
*/
sauceAgent?: string;
sauceProxy?: string;
/**
* Use sauceBuild if you want to group test capabilites by a build ID
*/
Expand Down
3 changes: 2 additions & 1 deletion lib/driverProviders/sauce.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ export class Sauce extends DriverProvider {
this.sauceServer_ = new SauceLabs({
username: this.config_.sauceUser,
password: this.config_.sauceKey,
agent: this.config_.sauceAgent
agent: this.config_.sauceAgent,
proxy: this.config_.sauceProxy
});
this.config_.capabilities['username'] = this.config_.sauceUser;
this.config_.capabilities['accessKey'] = this.config_.sauceKey;
Expand Down
4 changes: 4 additions & 0 deletions lib/globals.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,7 @@ declare namespace webdriver {
isPresent?: Function;
}
}

declare interface HttpProxyAgent {
constructor(opts: Object): HttpProxyAgent;
}

0 comments on commit 7266902

Please sign in to comment.