@@ -1297,7 +1297,7 @@ exports.setVideoCliConfig = (bsConfig, videoConfig) => {
1297
1297
let cypress_major_version = ( user_cypress_version && user_cypress_version . match ( / ^ ( \d + ) / ) ) ? user_cypress_version . split ( "." ) [ 0 ] : undefined ;
1298
1298
let config_args = ( bsConfig && bsConfig . run_settings && bsConfig . run_settings . config ) ? bsConfig . run_settings . config : undefined ;
1299
1299
if ( this . isUndefined ( user_cypress_version ) || this . isUndefined ( cypress_major_version ) || parseInt ( cypress_major_version ) >= 13 ) {
1300
- logger . info ( 'Setting default video for cypress 13 and above' ) ;
1300
+ logger . debug ( 'Setting default video for cypress 13 and above' ) ;
1301
1301
let video_args = `video=${ videoConfig . video } ,videoUploadOnPasses=${ videoConfig . videoUploadOnPasses } ` ;
1302
1302
config_args = this . isUndefined ( config_args ) ? video_args : config_args + ',' + video_args ;
1303
1303
logger . debug ( `Setting video true in cli for cypress version ${ user_cypress_version } with cli args - ${ config_args } ` )
@@ -1321,9 +1321,14 @@ exports.setEnforceSettingsConfig = (bsConfig) => {
1321
1321
logger . debug ( `Setting base_url_args for enforce_settings to ${ base_url_args } ` ) ;
1322
1322
}
1323
1323
// set specs in config of specpattern to override cypress config
1324
- if ( this . isNotUndefined ( bsConfig . run_settings . specs ) && bsConfig . run_settings . cypressTestSuiteType === Constants . CYPRESS_V10_AND_ABOVE_TYPE ) {
1324
+ if ( this . isNotUndefined ( bsConfig . run_settings . specs ) && bsConfig . run_settings . cypressTestSuiteType === Constants . CYPRESS_V10_AND_ABOVE_TYPE && ( this . isUndefined ( config_args ) || ! config_args . includes ( "specPattern" ) ) ) {
1325
1325
// doing this only for cypress 10 and above as --spec is given precedence for cypress 9.
1326
- let spec_pattern_args = 'specPattern="' + bsConfig . run_settings . specs + '"' ;
1326
+ let specConfigs = bsConfig . run_settings . specs ;
1327
+ // if multiple specs are passed, convert it into an array.
1328
+ if ( specConfigs && specConfigs . includes ( ',' ) ) {
1329
+ specConfigs = JSON . stringify ( bsConfig . run_settings . specs . split ( ',' ) ) ;
1330
+ }
1331
+ let spec_pattern_args = 'specPattern="' + specConfigs + '"' ;
1327
1332
config_args = this . isUndefined ( config_args ) ? spec_pattern_args : config_args + ',' + spec_pattern_args ;
1328
1333
}
1329
1334
if ( this . isNotUndefined ( config_args ) ) bsConfig [ "run_settings" ] [ "config" ] = config_args ;
0 commit comments