May 2019
Intermediate to advanced
496 pages
10h 38m
English
Let's move on to creating our appointment form. This form is used to book an appointment for a customer. The first field is the service the customer requires: cut, color, blow-dry, and so on:
import React from 'react';import { createContainer } from './domManipulators';import { AppointmentForm } from '../src/AppointmentForm';describe('AppointmentForm', () => { let render, container; beforeEach(() => { ({ render, container } = createContainer()); }); const form = id => container.querySelector(`form[id="${id}"]`); it('renders a form', () => { render(<AppointmentForm />); expect(form('appointment')).not.toBeNull(); ...Read now
Unlock full access