Module: ElabsMatchers::Matchers::HaveFormErrorsOn

Defined in:
lib/elabs_matchers/matchers/have_form_errors_on.rb

Defined Under Namespace

Classes: HaveFormErrorsOnMatcher

Instance Method Summary collapse

Instance Method Details

#have_form_errors_on(field, message) ⇒ Object

Asserts if the supplied flash alert exists or not

Example: page.should have_form_errors_on(“Name”, “Can’t be blank”)

Parameters:

  • field (String)

    The label content associated with the field. Any selector which works with has_field? works here too.

  • message (String)

    The error message expected.



78
79
80
# File 'lib/elabs_matchers/matchers/have_form_errors_on.rb', line 78

def have_form_errors_on(field, message)
  HaveFormErrorsOnMatcher.new(field, message)
end