11describe ( 'Rolling Upgrades' , ( ) => {
2+ let DEV_VERSION = "" ;
3+
4+ before ( ( ) => {
5+ cy . request ( {
6+ method : 'GET' ,
7+ url : 'http://localhost:51222/rest/v2/container' ,
8+ auth : {
9+ username : Cypress . env ( 'username' ) ,
10+ password : Cypress . env ( 'password' )
11+ } ,
12+ headers : {
13+ 'Content-Type' : 'application/json' ,
14+ } ,
15+ } ) . then ( json => {
16+ DEV_VERSION = json [ 'version' ] ;
17+ } ) ;
18+ } ) ;
219
320 it ( 'successfully shows the rolling upgrades detection message in NYC' , ( ) => {
421 cy . origin ( 'http://localhost:31222/console/' , ( ) => {
@@ -29,10 +46,10 @@ describe('Rolling Upgrades', () => {
2946 }
3047 } ) ;
3148 cy . get ( '[data-cy=sideBarToggle]' ) . click ( ) ;
32- cy . contains ( "2 members in use" ) ;
3349 cy . contains ( "Rolling Upgrade in Progress — Some features may be temporarily unavailable" ) ;
50+ cy . contains ( "2 members in use" ) ;
3451 cy . contains ( "16.0.0.Dev08" ) ;
35- cy . contains ( "16.0.2-SNAPSHOT" ) ;
52+ cy . contains ( DEV_VERSION ) ;
3653
3754 // Restarting the docker container with same version and waiting for 20seconds to server to come up, reloading the page
3855 cy . exec ( 'bash restart_server_with_latest_version.sh > ~/log.log' , 120000 ) . then ( ( result ) => {
@@ -45,7 +62,7 @@ describe('Rolling Upgrades', () => {
4562 cy . contains ( "2 members in use" ) ;
4663 cy . contains ( "Upgrade Complete — Please clear your browser cache and reconnect to see the latest console version." ) ;
4764 cy . contains ( "16.0.0.Dev08" ) . should ( 'not.exist' ) ;
48- cy . contains ( "16.0.2-SNAPSHOT" ) ;
65+ cy . contains ( DEV_VERSION ) ;
4966 } )
5067 } ) ;
5168
0 commit comments