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) {
4545 //accept the local identifier from env variable if provided
4646 utils . setLocalIdentifier ( bsConfig ) ;
4747
48+ // run test in headed mode
49+ utils . setHeaded ( bsConfig , args ) ;
50+
4851 // Validate browserstack.json values and parallels specified via arguments
4952 return capabilityHelper . validate ( bsConfig , args ) . then ( function ( cypressJson ) {
5053
Original file line number Diff line number Diff line change @@ -93,6 +93,7 @@ const cliMessages = {
9393 ENV_DESCRIPTION : "Specify the environment variables for your spec files" ,
9494 SYNC_DESCRIPTION : "Makes the run command in sync" ,
9595 BUILD_REPORT_MESSAGE : "See the entire build report here" ,
96+ HEADED : "Run tests in headed mode." ,
9697 } ,
9798 COMMON : {
9899 DISABLE_USAGE_REPORTING : "Disable usage reporting" ,
Original file line number Diff line number Diff line change @@ -333,6 +333,12 @@ exports.setLocalIdentifier = (bsConfig) => {
333333 }
334334} ;
335335
336+ exports . setHeaded = ( bsConfig , args ) => {
337+ if ( ! this . isUndefined ( args . headed ) && args . headed === true ) {
338+ bsConfig . run_settings . headless = false ;
339+ }
340+ } ;
341+
336342exports . getNumberOfSpecFiles = ( bsConfig , args , cypressJson ) => {
337343 let testFolderPath = cypressJson . integrationFolder || Constants . DEFAULT_CYPRESS_SPEC_PATH ;
338344 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
200200 default : false ,
201201 describe : Constants . cliMessages . RUN . SYNC_DESCRIPTION ,
202202 type : "boolean"
203+ } ,
204+ 'headed' : {
205+ default : true ,
206+ describe : Constants . cliMessages . RUN . HEADED ,
207+ type : "boolean"
203208 }
204209 } )
205210 . help ( 'help' )
You can’t perform that action at this time.
0 commit comments