features: move feature matchers to their own file

This allows to have the same syntax than native Capybara matchers.
This commit is contained in:
Pierre de La Morinerie 2019-11-26 14:05:33 +00:00
parent 5d797abb8c
commit 0ef4a5253c
5 changed files with 16 additions and 15 deletions

View file

@ -34,7 +34,7 @@ feature 'Signin in:' do
scenario 'an existing user can sign-in and fill the procedure' do
click_on 'Jai déjà un compte'
expect(page).to have_current_path new_user_session_path
expect_page_to_have_procedure_description(procedure)
expect(page).to have_procedure_description(procedure)
sign_in_with user.email, password
@ -42,7 +42,7 @@ feature 'Signin in:' do
click_on 'Commencer la démarche'
expect(page).to have_current_path identite_dossier_path(user.reload.dossiers.last)
expect_page_to_have_procedure_description(procedure)
expect(page).to have_procedure_description(procedure)
expect(page).to have_content "Données d'identité"
end
end