@@ -50,7 +50,6 @@ module.exports = function run(args, rawArgs) {
50
50
utils . setCypressConfigFilename ( bsConfig , args ) ;
51
51
52
52
const turboScaleSession = false ;
53
- // Constants.turboScaleObj.enabled = turboScaleSession;
54
53
55
54
utils . setUsageReportingFlag ( bsConfig , args . disableUsageReporting ) ;
56
55
@@ -62,11 +61,26 @@ module.exports = function run(args, rawArgs) {
62
61
// accept the access key from command line or env variable if provided
63
62
utils . setAccessKey ( bsConfig , args ) ;
64
63
64
+ const isBrowserstackInfra = true
65
65
let buildReportData = await getInitialDetails ( bsConfig , args , rawArgs ) ;
66
66
67
67
// accept the build name from command line if provided
68
68
utils . setBuildName ( bsConfig , args ) ;
69
69
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
+
70
84
71
85
// accept the specs list from command line if provided
72
86
utils . setUserSpecs ( bsConfig , args ) ;
@@ -80,8 +94,51 @@ module.exports = function run(args, rawArgs) {
80
94
// accept the system env list from bsconf and set it
81
95
utils . setSystemEnvs ( bsConfig ) ;
82
96
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
+
83
123
const { packagesInstalled } = await packageInstaller . packageSetupAndInstaller ( bsConfig , config . packageDirName , { markBlockStart, markBlockEnd} ) ;
84
124
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
+
85
142
markBlockEnd ( 'setConfig' ) ;
86
143
logger . debug ( "Completed setting the configs" ) ;
87
144
0 commit comments