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

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.

主站蜘蛛池模板: 五大连池市| 喀喇沁旗| 辽中县| 旺苍县| 故城县| 曲靖市| 苏尼特右旗| 曲阳县| 永胜县| 新乡县| 桑日县| 三都| 德庆县| 资兴市| 绵阳市| 琼海市| 兰考县| 蓬安县| 文山县| 栾川县| 长丰县| 无为县| 宁化县| 保定市| 芮城县| 巴马| 铅山县| 镇巴县| 兴安县| 霍山县| 台州市| 罗山县| 香港 | 麻江县| 高密市| 平乡县| 德庆县| 太湖县| 六盘水市| 延津县| 南江县|