clean log_out spec helper
This commit is contained in:
parent
35c7f05a0a
commit
cd7bafaa0d
2 changed files with 5 additions and 9 deletions
|
@ -63,7 +63,7 @@ feature 'The routing', js: true do
|
||||||
|
|
||||||
# publish
|
# publish
|
||||||
publish_procedure(procedure)
|
publish_procedure(procedure)
|
||||||
log_out(old_layout: true)
|
log_out
|
||||||
|
|
||||||
# 2 users fill a dossier in each group
|
# 2 users fill a dossier in each group
|
||||||
user_send_dossier(scientifique_user, 'scientifique')
|
user_send_dossier(scientifique_user, 'scientifique')
|
||||||
|
|
|
@ -142,14 +142,10 @@ module FeatureHelpers
|
||||||
have_css("##{form_id_for(libelle)}[value=\"#{with}\"]")
|
have_css("##{form_id_for(libelle)}[value=\"#{with}\"]")
|
||||||
end
|
end
|
||||||
|
|
||||||
def log_out(old_layout: false)
|
def log_out
|
||||||
if old_layout
|
click_button(title: 'Mon compte')
|
||||||
page.all('.dropdown-button').first.click
|
click_on 'Se déconnecter'
|
||||||
click_on 'Se déconnecter'
|
|
||||||
else
|
|
||||||
click_button(title: 'Mon compte')
|
|
||||||
click_on 'Se déconnecter'
|
|
||||||
end
|
|
||||||
expect(page).to have_current_path(root_path)
|
expect(page).to have_current_path(root_path)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue