I am making a Rails app with some of my views rendered in React, using the react-rails gem (so it's using the asset pipeline).
When I try to test my React views, the React components are not loaded, so I cannot test their content. For example, one of my integration tests look like this:
require 'test_helper'
class TabsIndexTest < ActionDispatch::IntegrationTest
test "index" do
get tabs_path
assert_template 'tabs/index'
assert_select 'table'
end
end
This tests if this index page has a table element. It should, but the test is not loading my React element so it does not see one. (However, if I test for the presence of <div data-react-class=...>, that passes, letting me know the JS has not run).
Is there any way to get my React components to be visible to my Minitest tests?