@@ -10,7 +10,6 @@ def test_character_limit_updates_on_input
1010 visit_preview ( :with_character_limit )
1111
1212 assert_selector "span.FormControl-caption[data-max-length='10'] .FormControl-caption-text" , text : "10 characters remaining"
13- refute_selector "span.FormControl-caption .FormControl-caption-icon[hidden]" , visible : :all
1413
1514 textarea = find ( "textarea[data-target='primer-text-area.inputElement']" )
1615 textarea . fill_in ( with : "Hello" )
@@ -50,7 +49,6 @@ def test_character_limit_clears_validation_when_back_under_limit
5049 sleep 0.3
5150
5251 assert_selector "span.FormControl-caption[data-max-length='10'] .FormControl-caption-text" , text : "5 characters remaining"
53- refute_selector "span.FormControl-caption .FormControl-caption-icon[hidden]" , visible : :all
5452 refute_selector "span.FormControl-caption.fgColor-danger"
5553
5654 refute_selector "textarea[invalid='true']"
@@ -105,25 +103,5 @@ def test_character_limit_screen_reader_not_announced_on_load
105103
106104 assert_equal "6 characters remaining" , sr_element . text
107105 end
108-
109- def test_character_limit_icon_visibility
110- visit_preview ( :with_character_limit )
111-
112- assert_selector "span.FormControl-caption .FormControl-caption-icon[hidden]"
113-
114- textarea = find ( "textarea[data-target='primer-text-area.inputElement']" )
115-
116- textarea . fill_in ( with : "Hello" )
117- sleep 0.3
118- assert_selector "span.FormControl-caption .FormControl-caption-icon[hidden]"
119-
120- textarea . fill_in ( with : "Hello World!" )
121- sleep 0.3
122- assert_selector "span.FormControl-caption .FormControl-caption-icon:not([hidden])" , visible : :visible
123-
124- textarea . fill_in ( with : "Hi" )
125- sleep 0.3
126- assert_selector "span.FormControl-caption .FormControl-caption-icon[hidden]"
127- end
128106 end
129107end
0 commit comments