- 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.
推薦閱讀
- Spring技術內幕:深入解析Spring架構與設計
- Spring Cloud、Nginx高并發核心編程
- Python貝葉斯分析(第2版)
- Oracle從入門到精通(第5版)
- RabbitMQ Cookbook
- C++面向對象程序設計習題解答與上機指導(第三版)
- WordPress 4.0 Site Blueprints(Second Edition)
- JavaCAPS基礎、應用與案例
- 運用后端技術處理業務邏輯(藍橋杯軟件大賽培訓教材-Java方向)
- 精通Python自動化編程
- HTML5秘籍(第2版)
- Practical GIS
- Android應用開發實戰(第2版)
- UX Design for Mobile
- Lync Server Cookbook