@@ -23,13 +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
- setTestObservabilityFlags,
29
- runCypressTestsLocally,
30
- printBuildLink
31
- } = require ( '../testObservability/helper/helper' ) ;
32
-
33
26
module . exports = function run ( args , rawArgs ) {
34
27
35
28
markBlockStart ( 'preBuild' ) ;
@@ -52,12 +45,6 @@ module.exports = function run(args, rawArgs) {
52
45
logger . debug ( 'Completed browserstack.json validation' ) ;
53
46
markBlockStart ( 'setConfig' ) ;
54
47
logger . debug ( 'Started setting the configs' ) ;
55
-
56
- /*
57
- Set testObservability & browserstackAutomation flags
58
- */
59
- const [ isTestObservabilitySession , isBrowserstackInfra ] = setTestObservabilityFlags ( bsConfig ) ;
60
-
61
48
utils . setUsageReportingFlag ( bsConfig , args . disableUsageReporting ) ;
62
49
63
50
utils . setDefaults ( bsConfig , args ) ;
@@ -68,97 +55,80 @@ module.exports = function run(args, rawArgs) {
68
55
// accept the access key from command line or env variable if provided
69
56
utils . setAccessKey ( bsConfig , args ) ;
70
57
71
- let buildReportData = ! isBrowserstackInfra ? null : await getInitialDetails ( bsConfig , args , rawArgs ) ;
58
+ let buildReportData = await getInitialDetails ( bsConfig , args , rawArgs ) ;
72
59
73
60
// accept the build name from command line if provided
74
61
utils . setBuildName ( bsConfig , args ) ;
75
62
76
63
// set cypress config filename
77
64
utils . setCypressConfigFilename ( bsConfig , args ) ;
78
-
79
- if ( isBrowserstackInfra ) {
80
- // set cypress test suite type
81
- utils . setCypressTestSuiteType ( bsConfig ) ;
82
65
83
- // set cypress geo location
84
- utils . setGeolocation ( bsConfig , args ) ;
66
+ // set cypress test suite type
67
+ utils . setCypressTestSuiteType ( bsConfig ) ;
85
68
86
- // set timezone
87
- utils . setTimezone ( bsConfig , args ) ;
69
+ // set cypress geo location
70
+ utils . setGeolocation ( bsConfig , args ) ;
71
+
72
+ // set timezone
73
+ utils . setTimezone ( bsConfig , args ) ;
74
+
75
+ // set spec timeout
76
+ utils . setSpecTimeout ( bsConfig , args ) ;
88
77
89
- // set spec timeout
90
- utils . setSpecTimeout ( bsConfig , args ) ;
91
- }
92
-
93
78
// accept the specs list from command line if provided
94
79
utils . setUserSpecs ( bsConfig , args ) ;
95
80
96
81
// accept the env list from command line and set it
97
82
utils . setTestEnvs ( bsConfig , args ) ;
98
83
99
- // set build tag caps
100
- utils . setBuildTags ( bsConfig , args ) ;
101
-
102
- /*
103
- Send build start to Observability
104
- */
105
- if ( isTestObservabilitySession ) await launchTestSession ( bsConfig , bsConfigPath ) ;
106
-
107
84
// accept the system env list from bsconf and set it
108
85
utils . setSystemEnvs ( bsConfig ) ;
109
86
110
- if ( isBrowserstackInfra ) {
111
- //accept the local from env variable if provided
112
- utils . setLocal ( bsConfig , args ) ;
87
+ //accept the local from env variable if provided
88
+ utils . setLocal ( bsConfig , args ) ;
113
89
114
- //set network logs
115
- utils . setNetworkLogs ( bsConfig ) ;
90
+ //set network logs
91
+ utils . setNetworkLogs ( bsConfig ) ;
116
92
117
- // set Local Mode (on-demand/ always-on)
118
- utils . setLocalMode ( bsConfig , args ) ;
93
+ // set Local Mode (on-demand/ always-on)
94
+ utils . setLocalMode ( bsConfig , args ) ;
119
95
120
- //accept the local identifier from env variable if provided
121
- utils . setLocalIdentifier ( bsConfig , args ) ;
96
+ //accept the local identifier from env variable if provided
97
+ utils . setLocalIdentifier ( bsConfig , args ) ;
122
98
123
- // set Local Config File
124
- utils . setLocalConfigFile ( bsConfig , args ) ;
99
+ // set Local Config File
100
+ utils . setLocalConfigFile ( bsConfig , args ) ;
125
101
126
- // run test in headed mode
127
- utils . setHeaded ( bsConfig , args ) ;
102
+ // run test in headed mode
103
+ utils . setHeaded ( bsConfig , args ) ;
128
104
129
- // set the no-wrap
130
- utils . setNoWrap ( bsConfig , args ) ;
105
+ // set the no-wrap
106
+ utils . setNoWrap ( bsConfig , args ) ;
131
107
132
- // add cypress dependency if missing
133
- utils . setCypressNpmDependency ( bsConfig ) ;
134
- }
135
-
136
- const { packagesInstalled } = ! isBrowserstackInfra ? false : await packageInstaller . packageSetupAndInstaller ( bsConfig , config . packageDirName , { markBlockStart, markBlockEnd} ) ;
108
+ // add cypress dependency if missing
109
+ utils . setCypressNpmDependency ( bsConfig ) ;
137
110
138
- if ( isBrowserstackInfra ) {
139
- // set node version
140
- utils . setNodeVersion ( bsConfig , args ) ;
111
+ const { packagesInstalled } = await packageInstaller . packageSetupAndInstaller ( bsConfig , config . packageDirName , { markBlockStart, markBlockEnd} ) ;
141
112
142
- //set browsers
143
- await utils . setBrowsers ( bsConfig , args ) ;
113
+ // set build tag caps
114
+ utils . setBuildTags ( bsConfig , args ) ;
115
+ // set node version
116
+ utils . setNodeVersion ( bsConfig , args ) ;
144
117
145
- //set config (--config)
146
- utils . setConfig ( bsConfig , args ) ;
118
+ //set browsers
119
+ await utils . setBrowsers ( bsConfig , args ) ;
147
120
148
- // set sync/async mode (--async/--sync )
149
- utils . setCLIMode ( bsConfig , args ) ;
121
+ // set config (--config )
122
+ utils . setConfig ( bsConfig , args ) ;
150
123
151
- // set other cypress configs e.g. reporter and reporter-options
152
- utils . setOtherConfigs ( bsConfig , args ) ;
153
- }
124
+ // set sync/async mode (--async/--sync)
125
+ utils . setCLIMode ( bsConfig , args ) ;
154
126
127
+ // set other cypress configs e.g. reporter and reporter-options
128
+ utils . setOtherConfigs ( bsConfig , args ) ;
155
129
markBlockEnd ( 'setConfig' ) ;
156
130
logger . debug ( "Completed setting the configs" ) ;
157
131
158
- if ( ! isBrowserstackInfra ) {
159
- return runCypressTestsLocally ( bsConfig , args , rawArgs ) ;
160
- }
161
-
162
132
// Validate browserstack.json values and parallels specified via arguments
163
133
markBlockStart ( 'validateConfig' ) ;
164
134
logger . debug ( "Started configs validation" ) ;
@@ -317,10 +287,7 @@ module.exports = function run(args, rawArgs) {
317
287
318
288
logger . info ( message ) ;
319
289
logger . info ( dashboardLink ) ;
320
- if ( ! args . sync ) {
321
- logger . info ( Constants . userMessages . EXIT_SYNC_CLI_MESSAGE . replace ( "<build-id>" , data . build_id ) ) ;
322
- printBuildLink ( false ) ;
323
- }
290
+ if ( ! args . sync ) logger . info ( Constants . userMessages . EXIT_SYNC_CLI_MESSAGE . replace ( "<build-id>" , data . build_id ) ) ;
324
291
let dataToSend = {
325
292
time_components : getTimeComponents ( ) ,
326
293
unique_id : utils . generateUniqueHash ( ) ,
0 commit comments