demarches-normaliennes/spec/support/feature_matchers.rb
Pierre de La Morinerie 0ef4a5253c features: move feature matchers to their own file
This allows to have the same syntax than native Capybara matchers.
2019-11-27 11:58:45 +01:00

9 lines
335 B
Ruby

module Capybara
class Session
# Find the description of a procedure on the page
# Usage: expect(page).to have_procedure_description(procedure)
def has_procedure_description?(procedure)
has_content?(procedure.libelle) && has_content?(procedure.description) && has_content?(procedure.service.email)
end
end
end