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

@ -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