budget/test/application_system_test_case.rb
Andrew Tomaka 8ed6eabdb2 Use cuprite to drive Chrome (#60)
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.

Reviewed-on: #60
2025-06-06 00:00:54 -04:00

17 lines
428 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