-
Notifications
You must be signed in to change notification settings - Fork 756
Add assert_react_component method for test react_component render result #957
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
Conversation
huacnlee
commented
Jan 2, 2019
•
edited
Loading
edited
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a wonderful submission, well written and useful.
Thank you for the contribution!
I have a couple comments that might be able to improve it further and I'd welcome your thoughts on those points.
This is good work. I will need to look into why the tests are failing before merge, based on the current Travis-ci run 1505 and 1506 but then OK to merge. Edit: |
@BookOfGreg See here example of ActionMailer: How a about here change to: ActiveSupport.on_load(:action_view) do
include ::React::Rails::ViewHelper
ActionDispatch::IntegrationTest.send :include, React::Rails::TestHelper
end |
If it's good enough for Rails, it's good enough for me :) I'll accept that suggestion. |
@BookOfGreg just updated |
I'll clean up whatever is wrong with the test suite. Thank you for the contribution. I'll try get a release out in the coming weeks. |
Is it possible to use |
@cacods, I expect you need a feature test for this because it would involve actually initializing the server rendered dom elements into full react components. The current assert_react_components helper does only asserts the existence of a |