This repository was archived by the owner on Feb 23, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -36,8 +36,12 @@ class InfoAction {
3636 msg : `Syncing to chain (block: ${ response . block_height } )` ,
3737 wait : true ,
3838 } ) ;
39- log . info ( `Syncing to chain ... block height: ${ response . block_height } ` ) ;
4039 this . _store . percentSynced = this . calcPercentSynced ( response ) ;
40+ } else {
41+ this . _notification . display ( {
42+ type : 'success' ,
43+ msg : 'Syncing complete' ,
44+ } ) ;
4145 }
4246 return response . synced_to_chain ;
4347 } catch ( err ) {
Original file line number Diff line number Diff line change @@ -55,13 +55,16 @@ describe('Action Info Unit Tests', () => {
5555 } ) ;
5656 } ) ;
5757
58- it ( 'should not show notification if synced' , async ( ) => {
58+ it ( 'should show completed notification if synced' , async ( ) => {
5959 grpc . sendCommand . withArgs ( 'getInfo' ) . resolves ( {
6060 synced_to_chain : true ,
61- block_height : 1234 ,
6261 } ) ;
6362 await info . getInfo ( ) ;
64- expect ( notification . display , 'was not called' ) ;
63+ expect ( notification . display , 'was called once' ) ;
64+ expect ( notification . display , 'was called with' , {
65+ type : 'success' ,
66+ msg : 'Syncing complete' ,
67+ } ) ;
6568 } ) ;
6669
6770 it ( 'should return true if chain is synced' , async ( ) => {
You can’t perform that action at this time.
0 commit comments