File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -1755,15 +1755,14 @@ exports.getVideoConfig = (cypressConfig, bsConfig = {}) => {
17551755 video : true ,
17561756 videoUploadOnPasses : true
17571757 }
1758- // Reading bsconfig in case of enforce_settings
1759- if ( this . isUndefined ( bsConfig . run_settings ) || this . isUndefinedOrFalse ( bsConfig . run_settings . enforce_settings ) ) {
1760- if ( ! this . isUndefined ( cypressConfig . video ) ) conf . video = cypressConfig . video ;
1761- if ( ! this . isUndefined ( cypressConfig . videoUploadOnPasses ) ) conf . videoUploadOnPasses = cypressConfig . videoUploadOnPasses ;
1762- }
1763- else {
1764- if ( ! this . isUndefined ( bsConfig . run_settings ) && ! this . isUndefined ( bsConfig . run_settings . video ) ) conf . video = bsConfig . run_settings . video ;
1765- if ( ! this . isUndefined ( bsConfig . run_settings ) && ! this . isUndefined ( bsConfig . run_settings . videoUploadOnPasses ) ) conf . videoUploadOnPasses = bsConfig . run_settings . videoUploadOnPasses ;
1766- }
1758+
1759+ // here if we have enforce_setting: true then cypressConfig will be {} as we are not reading cypress.config.js file in that case
1760+ if ( ! this . isUndefined ( bsConfig . run_settings ) && ! this . isUndefined ( bsConfig . run_settings . video ) ) conf . video = bsConfig . run_settings . video ;
1761+ if ( ! this . isUndefined ( bsConfig . run_settings ) && ! this . isUndefined ( bsConfig . run_settings . videoUploadOnPasses ) ) conf . videoUploadOnPasses = bsConfig . run_settings . videoUploadOnPasses ;
1762+ if ( ! this . isUndefined ( cypressConfig . video ) ) { conf . video = cypressConfig . video ; }
1763+ if ( ! this . isUndefined ( cypressConfig . videoUploadOnPasses ) ) { conf . videoUploadOnPasses = cypressConfig . videoUploadOnPasses ; }
1764+ if ( ! this . isUndefined ( cypressConfig . e2e ) && ! this . isUndefined ( cypressConfig . e2e . video ) ) { conf . video = cypressConfig . e2e . video ; }
1765+ if ( ! this . isUndefined ( cypressConfig . e2e ) && ! this . isUndefined ( cypressConfig . e2e . videoUploadOnPasses ) ) { conf . videoUploadOnPasses = cypressConfig . e2e . videoUploadOnPasses ; }
17671766
17681767 // set video in cli config in case of cypress 13 or above as default value is false there.
17691768 this . setVideoCliConfig ( bsConfig , conf ) ;
You can’t perform that action at this time.
0 commit comments