@@ -12,6 +12,7 @@ it('shows tutors', async () => {
1212 router_mode : 'history' ,
1313 api_root : 'https://socket.tutorcruncher.com' ,
1414 mode : 'grid' ,
15+ messages : { no_tutors_found : 'xx' } ,
1516 event_callback : ( ) => null ,
1617 }
1718 const wrapper = enz . mount ( < Router > < App config = { config } public_key = { 'good' } url_generator = { u => u } /> </ Router > )
@@ -22,16 +23,17 @@ it('shows tutors', async () => {
2223 expect ( xhr_calls [ 1 ] ) . toEqual ( {
2324 method : 'GET' ,
2425 url : 'https://socket.tutorcruncher.com/good/contractors' ,
25- args : null
26+ args : 'page=1'
2627 } )
27- expect ( wrapper . find ( '.tcs-col ' ) . length ) . toBe ( 2 )
28+ expect ( wrapper . find ( '.tcs-item ' ) . length ) . toBe ( 2 )
2829} )
2930
3031it ( 'with con filter' , async ( ) => {
3132 const config = {
3233 router_mode : 'history' ,
3334 api_root : 'https://socket.tutorcruncher.com' ,
3435 mode : 'grid' ,
36+ messages : { no_tutors_found : 'xx' } ,
3537 contractor_filter : {
3638 label : [ 'foobar' ] ,
3739 label_exclude : [ 'spam' ] ,
@@ -45,7 +47,7 @@ it('with con filter', async () => {
4547 expect ( xhr_calls [ 1 ] ) . toEqual ( {
4648 method : 'GET' ,
4749 url : 'https://socket.tutorcruncher.com/good/contractors' ,
48- args : 'label=foobar&label_exclude=spam'
50+ args : 'label=foobar&label_exclude=spam&page=1 '
4951 } )
50- expect ( wrapper . find ( '.tcs-col ' ) . length ) . toBe ( 2 )
52+ expect ( wrapper . find ( '.tcs-item ' ) . length ) . toBe ( 2 )
5153} )
0 commit comments