@@ -32,45 +32,50 @@ describe('MinimapFindAndReplace', () => {
3232 describe ( 'when find-and-replace is closed' , ( ) => {
3333 beforeEach ( ( ) => {
3434 atom . commands . dispatch ( workspace , 'find-and-replace:show' )
35- spyOn ( MinimapFindAndReplace , 'clearBindings ' )
35+ spyOn ( MinimapFindAndReplace , 'changeVisible ' )
3636 } )
3737
3838 it ( 'should clear on core:cancel' , ( ) => {
3939 atom . commands . dispatch ( workspace , 'core:cancel' )
40- expect ( MinimapFindAndReplace . clearBindings ) . toHaveBeenCalledTimes ( 1 )
40+ expect ( MinimapFindAndReplace . changeVisible ) . toHaveBeenCalledTimes ( 1 )
41+ expect ( MinimapFindAndReplace . changeVisible ) . toHaveBeenCalledWith ( false )
4142 } )
4243
4344 it ( 'should clear on find-and-replace:toggle' , ( ) => {
4445 atom . commands . dispatch ( workspace , 'find-and-replace:toggle' )
45- atom . commands . dispatch ( workspace , 'find-and-replace:toggle' )
46- expect ( MinimapFindAndReplace . clearBindings ) . toHaveBeenCalledTimes ( 1 )
46+ expect ( MinimapFindAndReplace . changeVisible ) . toHaveBeenCalledTimes ( 1 )
47+ expect ( MinimapFindAndReplace . changeVisible ) . toHaveBeenCalledWith ( false )
4748 } )
4849
4950 it ( 'should clear on close button pressed' , ( ) => {
5051 document . querySelector ( '.find-and-replace .close-button' ) . click ( )
51- expect ( MinimapFindAndReplace . clearBindings ) . toHaveBeenCalledTimes ( 1 )
52+ expect ( MinimapFindAndReplace . changeVisible ) . toHaveBeenCalledTimes ( 1 )
53+ expect ( MinimapFindAndReplace . changeVisible ) . toHaveBeenCalledWith ( false )
5254 } )
5355 } )
5456
5557 describe ( 'when find-and-replace is opened' , ( ) => {
5658 beforeEach ( ( ) => {
5759 atom . commands . dispatch ( workspace , 'core:cancel' )
58- spyOn ( MinimapFindAndReplace , 'discoverMarkers ' )
60+ spyOn ( MinimapFindAndReplace , 'changeVisible ' )
5961 } )
6062
6163 it ( 'should display markers on find-and-replace:show' , ( ) => {
6264 atom . commands . dispatch ( workspace , 'find-and-replace:show' )
63- expect ( MinimapFindAndReplace . discoverMarkers ) . toHaveBeenCalledTimes ( 1 )
65+ expect ( MinimapFindAndReplace . changeVisible ) . toHaveBeenCalledTimes ( 1 )
66+ expect ( MinimapFindAndReplace . changeVisible ) . toHaveBeenCalledWith ( true )
6467 } )
6568
6669 it ( 'should display markers on find-and-replace:show-replace' , ( ) => {
6770 atom . commands . dispatch ( workspace , 'find-and-replace:show-replace' )
68- expect ( MinimapFindAndReplace . discoverMarkers ) . toHaveBeenCalledTimes ( 1 )
71+ expect ( MinimapFindAndReplace . changeVisible ) . toHaveBeenCalledTimes ( 1 )
72+ expect ( MinimapFindAndReplace . changeVisible ) . toHaveBeenCalledWith ( true )
6973 } )
7074
7175 it ( 'should display markers on find-and-replace:toggle' , ( ) => {
7276 atom . commands . dispatch ( workspace , 'find-and-replace:toggle' )
73- expect ( MinimapFindAndReplace . discoverMarkers ) . toHaveBeenCalledTimes ( 1 )
77+ expect ( MinimapFindAndReplace . changeVisible ) . toHaveBeenCalledTimes ( 1 )
78+ expect ( MinimapFindAndReplace . changeVisible ) . toHaveBeenCalledWith ( true )
7479 } )
7580 } )
7681 } )
0 commit comments