@@ -23,23 +23,6 @@ const archiver = require("../helpers/archiver"),
2323 packageDiff = require ( '../helpers/package-diff' ) ;
2424const { getStackTraceUrl } = require ( '../helpers/sync/syncSpecsLogs' ) ;
2525
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-
4326module . exports = function run ( args , rawArgs ) {
4427
4528 markBlockStart ( 'preBuild' ) ;
@@ -66,12 +49,6 @@ module.exports = function run(args, rawArgs) {
6649 // set cypress config filename
6750 utils . setCypressConfigFilename ( bsConfig , args ) ;
6851
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;
7552 const turboScaleSession = false ;
7653 // Constants.turboScaleObj.enabled = turboScaleSession;
7754
@@ -90,19 +67,6 @@ module.exports = function run(args, rawArgs) {
9067 // accept the build name from command line if provided
9168 utils . setBuildName ( bsConfig , args ) ;
9269
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- // }
10670
10771 // accept the specs list from command line if provided
10872 utils . setUserSpecs ( bsConfig , args ) ;
@@ -112,107 +76,19 @@ module.exports = function run(args, rawArgs) {
11276
11377 // set build tag caps
11478 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- // }
12379
12480 // accept the system env list from bsconf and set it
12581 utils . setSystemEnvs ( bsConfig ) ;
12682
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-
18083 const { packagesInstalled } = await packageInstaller . packageSetupAndInstaller ( bsConfig , config . packageDirName , { markBlockStart, markBlockEnd} ) ;
18184
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-
19985 markBlockEnd ( 'setConfig' ) ;
20086 logger . debug ( "Completed setting the configs" ) ;
20187
202- // if(!isBrowserstackInfra) {
203- // return runCypressTestsLocally(bsConfig, args, rawArgs);
204- // }
205-
20688 // Validate browserstack.json values and parallels specified via arguments
20789 markBlockStart ( 'validateConfig' ) ;
20890 logger . debug ( "Started configs validation" ) ;
20991 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- // }
21692 markBlockEnd ( 'validateConfig' ) ;
21793 logger . debug ( "Completed configs validation" ) ;
21894 markBlockStart ( 'preArchiveSteps' ) ;
@@ -290,14 +166,6 @@ module.exports = function run(args, rawArgs) {
290166 markBlockEnd ( 'zip.zipUpload' ) ;
291167 markBlockEnd ( 'zip' ) ;
292168
293- // if (process.env.BROWSERSTACK_TEST_ACCESSIBILITY === 'true') {
294- // supportFileCleanup();
295- // }
296-
297- // if (turboScaleSession) {
298- // atsFileCleanup(bsConfig);
299- // }
300-
301169 // Set config args for enforce_settings
302170 if ( ! utils . isUndefinedOrFalse ( bsConfig . run_settings . enforce_settings ) ) {
303171 markBlockStart ( 'setEnforceSettingsConfig' ) ;
@@ -322,9 +190,6 @@ module.exports = function run(args, rawArgs) {
322190 markBlockEnd ( 'createBuild' ) ;
323191 markBlockEnd ( 'total' ) ;
324192 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- // }
328193 let message = `${ data . message } ! ${ Constants . userMessages . BUILD_CREATED } with build id: ${ data . build_id } ` ;
329194 let dashboardLink = `${ Constants . userMessages . VISIT_DASHBOARD } ${ data . dashboard_url } ` ;
330195 buildReportData = { 'build_id' : data . build_id , 'parallels' : userSpecifiedParallels , ...buildReportData }
@@ -399,7 +264,6 @@ module.exports = function run(args, rawArgs) {
399264 logger . info ( dashboardLink ) ;
400265 if ( ! args . sync ) {
401266 logger . info ( Constants . userMessages . EXIT_SYNC_CLI_MESSAGE . replace ( "<build-id>" , data . build_id ) ) ;
402- // printBuildLink(false);
403267 }
404268 let dataToSend = {
405269 time_components : getTimeComponents ( ) ,
0 commit comments