File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
lib/matestack/ui/bootstrap/form Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ class Matestack::Ui::Bootstrap::Form::Textarea < Matestack::Ui::VueJs::Component
77 optional :form_text
88 optional :disabled
99 optional :placeholder
10- optional :show_value
10+ optional :show_value # todo: check if this is relevant
1111 optional :rows
1212 optional :cols
1313
@@ -38,7 +38,7 @@ def render_errors
3838 end
3939 end
4040
41- def textarea_error_class
41+ def input_error_class
4242 'is-invalid'
4343 end
4444
Original file line number Diff line number Diff line change 88 Rails . application . routes . append do
99 scope "form_text_input_spec" do
1010 post '/textarea_success_form_test' , to : 'form_test#success_submit' , as : 'textarea_success_form_test'
11- post '/textarea_failure_form_test' , to : 'form_test#failure_submit' , as : 'itextareafailure_form_test '
11+ post '/textarea_failure_form_test' , to : 'form_test#failure_submit' , as : 'textarea_failure_form_test '
1212 end
1313 end
1414 Rails . application . reload_routes!
2727 end
2828 end
2929 visit example_path
30- expect ( page ) . to have_selector ( 'form > div.matestack-ui-bootstrap-texetarea > input .form-control#foo[type="text"] ' )
30+ expect ( page ) . to have_selector ( 'form > div.matestack-ui-bootstrap-textarea > textarea .form-control#foo' )
3131
3232 fill_in "foo" , with : "bar"
3333
113113 end
114114 end
115115 visit example_path
116- expect ( page . find ( :foo1 ) . height ) . to be < page . find ( :foo2 ) . height
117- expect ( page . find ( :foo1 ) . width ) . to be < page . find ( :foo2 ) . width
116+ expect ( page . find ( 'textarea#foo1' ) [ 'rows' ] ) . to eq '3'
117+ expect ( page . find ( 'textarea#foo1' ) [ 'cols' ] ) . to eq '10'
118+ expect ( page . find ( 'textarea#foo2' ) [ 'rows' ] ) . to eq '10'
119+ expect ( page . find ( 'textarea#foo2' ) [ 'cols' ] ) . to eq '30'
118120 end
119121
120122
You can’t perform that action at this time.
0 commit comments