@@ -23,23 +23,6 @@ const archiver = require("../helpers/archiver"),
23
23
packageDiff = require ( '../helpers/package-diff' ) ;
24
24
const { getStackTraceUrl } = require ( '../helpers/sync/syncSpecsLogs' ) ;
25
25
26
- // const {
27
- // launchTestSession,
28
- // setEventListeners,
29
- // setTestObservabilityFlags,
30
- // runCypressTestsLocally,
31
- // printBuildLink
32
- // } = require('../testObservability/helper/helper');
33
-
34
-
35
- // const {
36
- // createAccessibilityTestRun,
37
- // setAccessibilityEventListeners,
38
- // checkAccessibilityPlatform,
39
- // supportFileCleanup
40
- // } = require('../accessibility-automation/helper');
41
- // const { isTurboScaleSession, getTurboScaleGridDetails, patchCypressConfigFileContent, atsFileCleanup } = require('../helpers/atsHelper');
42
-
43
26
module . exports = function run ( args , rawArgs ) {
44
27
45
28
markBlockStart ( 'preBuild' ) ;
@@ -66,12 +49,6 @@ module.exports = function run(args, rawArgs) {
66
49
// set cypress config filename
67
50
utils . setCypressConfigFilename ( bsConfig , args ) ;
68
51
69
- /*
70
- Set testObservability & browserstackAutomation flags
71
- */
72
- // const [isTestObservabilitySession, isBrowserstackInfra] = setTestObservabilityFlags(bsConfig);
73
- // const checkAccessibility = checkAccessibilityPlatform(bsConfig);
74
- // const isAccessibilitySession = bsConfig.run_settings.accessibility || checkAccessibility;
75
52
const turboScaleSession = false ;
76
53
// Constants.turboScaleObj.enabled = turboScaleSession;
77
54
@@ -90,19 +67,6 @@ module.exports = function run(args, rawArgs) {
90
67
// accept the build name from command line if provided
91
68
utils . setBuildName ( bsConfig , args ) ;
92
69
93
- // if(isBrowserstackInfra) {
94
- // // set cypress test suite type
95
- // utils.setCypressTestSuiteType(bsConfig);
96
-
97
- // // set cypress geo location
98
- // utils.setGeolocation(bsConfig, args);
99
-
100
- // // set timezone
101
- // utils.setTimezone(bsConfig, args);
102
-
103
- // // set spec timeout
104
- // utils.setSpecTimeout(bsConfig, args);
105
- // }
106
70
107
71
// accept the specs list from command line if provided
108
72
utils . setUserSpecs ( bsConfig , args ) ;
@@ -112,107 +76,19 @@ module.exports = function run(args, rawArgs) {
112
76
113
77
// set build tag caps
114
78
utils . setBuildTags ( bsConfig , args ) ;
115
-
116
- /*
117
- Send build start to Observability
118
- */
119
- // if(isTestObservabilitySession) {
120
- // await launchTestSession(bsConfig, bsConfigPath);
121
- // utils.setO11yProcessHooks(null, bsConfig, args, null, buildReportData);
122
- // }
123
79
124
80
// accept the system env list from bsconf and set it
125
81
utils . setSystemEnvs ( bsConfig ) ;
126
82
127
- // if(isBrowserstackInfra) {
128
- // //accept the local from env variable if provided
129
- // utils.setLocal(bsConfig, args);
130
-
131
- // //set network logs
132
- // utils.setNetworkLogs(bsConfig);
133
-
134
- // // set Local Mode (on-demand/ always-on)
135
- // utils.setLocalMode(bsConfig, args);
136
-
137
- // //accept the local identifier from env variable if provided
138
- // utils.setLocalIdentifier(bsConfig, args);
139
-
140
- // // set Local Config File
141
- // utils.setLocalConfigFile(bsConfig, args);
142
-
143
- // // run test in headed mode
144
- // utils.setHeaded(bsConfig, args);
145
-
146
- // // set the no-wrap
147
- // utils.setNoWrap(bsConfig, args);
148
-
149
- // // add cypress dependency if missing
150
- // utils.setCypressNpmDependency(bsConfig);
151
-
152
- // if (isAccessibilitySession && isBrowserstackInfra) {
153
- // await createAccessibilityTestRun(bsConfig);
154
- // }
155
-
156
- // if (turboScaleSession) {
157
- // // Local is only required in case user is running on trial grid and wants to access private website.
158
- // // Even then, it will be spawned separately via browserstack-cli ats connect-grid command and not via browserstack-cypress-cli
159
- // // Hence whenever running on ATS, need to make local as false
160
- // bsConfig.connection_settings.local = false;
161
-
162
- // const gridDetails = await getTurboScaleGridDetails(bsConfig, args, rawArgs);
163
-
164
- // if (gridDetails && Object.keys(gridDetails).length > 0) {
165
- // Constants.turboScaleObj.gridDetails = gridDetails;
166
- // Constants.turboScaleObj.gridUrl = gridDetails.cypressUrl;
167
- // Constants.turboScaleObj.uploadUrl = gridDetails.cypressUrl + '/upload';
168
- // Constants.turboScaleObj.buildUrl = gridDetails.cypressUrl + '/build';
169
-
170
- // logger.debug(`Automate TurboScale Grid URL set to ${gridDetails.url}`);
171
-
172
- // patchCypressConfigFileContent(bsConfig);
173
- // } else {
174
- // process.exitCode = Constants.ERROR_EXIT_CODE;
175
- // return;
176
- // }
177
- // }
178
- // }
179
-
180
83
const { packagesInstalled } = await packageInstaller . packageSetupAndInstaller ( bsConfig , config . packageDirName , { markBlockStart, markBlockEnd} ) ;
181
84
182
- // if(isBrowserstackInfra) {
183
- // // set node version
184
- // utils.setNodeVersion(bsConfig, args);
185
-
186
- // //set browsers
187
- // await utils.setBrowsers(bsConfig, args);
188
-
189
- // //set config (--config)
190
- // utils.setConfig(bsConfig, args);
191
-
192
- // // set sync/async mode (--async/--sync)
193
- // utils.setCLIMode(bsConfig, args);
194
-
195
- // // set other cypress configs e.g. reporter and reporter-options
196
- // utils.setOtherConfigs(bsConfig, args);
197
- // }
198
-
199
85
markBlockEnd ( 'setConfig' ) ;
200
86
logger . debug ( "Completed setting the configs" ) ;
201
87
202
- // if(!isBrowserstackInfra) {
203
- // return runCypressTestsLocally(bsConfig, args, rawArgs);
204
- // }
205
-
206
88
// Validate browserstack.json values and parallels specified via arguments
207
89
markBlockStart ( 'validateConfig' ) ;
208
90
logger . debug ( "Started configs validation" ) ;
209
91
return capabilityHelper . validate ( bsConfig , args ) . then ( function ( cypressConfigFile ) {
210
- // if(process.env.BROWSERSTACK_TEST_ACCESSIBILITY) {
211
- // setAccessibilityEventListeners(bsConfig);
212
- // }
213
- // if(process.env.BS_TESTOPS_BUILD_COMPLETED) {
214
- // setEventListeners(bsConfig);
215
- // }
216
92
markBlockEnd ( 'validateConfig' ) ;
217
93
logger . debug ( "Completed configs validation" ) ;
218
94
markBlockStart ( 'preArchiveSteps' ) ;
@@ -290,14 +166,6 @@ module.exports = function run(args, rawArgs) {
290
166
markBlockEnd ( 'zip.zipUpload' ) ;
291
167
markBlockEnd ( 'zip' ) ;
292
168
293
- // if (process.env.BROWSERSTACK_TEST_ACCESSIBILITY === 'true') {
294
- // supportFileCleanup();
295
- // }
296
-
297
- // if (turboScaleSession) {
298
- // atsFileCleanup(bsConfig);
299
- // }
300
-
301
169
// Set config args for enforce_settings
302
170
if ( ! utils . isUndefinedOrFalse ( bsConfig . run_settings . enforce_settings ) ) {
303
171
markBlockStart ( 'setEnforceSettingsConfig' ) ;
@@ -322,9 +190,6 @@ module.exports = function run(args, rawArgs) {
322
190
markBlockEnd ( 'createBuild' ) ;
323
191
markBlockEnd ( 'total' ) ;
324
192
utils . setProcessHooks ( data . build_id , bsConfig , bs_local , args , buildReportData ) ;
325
- // if(isTestObservabilitySession) {
326
- // utils.setO11yProcessHooks(data.build_id, bsConfig, bs_local, args, buildReportData);
327
- // }
328
193
let message = `${ data . message } ! ${ Constants . userMessages . BUILD_CREATED } with build id: ${ data . build_id } ` ;
329
194
let dashboardLink = `${ Constants . userMessages . VISIT_DASHBOARD } ${ data . dashboard_url } ` ;
330
195
buildReportData = { 'build_id' : data . build_id , 'parallels' : userSpecifiedParallels , ...buildReportData }
@@ -399,7 +264,6 @@ module.exports = function run(args, rawArgs) {
399
264
logger . info ( dashboardLink ) ;
400
265
if ( ! args . sync ) {
401
266
logger . info ( Constants . userMessages . EXIT_SYNC_CLI_MESSAGE . replace ( "<build-id>" , data . build_id ) ) ;
402
- // printBuildLink(false);
403
267
}
404
268
let dataToSend = {
405
269
time_components : getTimeComponents ( ) ,
0 commit comments