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 @@ -1754,15 +1754,14 @@ exports.getVideoConfig = (cypressConfig, bsConfig = {}) => {
17541754 video : true ,
17551755 videoUploadOnPasses : true
17561756 }
1757- // Reading bsconfig in case of enforce_settings
1758- if ( this . isUndefined ( bsConfig . run_settings ) || this . isUndefinedOrFalse ( bsConfig . run_settings . enforce_settings ) ) {
1759- if ( ! this . isUndefined ( cypressConfig . video ) ) conf . video = cypressConfig . video ;
1760- if ( ! this . isUndefined ( cypressConfig . videoUploadOnPasses ) ) conf . videoUploadOnPasses = cypressConfig . videoUploadOnPasses ;
1761- }
1762- else {
1763- if ( ! this . isUndefined ( bsConfig . run_settings ) && ! this . isUndefined ( bsConfig . run_settings . video ) ) conf . video = bsConfig . run_settings . video ;
1764- if ( ! this . isUndefined ( bsConfig . run_settings ) && ! this . isUndefined ( bsConfig . run_settings . videoUploadOnPasses ) ) conf . videoUploadOnPasses = bsConfig . run_settings . videoUploadOnPasses ;
1765- }
1757+
1758+ // here if we have enforce_setting: true then cypressConfig will be {} as we are not reading cypress.config.js file in that case
1759+ if ( ! this . isUndefined ( bsConfig . run_settings ) && ! this . isUndefined ( bsConfig . run_settings . video ) ) conf . video = bsConfig . run_settings . video ;
1760+ if ( ! this . isUndefined ( bsConfig . run_settings ) && ! this . isUndefined ( bsConfig . run_settings . videoUploadOnPasses ) ) conf . videoUploadOnPasses = bsConfig . run_settings . videoUploadOnPasses ;
1761+ if ( ! this . isUndefined ( cypressConfig . video ) ) { conf . video = cypressConfig . video ; }
1762+ if ( ! this . isUndefined ( cypressConfig . videoUploadOnPasses ) ) { conf . videoUploadOnPasses = cypressConfig . videoUploadOnPasses ; }
1763+ if ( ! this . isUndefined ( cypressConfig . e2e ) && ! this . isUndefined ( cypressConfig . e2e . video ) ) { conf . video = cypressConfig . e2e . video ; }
1764+ if ( ! this . isUndefined ( cypressConfig . e2e ) && ! this . isUndefined ( cypressConfig . e2e . videoUploadOnPasses ) ) { conf . videoUploadOnPasses = cypressConfig . e2e . videoUploadOnPasses ; }
17661765
17671766 // set video in cli config in case of cypress 13 or above as default value is false there.
17681767 this . setVideoCliConfig ( bsConfig , conf ) ;
You can’t perform that action at this time.
0 commit comments