@@ -1297,10 +1297,9 @@ 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 . debug ( 'Setting default video for cypress 13 and above' ) ;
1301
1300
let video_args = `video=${ videoConfig . video } ,videoUploadOnPasses=${ videoConfig . videoUploadOnPasses } ` ;
1302
1301
config_args = this . isUndefined ( config_args ) ? video_args : config_args + ',' + video_args ;
1303
- logger . debug ( `Setting video true in cli for cypress version ${ user_cypress_version } with cli args - ${ config_args } ` )
1302
+ logger . debug ( `Setting default video true for cypress 13 and above in cli for cypress version ${ user_cypress_version } with cli args - ${ config_args } ` )
1304
1303
}
1305
1304
if ( bsConfig . run_settings && this . isNotUndefined ( config_args ) ) bsConfig [ "run_settings" ] [ "config" ] = config_args ;
1306
1305
}
@@ -1553,13 +1552,15 @@ exports.getVideoConfig = (cypressConfig, bsConfig = {}) => {
1553
1552
video : true ,
1554
1553
videoUploadOnPasses : true
1555
1554
}
1556
- // Reading from bsconfig first to give precedance and cypress config will be empty in case of enforce_settings
1557
- if ( ! this . isUndefined ( bsConfig . run_settings ) && ! this . isUndefined ( bsConfig . run_settings . video ) ) conf . video = bsConfig . run_settings . video ;
1558
- if ( ! this . isUndefined ( bsConfig . run_settings ) && ! this . isUndefined ( bsConfig . run_settings . videoUploadOnPasses ) ) conf . videoUploadOnPasses = bsConfig . run_settings . videoUploadOnPasses ;
1555
+ // Reading bsconfig in case of enforce_settings
1559
1556
if ( this . isUndefined ( bsConfig . run_settings ) || this . isUndefinedOrFalse ( bsConfig . run_settings . enforce_settings ) ) {
1560
1557
if ( ! this . isUndefined ( cypressConfig . video ) ) conf . video = cypressConfig . video ;
1561
1558
if ( ! this . isUndefined ( cypressConfig . videoUploadOnPasses ) ) conf . videoUploadOnPasses = cypressConfig . videoUploadOnPasses ;
1562
1559
}
1560
+ else {
1561
+ if ( ! this . isUndefined ( bsConfig . run_settings ) && ! this . isUndefined ( bsConfig . run_settings . video ) ) conf . video = bsConfig . run_settings . video ;
1562
+ if ( ! this . isUndefined ( bsConfig . run_settings ) && ! this . isUndefined ( bsConfig . run_settings . videoUploadOnPasses ) ) conf . videoUploadOnPasses = bsConfig . run_settings . videoUploadOnPasses ;
1563
+ }
1563
1564
1564
1565
// set video in cli config in case of cypress 13 or above as default value is false there.
1565
1566
this . setVideoCliConfig ( bsConfig , conf ) ;
0 commit comments