Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: The asset is not present in the asset pipeline when running test the first time. #408

Open
sanG-github opened this issue May 30, 2023 · 0 comments

Comments

@sanG-github
Copy link
Contributor

sanG-github commented May 30, 2023

Issue

When running the test the first time, we usually faced the error:

  1) Sign in page given the Sign in button is clicked given the credentials are valid displays the home page
     Failure/Error: <%= stylesheet_link_tag 'application', 'data-turbo-track': 'reload' %>

     ActionView::Template::Error:
       The asset "application.css" is not present in the asset pipeline.
     # ------------------
     # --- Caused by: ---
     # Sprockets::Rails::Helper::AssetNotFound:
     #   The asset "application.css" is not present in the asset pipeline.
     #   /bundle/ruby/3.0.0/gems/sprockets-rails-3.4.2/lib/sprockets/rails/helper.rb:84:in `compute_asset_path'

Expected

Run test successfully each time we run it with rspec.

Steps to reproduce

  1. Generate a new project from the template
  2. Add request/system tests
  3. Run it the first time: bundle exec rspec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant