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

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.

主站蜘蛛池模板: 永州市| 扶余县| 固阳县| 八宿县| 荆州市| 寿阳县| 揭阳市| 绍兴县| 龙井市| 牙克石市| 九龙城区| 沧州市| 平罗县| 龙胜| 金寨县| 平定县| 陆川县| 广灵县| 南靖县| 晋江市| 长垣县| 博兴县| 类乌齐县| 上虞市| 精河县| 灵石县| 溆浦县| 西丰县| 锡林浩特市| 普兰店市| 建平县| 徐水县| 织金县| 德清县| 历史| 运城市| 成安县| 礼泉县| 荥经县| 南木林县| 博湖县|