Test "sign out"

This commit is contained in:
2023-04-16 02:41:04 +02:00
parent 6633e3a835
commit 71bc68efb3
3 changed files with 19 additions and 14 deletions

View File

@@ -5,4 +5,11 @@ class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
Selenium::WebDriver.logger.ignore(:capabilities)
driven_by :selenium, using: :headless_firefox, screen_size: [1600, 900]
def sign_in(user: users.sample, password: randomize_user_password!(user))
visit new_user_session_url
fill_in User.human_attribute_name(:email).capitalize, with: user.email
fill_in User.human_attribute_name(:password).capitalize, with: password
click_on t(:sign_in)
end
end