require "test_helper" require "capybara/cuprite" class ApplicationSystemTestCase < ActionDispatch::SystemTestCase driven_by :cuprite, options: { headless: ENV["VISIBLE_SYSTEM_TESTS"].blank? } def login(email, password = "secret") visit new_session_url fill_in "Email", with: email fill_in "Password", with: "secret" click_on "Create Session" assert_text "Session was successfully created" end end