@@ -15,7 +15,8 @@ const config = {
1515 }
1616 } ,
1717
18- hostname : "0.0.0.0" ,
18+ hostname : process . env . SAUCE_ACCESS_KEY ? "localhost" : "0.0.0.0" ,
19+ listenAddress : "0.0.0.0" ,
1920
2021 singleRun : true ,
2122 autoWatch : false ,
@@ -30,17 +31,27 @@ const config = {
3031/* eslint camelcase: "off", */
3132
3233if ( process . env . SAUCE_ACCESS_KEY ) {
34+ const sauceRegion = process . env . SAUCE_REGION || "us"
35+ const sauceConnectVersion = process . env . SAUCE_CONNECT_VERSION || "4.9.2"
36+ const sauceTunnelIdentifier = process . env . SAUCE_TUNNEL_IDENTIFIER
37+
3338 config . customLaunchers = {
3439 sl_chrome_latest : {
3540 base : "SauceLabs" ,
3641 browserName : "chrome" ,
37- version : "latest"
42+ browserVersion : "latest" ,
43+ "sauce:options" : {
44+ tunnelName : sauceTunnelIdentifier
45+ }
3846 } ,
3947 sl_chrome_latest_i8n : {
4048 base : "SauceLabs" ,
4149 browserName : "chrome" ,
42- version : "latest" ,
43- chromeOptions : {
50+ browserVersion : "latest" ,
51+ "sauce:options" : {
52+ tunnelName : sauceTunnelIdentifier
53+ } ,
54+ "goog:chromeOptions" : {
4455 args : [ "--lang=tr" ]
4556 }
4657 } ,
@@ -51,28 +62,45 @@ if (process.env.SAUCE_ACCESS_KEY) {
5162 base : "SauceLabs" ,
5263 browserName : "firefox" ,
5364 browserVersion : "latest" ,
65+ "sauce:options" : {
66+ tunnelName : sauceTunnelIdentifier
67+ } ,
5468 "moz:debuggerAddress" : true
5569 } ,
5670 sl_edge_latest : {
5771 base : "SauceLabs" ,
5872 browserName : "microsoftedge" ,
59- platform : "Windows 10" ,
60- version : "latest"
61- } ,
62- sl_android_9 : {
63- base : "SauceLabs" ,
64- browserName : "chrome" ,
65- platform : "android" ,
66- device : "Android GoogleAPI Emulator" ,
67- version : "9.0"
73+ platformName : "Windows 10" ,
74+ browserVersion : "latest" ,
75+ "sauce:options" : {
76+ tunnelName : sauceTunnelIdentifier
77+ }
6878 } ,
69- sl_android_latest : {
70- base : "SauceLabs" ,
71- browserName : "chrome" ,
72- platform : "android" ,
73- device : "Android GoogleAPI Emulator" ,
74- version : "12.0"
75- }
79+ // // Android is commented out because with the upgrade to SC5 I couldn't figure out how to get
80+ // // the Android VM to connect through the tunnel ("localhost" in the VM resolves to the VM
81+ // // itself, not the host machine). Maybe someone cleverer than me can figure this out.
82+ // sl_android_9: {
83+ // base: "SauceLabs",
84+ // browserName: "chrome",
85+ // platformName: "Android",
86+ // browserVersion: "latest",
87+ // "appium:deviceName": "Android GoogleAPI Emulator",
88+ // "appium:platformVersion": "9.0",
89+ // "sauce:options": {
90+ // tunnelName: sauceTunnelIdentifier
91+ // }
92+ // },
93+ // sl_android_latest: {
94+ // base: "SauceLabs",
95+ // browserName: "chrome",
96+ // platformName: "Android",
97+ // browserVersion: "latest",
98+ // "appium:deviceName": "Android GoogleAPI Emulator",
99+ // "appium:platformVersion": "12.0",
100+ // "sauce:options": {
101+ // tunnelName: sauceTunnelIdentifier
102+ // }
103+ // }
76104 }
77105
78106 config . browsers = Object . keys ( config . customLaunchers )
@@ -85,6 +113,12 @@ if (process.env.SAUCE_ACCESS_KEY) {
85113 commandTimeout : 600 ,
86114 maxDuration : 900 ,
87115 build : buildId ( ) ,
116+ region : sauceRegion ,
117+ startConnect : ! sauceTunnelIdentifier ,
118+ connectOptions : {
119+ scVersion : sauceConnectVersion ,
120+ tunnelIdentifier : sauceTunnelIdentifier
121+ }
88122 }
89123}
90124
0 commit comments