File tree Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -333,14 +333,10 @@ exports.setCypressNpmDependency = (bsConfig) => {
333
333
if ( runSettings . npm_dependencies !== undefined &&
334
334
Object . keys ( runSettings . npm_dependencies ) . length !== 0 &&
335
335
typeof runSettings . npm_dependencies === 'object' ) {
336
- if ( ! ( "cypress" in runSettings . npm_dependencies ) ) {
336
+ if ( ! ( "cypress" in runSettings . npm_dependencies ) && Constants . CYPRESS_V10_AND_ABOVE_TYPE ) {
337
337
logger . warn ( "Missing cypress not found in npm_dependencies" ) ;
338
338
if ( "cypress_version" in runSettings ) {
339
- if ( runSettings . cypress_version . toString ( ) . match ( Constants . LATEST_VERSION_SYNTAX_REGEX ) ) {
340
- runSettings . npm_dependencies . cypress = `^${ runSettings . cypress_version . toString ( ) . split ( "." ) [ 0 ] } `
341
- } else {
342
- runSettings . npm_dependencies . cypress = runSettings . cypress_version ;
343
- }
339
+ runSettings . npm_dependencies . cypress = `^${ runSettings . cypress_version . toString ( ) . split ( "." ) [ 0 ] } ` ;
344
340
} else if ( runSettings . cypressTestSuiteType === Constants . CYPRESS_V10_AND_ABOVE_TYPE ) {
345
341
runSettings . npm_dependencies . cypress = "latest" ;
346
342
}
Original file line number Diff line number Diff line change @@ -3582,7 +3582,7 @@ describe('utils', () => {
3582
3582
} ,
3583
3583
} ;
3584
3584
utils . setCypressNpmDependency ( bsConfig ) ;
3585
- chai . assert . equal ( bsConfig . run_settings . npm_dependencies . cypress , "10.0.0 " ) ;
3585
+ chai . assert . equal ( bsConfig . run_settings . npm_dependencies . cypress , "^10 " ) ;
3586
3586
} ) ;
3587
3587
3588
3588
it ( 'should not set cypress for < 9 cypress version if cypress_version missing' , ( ) => {
You can’t perform that action at this time.
0 commit comments