- 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.
推薦閱讀
- Implementing VMware Horizon 7(Second Edition)
- FuelPHP Application Development Blueprints
- Oracle Exadata性能優化
- INSTANT FreeMarker Starter
- 簡單高效LATEX
- PyQt從入門到精通
- Xcode 7 Essentials(Second Edition)
- Python網絡爬蟲從入門到實踐(第2版)
- 數據庫系統原理及MySQL應用教程
- Selenium Design Patterns and Best Practices
- Windows內核編程
- PHP編程基礎與實例教程
- HTML5權威指南
- C語言程序設計習題與實驗指導
- Python Deep Learning