budget/test/application_system_test_case.rb
Andrew Tomaka 3f1110112d
Use cuprite to drive Chrome
headless tests started to fail due to elements not being present in time
or not being found period.  CBA to fix so just switch to this other
driver for now.
2025-06-05 23:51:09 -04:00

17 lines
426 B
Ruby

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