Exercises
- Rename
Appointment.js
andAppointment.test.js
toAppointmentsDayView.js
andAppointmentsDayView.test.js
. While it’s fine to include multiple components in one file if they form a hierarchy, you should always name the file after the root component for that hierarchy. - Complete the
Appointment
component by displaying the following fields on the page. You should use atable
HTML element to give the data some visual structure. This shouldn’t affect how you write your tests. The fields that should be displayed are the following:- Customer last name, using the
lastName
field - Customer telephone number, using the
phoneNumber
field - Stylist name, using the
stylist
field - Salon service, using the
service
field - Appointment notes, using the
notes
field
- Customer last name, using the
- Add a heading to
Appointment
to make it clear which appointment time is being viewed. - There is some repeated sample data. We’ve used sample data in our tests, and we also have
sampleAppointments
insrc...