Module: Capybara::ActiveAdmin::Matchers::Form
- Included in:
- Capybara::ActiveAdmin::Matchers
- Defined in:
- lib/capybara/active_admin/matchers/form.rb
Instance Method Summary collapse
- #have_form_error(text, options = {}) ⇒ Object
- #have_has_many_fields_for(association_name, options = {}) ⇒ Object
- #have_no_form_errors(options = {}) ⇒ Object
- #have_semantic_error(text, options = {}) ⇒ Object
- #have_semantic_errors(options = {}) ⇒ Object
Instance Method Details
#have_form_error(text, options = {}) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/capybara/active_admin/matchers/form.rb', line 7 def have_form_error(text, = {}) field = .delete(:field) opts = Util.(text, ) li_selector = input_container_selector field, .slice(:exact) have_selector("#{li_selector} #{inline_error_selector}", opts) end |
#have_has_many_fields_for(association_name, options = {}) ⇒ Object
31 32 33 34 |
# File 'lib/capybara/active_admin/matchers/form.rb', line 31 def have_has_many_fields_for(association_name, = {}) selector = has_many_fields_selector(association_name) have_selector(selector, ) end |
#have_no_form_errors(options = {}) ⇒ Object
15 16 17 18 19 20 |
# File 'lib/capybara/active_admin/matchers/form.rb', line 15 def have_no_form_errors( = {}) field = .delete(:field) li_selector = input_container_selector field, .slice(:exact) have_none_of_selectors(:css, "#{li_selector} #{inline_error_selector}", ) end |
#have_semantic_error(text, options = {}) ⇒ Object
22 23 24 25 |
# File 'lib/capybara/active_admin/matchers/form.rb', line 22 def have_semantic_error(text, = {}) opts = Util.(text, ) have_selector(semantic_error_selector, opts) end |
#have_semantic_errors(options = {}) ⇒ Object
27 28 29 |
# File 'lib/capybara/active_admin/matchers/form.rb', line 27 def have_semantic_errors( = {}) have_selector(semantic_error_selector, ) end |