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

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.

主站蜘蛛池模板: 呼和浩特市| 泰兴市| 长阳| 定结县| 云阳县| 体育| 兴安县| 深水埗区| 满城县| 客服| 门头沟区| 青龙| 泰州市| 玛纳斯县| 邢台市| 卓资县| 宁陕县| 梁河县| 神木县| 武隆县| 海宁市| 扎鲁特旗| 瑞安市| 犍为县| 崇礼县| 喀喇| 格尔木市| 普洱| 冷水江市| 眉山市| 淅川县| 三门峡市| 阿拉善左旗| 祁连县| 陈巴尔虎旗| 武邑县| 博罗县| 基隆市| 靖远县| 防城港市| 宽城|