File tree Expand file tree Collapse file tree 4 files changed +15
-0
lines changed Expand file tree Collapse file tree 4 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,9 @@ module.exports = function run(args) {
45
45
//accept the local identifier from env variable if provided
46
46
utils . setLocalIdentifier ( bsConfig ) ;
47
47
48
+ // run test in headed mode
49
+ utils . setHeaded ( bsConfig , args ) ;
50
+
48
51
// Validate browserstack.json values and parallels specified via arguments
49
52
return capabilityHelper . validate ( bsConfig , args ) . then ( function ( cypressJson ) {
50
53
Original file line number Diff line number Diff line change @@ -93,6 +93,7 @@ const cliMessages = {
93
93
ENV_DESCRIPTION : "Specify the environment variables for your spec files" ,
94
94
SYNC_DESCRIPTION : "Makes the run command in sync" ,
95
95
BUILD_REPORT_MESSAGE : "See the entire build report here" ,
96
+ HEADED : "Run tests in headed mode." ,
96
97
} ,
97
98
COMMON : {
98
99
DISABLE_USAGE_REPORTING : "Disable usage reporting" ,
Original file line number Diff line number Diff line change @@ -333,6 +333,12 @@ exports.setLocalIdentifier = (bsConfig) => {
333
333
}
334
334
} ;
335
335
336
+ exports . setHeaded = ( bsConfig , args ) => {
337
+ if ( ! this . isUndefined ( args . headed ) && args . headed === true ) {
338
+ bsConfig . run_settings . headless = false ;
339
+ }
340
+ } ;
341
+
336
342
exports . getNumberOfSpecFiles = ( bsConfig , args , cypressJson ) => {
337
343
let testFolderPath = cypressJson . integrationFolder || Constants . DEFAULT_CYPRESS_SPEC_PATH ;
338
344
let globSearchPatttern = bsConfig . run_settings . specs || `${ testFolderPath } /**/*.+(${ Constants . specFileTypes . join ( "|" ) } )` ;
Original file line number Diff line number Diff line change @@ -200,6 +200,11 @@ var argv = yargs
200
200
default : false ,
201
201
describe : Constants . cliMessages . RUN . SYNC_DESCRIPTION ,
202
202
type : "boolean"
203
+ } ,
204
+ 'headed' : {
205
+ default : true ,
206
+ describe : Constants . cliMessages . RUN . HEADED ,
207
+ type : "boolean"
203
208
}
204
209
} )
205
210
. help ( 'help' )
You can’t perform that action at this time.
0 commit comments