官术网_书友最值得收藏!

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.

主站蜘蛛池模板: 东城区| 潍坊市| 普宁市| 茂名市| 班玛县| 上杭县| 驻马店市| 张家界市| 北川| 镇江市| 昭通市| 赞皇县| 砚山县| 深水埗区| 额尔古纳市| 探索| 称多县| 云南省| 定南县| 青河县| 宁德市| 绩溪县| 灵璧县| 宁化县| 辉县市| 珲春市| 高碑店市| 扶风县| 马鞍山市| 丁青县| 色达县| 普陀区| 财经| 洛宁县| 司法| 中山市| 库车县| 大洼县| 扎囊县| 齐齐哈尔市| 庄浪县|