mirror of
https://github.com/ENSL/ensl.org.git
synced 2025-04-14 21:20:56 +00:00
Improve session helper for rspec
This commit is contained in:
parent
68de617f0e
commit
1057403f6c
1 changed files with 10 additions and 1 deletions
|
@ -6,10 +6,19 @@ module Features
|
|||
fill_in "login_username", with: user.username
|
||||
fill_in "login_password", with: user.raw_password
|
||||
|
||||
click_button I18n.t("helpers.submit.user.login")
|
||||
# click_button I18n.t("helpers.submit.user.login")
|
||||
find('#authentication .login input').trigger('click')
|
||||
expect(page).to have_content(I18n.t('login_successful'))
|
||||
end
|
||||
|
||||
def sign_out
|
||||
visit root_path
|
||||
|
||||
# click_button I18n.t("helpers.submit.user.login")
|
||||
find('a#logout').trigger('click')
|
||||
expect(page).to have_content(I18n.t('login_out'))
|
||||
end
|
||||
|
||||
def change_timezone_for(user, timezone)
|
||||
visit edit_user_path(user.id)
|
||||
|
||||
|
|
Loading…
Reference in a new issue