1 # frozen_string_literal: true
5 ENV.delete("http_proxy")
7 ActiveSupport.on_load(:action_dispatch_system_test_case) do
8 ActionDispatch::SystemTesting::Server.silence_puma = true
11 class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
12 include ActionMailer::TestCase::ClearTestDeliveries
14 Capybara.configure do |config|
15 config.enable_aria_label = true
18 driven_by :selenium, :using => Settings.system_test_headless ? :headless_firefox : :firefox do |options|
19 options.add_preference("intl.accept_languages", "en")
20 options.binary = Settings.system_test_firefox_binary if Settings.system_test_firefox_binary
25 osm_website_app = create(:oauth_application, :name => "OpenStreetMap Web Site", :scopes => "write_api write_notes")
26 Settings.oauth_application = osm_website_app.uid
38 within "form", :text => "Email Address or Username" do
39 fill_in "username", :with => user.email
40 fill_in "password", :with => "test"
47 click_on "Logout", :match => :first
51 within("#sidebar_content", &)
54 def within_content_body(&)
55 within("#content > .content-body", &)
58 def within_content_heading(&)
59 within("#content > .content-heading", &)