clean log_out spec helper

This commit is contained in:
simon lehericey 2021-10-01 12:57:33 +02:00
parent 35c7f05a0a
commit cd7bafaa0d
2 changed files with 5 additions and 9 deletions

View file

@ -63,7 +63,7 @@ feature 'The routing', js: true do
# publish
publish_procedure(procedure)
log_out(old_layout: true)
log_out
# 2 users fill a dossier in each group
user_send_dossier(scientifique_user, 'scientifique')

View file

@ -142,14 +142,10 @@ module FeatureHelpers
have_css("##{form_id_for(libelle)}[value=\"#{with}\"]")
end
def log_out(old_layout: false)
if old_layout
page.all('.dropdown-button').first.click
click_on 'Se déconnecter'
else
click_button(title: 'Mon compte')
click_on 'Se déconnecter'
end
def log_out
click_button(title: 'Mon compte')
click_on 'Se déconnecter'
expect(page).to have_current_path(root_path)
end