May 2019
Intermediate to advanced
496 pages
10h 38m
English
How can we get to the right implementation? We do that by testing that having no available time slots renders no radio buttons at all:
it('does not render radio buttons for unavailable time slots', () => { render(<AppointmentForm availableTimeSlots={[]} />); const timesOfDay = timeSlotTable().querySelectorAll( 'input' ); expect(timesOfDay).toHaveLength(0);});
const mergeDateAndTime = (date, timeSlot) => { const time = new Date(timeSlot); ...Read now
Unlock full access