features: move feature matchers to their own file
This allows to have the same syntax than native Capybara matchers.
This commit is contained in:
parent
5d797abb8c
commit
0ef4a5253c
5 changed files with 16 additions and 15 deletions
9
spec/support/feature_matchers.rb
Normal file
9
spec/support/feature_matchers.rb
Normal file
|
@ -0,0 +1,9 @@
|
|||
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
|
Loading…
Add table
Add a link
Reference in a new issue