2024-02-02 09:05:04 -06:00
|
|
|
require "test_helper"
|
|
|
|
|
|
|
|
class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
|
|
|
|
driven_by :selenium, using: :headless_chrome, screen_size: [ 1400, 1400 ]
|
2024-02-06 08:19:31 +11:00
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def sign_in(user)
|
|
|
|
visit new_session_path
|
|
|
|
within "form" do
|
|
|
|
fill_in "Email", with: user.email
|
|
|
|
fill_in "Password", with: "password"
|
|
|
|
click_button "Log in"
|
|
|
|
end
|
2024-04-08 13:26:46 +02:00
|
|
|
assert_text "Dashboard", wait: 5
|
|
|
|
find('[data-controller="menu"]').click
|
|
|
|
click_button "Logout"
|
|
|
|
assert_text "Sign in to your account"
|
2024-02-06 08:19:31 +11:00
|
|
|
end
|
2024-02-02 09:05:04 -06:00
|
|
|
end
|