Issues with Loading React Component for Cuprite in Rails 7.1

Open
#1,332 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript, rails, react, ruby

Research direction

Start by reproducing the Rails 7.1, Ruby 3.2.2, RSpec, Capybara, Cuprite, capybara-screenshot, React-Rails, Sprockets, and Webpacker setup described in the issue. Compare Cuprite's page HTML with the capybara-screenshot image after test-environment asset precompilation; done when the React component renders and its h1 is accessible to Capybara finders.

Written by the indexing model from the issue text.

Description

Steps to reproduce
  1. Create a rails 7.1 application with ruby 3.2.2
  2. Setup Rspec/Capybara/Cuprite Defaults
  3. add capybara-screenshot
  4. Install latest version of react-rails gem and create a component in a view
  5. Test that the component renders an h1 tag with the help of capybara
Expected behavior

The component renders and is accessible to cuprite/capybara finders

Actual behavior

The html for cuprite shows that the component is on the page, but when you look at the photo from capybara screen shot. No component has rendered

System configuration
  • Shakapacker or Sprockets version: sprockets 4.2.1
  • React-Rails version: 3.2.0
  • Rect_UJS version:
  • Rails version: 7.1.2
  • Ruby version: 3.2.2
    -Webpacker (old version): 5.4.4

(Describe your issue here)
Cuprite is struggling with rendering the react component for react-rails with rails 7.1 and ruby 3.2.2. I've done an assets precompile for the test env and no issues came up.

Dominant language
JavaScript
Stars
6.8k
Forks
739
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from reactjs/react-rails

All issues in reactjs/react-rails

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.