@@ -155,40 +155,18 @@ def test_character_limit_clears_validation_when_back_under_limit
155155 input . fill_in ( with : "Hello World!" ) # 12 characters
156156 sleep 0.3
157157
158- assert_selector "span.FormControl-caption .FormControl-caption-icon:not([hidden])" , visible : :visible
159158 assert_selector "input[invalid='true'][aria-invalid='true']"
160159
161160 input . fill_in ( with : "Hello" ) # 5 characters
162161 sleep 0.3
163162
164163 assert_selector "span.FormControl-caption[data-max-length='10'] .FormControl-caption-text" , text : "5 characters remaining"
165- refute_selector "span.FormControl-caption .FormControl-caption-icon[hidden]" , visible : :all
166164 refute_selector "span.FormControl-caption.fgColor-danger"
167165
168166 refute_selector "input[invalid='true']"
169167 refute_selector "input[aria-invalid='true']"
170168 end
171169
172- def test_character_limit_screen_reader_text_updates
173- visit_preview ( :with_character_limit )
174-
175- input = find ( "input[type=text][data-target*='primer-text-field.inputElement']" )
176-
177- sr_element = find ( "span.sr-only[aria-live='polite']" )
178-
179- input . fill_in ( with : "Test" )
180-
181- # Wait for debounced update (500ms + buffer)
182- sleep 0.6
183-
184- assert_equal "6 characters remaining" , sr_element . text
185-
186- input . fill_in ( with : "Hello World!" ) # 12 characters
187- sleep 0.6
188-
189- assert_equal "2 characters over" , sr_element . text
190- end
191-
192170 def test_character_limit_singular_vs_plural
193171 visit_preview ( :with_character_limit )
194172
@@ -204,19 +182,5 @@ def test_character_limit_singular_vs_plural
204182
205183 assert_selector "span.FormControl-caption[data-max-length='10'] .FormControl-caption-text" , text : "1 character over"
206184 end
207-
208- def test_character_limit_screen_reader_not_announced_on_load
209- visit_preview ( :with_character_limit )
210-
211- sr_element = find ( "span.sr-only[aria-live='polite']" )
212-
213- assert_equal "" , sr_element . text
214-
215- input = find ( "input[type=text][data-target*='primer-text-field.inputElement']" )
216- input . fill_in ( with : "Test" )
217-
218- sleep 0.6 # Wait for debounced update
219- assert_equal "6 characters remaining" , sr_element . text
220- end
221185 end
222186end
0 commit comments