Skip to content

Commit 44af8fe

Browse files
committed
Add field tracking tests for text input components
This adds new tests to prevent regression of focus/registration bugs in text input components: Registration tests: - test_search_bar_registers: verify search bar registers buffer - test_textfield_with_selection_registers: verify selection variant - test_search_view_registers: verify search modal registers query Focus persistence tests: - test_search_bar_focus_persists: focus maintained across frames - test_unregistered_field_loses_focus: negative test for tracking - test_focus_switch_between_fields: multi-field focus transfer via click State transition tests: - test_disabled_field_clears_focus: disabled clears focus - test_read_only_field_clears_focus: read_only clears focus - test_slider_unrendered_clears_active: slider state cleanup - test_rerender_after_skip_frame: conditional rendering behavior Stress test: - test_many_textfields_stress: 32 fields to test hash collisions These tests would have caught the bug fixed in commit 41c4b76 where text input components failed to register with field tracking system. All focus tests use real mouse input simulation to test actual focus handling logic, not direct state manipulation.
1 parent 8e66b98 commit 44af8fe

File tree

1 file changed

+437
-0
lines changed

1 file changed

+437
-0
lines changed

0 commit comments

Comments
 (0)