@@ -50,7 +50,6 @@ module.exports = function run(args, rawArgs) {
5050 utils . setCypressConfigFilename ( bsConfig , args ) ;
5151
5252 const turboScaleSession = false ;
53- // Constants.turboScaleObj.enabled = turboScaleSession;
5453
5554 utils . setUsageReportingFlag ( bsConfig , args . disableUsageReporting ) ;
5655
@@ -62,11 +61,26 @@ module.exports = function run(args, rawArgs) {
6261 // accept the access key from command line or env variable if provided
6362 utils . setAccessKey ( bsConfig , args ) ;
6463
64+ const isBrowserstackInfra = true
6565 let buildReportData = await getInitialDetails ( bsConfig , args , rawArgs ) ;
6666
6767 // accept the build name from command line if provided
6868 utils . setBuildName ( bsConfig , args ) ;
6969
70+ if ( isBrowserstackInfra ) {
71+ // set cypress test suite type
72+ utils . setCypressTestSuiteType ( bsConfig ) ;
73+
74+ // set cypress geo location
75+ utils . setGeolocation ( bsConfig , args ) ;
76+
77+ // set timezone
78+ utils . setTimezone ( bsConfig , args ) ;
79+
80+ // set spec timeout
81+ utils . setSpecTimeout ( bsConfig , args ) ;
82+ }
83+
7084
7185 // accept the specs list from command line if provided
7286 utils . setUserSpecs ( bsConfig , args ) ;
@@ -80,8 +94,51 @@ module.exports = function run(args, rawArgs) {
8094 // accept the system env list from bsconf and set it
8195 utils . setSystemEnvs ( bsConfig ) ;
8296
97+ if ( isBrowserstackInfra ) {
98+ //accept the local from env variable if provided
99+ utils . setLocal ( bsConfig , args ) ;
100+
101+ //set network logs
102+ utils . setNetworkLogs ( bsConfig ) ;
103+
104+ // set Local Mode (on-demand/ always-on)
105+ utils . setLocalMode ( bsConfig , args ) ;
106+
107+ //accept the local identifier from env variable if provided
108+ utils . setLocalIdentifier ( bsConfig , args ) ;
109+
110+ // set Local Config File
111+ utils . setLocalConfigFile ( bsConfig , args ) ;
112+
113+ // run test in headed mode
114+ utils . setHeaded ( bsConfig , args ) ;
115+
116+ // set the no-wrap
117+ utils . setNoWrap ( bsConfig , args ) ;
118+
119+ // add cypress dependency if missing
120+ utils . setCypressNpmDependency ( bsConfig ) ;
121+ }
122+
83123 const { packagesInstalled } = await packageInstaller . packageSetupAndInstaller ( bsConfig , config . packageDirName , { markBlockStart, markBlockEnd} ) ;
84124
125+ if ( isBrowserstackInfra ) {
126+ // set node version
127+ utils . setNodeVersion ( bsConfig , args ) ;
128+
129+ //set browsers
130+ await utils . setBrowsers ( bsConfig , args ) ;
131+
132+ //set config (--config)
133+ utils . setConfig ( bsConfig , args ) ;
134+
135+ // set sync/async mode (--async/--sync)
136+ utils . setCLIMode ( bsConfig , args ) ;
137+
138+ // set other cypress configs e.g. reporter and reporter-options
139+ utils . setOtherConfigs ( bsConfig , args ) ;
140+ }
141+
85142 markBlockEnd ( 'setConfig' ) ;
86143 logger . debug ( "Completed setting the configs" ) ;
87144
0 commit comments