May 2019
Intermediate to advanced
496 pages
10h 38m
English
It's a good time to add a submit button and perform a manual test to check what you've created. A submit button test is relatively simple. Add the following test to your test file:
it('has a submit button', () => { render(<CustomerForm />); const submitButton = container.querySelector( 'input[type="submit"]' ); expect(submitButton).not.toBeNull();});
Then, make that pass by adding in your submit button into the form, at the bottom:
<form id="customer" onSubmit={handleSubmit}> ... <input type="submit" value="Add" /></form>
Update your entrypoint in src/index.js to render a new CustomerForm instance, rather than an AppointmentsDayView, and you should be ready to manually test:
Read now
Unlock full access