@@ -30,26 +30,32 @@ async function runner(testname, func) {
3030 let tz = "Europe/Brussels" ;
3131
3232 let A = await sp . get_appointment_types ( PID , true )
33- console . log ( A )
33+ console . log ( { A } )
3434 A . should . have . lengthOf ( 3 ) // default 3
3535
3636 let B = await sp . get_days_available ( PID , A [ 0 ] . id , dateNow ( ) , tz , false )
37- console . log ( B )
37+ console . log ( { B } )
3838 expect ( B . days_available . length ) . to . be . at . least ( 1 ) // at least one day available this month
3939
4040 let C = await sp . get_slots_available ( PID , A [ 0 ] . id , dateNow ( ) , dateTomorrow ( ) , false )
41- console . log ( C )
41+ console . log ( { C } )
4242 expect ( C . slots_available . length ) . to . be . at . least ( 10 ) // each day has 96 15min slots (60*24 / 15 == 96)
4343
4444 let slot = C . slots_available [ 5 ] . date
4545 let D = await sp . complete_booking ( PID , A [ 0 ] . id , slot , tz , 'Ilya' , 'Nevolin' , 'ilya2@nevolin.be' , '111-111-7777' , 'My Contact Type' ) ;
46- console . log ( D )
46+ console . log ( { D } )
4747 D . should . have . property ( 'appointment' )
4848 expect ( D . appointment . length ) . to . equal ( 60 )
4949
50+ let E = await sp . list_appointments ( KEY , 1000 , 0 , PID )
51+ console . log ( { E} )
52+ E . should . have . property ( 'data' )
53+ E . data . should . have . property ( 'appointments' )
54+ expect ( E . data . appointmentsCount ) . to . be . at . least ( 1 )
55+
5056 let apid = D . appointment . id ;
5157 let F = await sp . delete_appointment ( apid , KEY )
52- console . log ( F )
58+ console . log ( { F } )
5359 F . should . have . property ( 'data' )
5460 F . data . should . have . property ( 'appointment' )
5561 F . data . appointment . id . should . equal ( D . appointment . id )
@@ -58,8 +64,10 @@ async function runner(testname, func) {
5864
5965 await runner ( 'TEST 2' , ( async ( ) => {
6066 let sp = new Spurwing ( ) ;
61- let E = await sp . list_appointments ( KEY , 1000 , 0 , PID )
62- console . log ( E )
67+ let A = await sp . list_appointments ( KEY , 1000 , 0 , PID )
68+ console . log ( { A} )
69+ A . should . have . property ( 'data' )
70+ A . data . should . have . property ( 'appointments' )
6371 } ) ) ;
6472
6573} ) ( ) ;
0 commit comments