All threads / Issues running System Tests due to missing font?

Ask A Question

Notifications

You’re not receiving notifications from this thread.

Issues running System Tests due to missing font?

Stephen Sizer asked in Testing

I have written two system tests for my current application and I have now hit a road block.

test "visiting the timesheet index without signing in" do
    visit timesheets_path

    assert_text "You need to sign in or sign up before continuing."
  end

  test "visiting the timesheet index (signing in first)" do
    visit new_user_session_path

    fill_in "Email address", with: "[email protected]"
    fill_in "Password", with: "password"

    click_on "Log in"

        assert_text "Signed in successfully."
  end

The second test is failing due to not being able to load a font shown below:

Error:
ContractorTimesheetsTest#test_visiting_the_timesheet_index_(signing_in_first):
ActionController::RoutingError: No route matches [GET] "/fonts/fa-solid-900.woff2"

If I spin up my rails server locally I have no errors for missing resources and my font files are all loaded correctly.

For further reference I am using the defaults for my application system test case

class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
  driven_by :selenium, using: :chrome, screen_size: [1400, 1400]
end

Does anyone have any suggestions?

Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 37,106+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2020 GoRails, LLC. All rights reserved.