The Git tag for this section is root-component.
After all that setup, we're now ready to build App, the component that ties everything else together. As a reminder, this component will implement our workflow, switching between three screens:
- Initially, it will show the AppointmentsDayViewLoader, along with a button
- If the user clicks the button, they will be shown the CustomerForm
- Once they've completed that form and submitted the customer to the server, the user will be shown the AppointmentFormLoader and can then book an appointment
- Once the appointment has been booked, the user is taken back to viewing the AppointmentsDayViewLoader
Let's get started:
- Create a new file, test/App.test.js, with the following setup and the first test:
import React from 'react';
import {
createShallowRenderer,
type
} from './shallowHelpers...