- Mastering React Test:Driven Development
- Daniel Irvine
- 121字
- 2021-06-24 14:45:07
Test-driving Data Input with React
In this chapter, we'll explore React forms and controlled components. We'll work with textboxes, select boxes, and radio buttons to build out these forms:
- CustomerForm, which is used when adding or modifying customers, with three fields: first name, last name, and phone number
- AppointmentForm, for adding and modifying appointments, which contains two fields for choosing a salon service and an appointment time
In the process of building these forms, we'll dig deeper into testing complex DOM trees.
The following topics will be covered in this chapter:
- Extracting a test helper
- Adding a form element
- Accepting text input
- Selecting from a dropdown
- Making a choice from radio buttons
But, first, we will start with a little tidy-up.
推薦閱讀
- CockroachDB權(quán)威指南
- Magento 2 Development Cookbook
- 新手學(xué)Visual C# 2008程序設(shè)計(jì)
- INSTANT Sencha Touch
- Building a Quadcopter with Arduino
- 從0到1:Python數(shù)據(jù)分析
- Extreme C
- LabVIEW虛擬儀器入門(mén)與測(cè)控應(yīng)用100例
- Java Fundamentals
- 區(qū)塊鏈項(xiàng)目開(kāi)發(fā)指南
- Hadoop大數(shù)據(jù)分析技術(shù)
- 計(jì)算機(jī)應(yīng)用技能實(shí)訓(xùn)教程
- Learning Python Data Visualization
- 青少年學(xué)Python(第2冊(cè))
- 零基礎(chǔ)C#學(xué)習(xí)筆記