-
-
Notifications
You must be signed in to change notification settings - Fork 631
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
Added property renderedHtml to return gen func #689
Added property renderedHtml to return gen func #689
Conversation
@robwise @alexfedoseev can I get a quick review on the JS parts? |
1 similar comment
1 similar comment
@@ -176,6 +176,15 @@ def change_text_expect_dom_selector(dom_selector) | |||
end | |||
end | |||
|
|||
feature "renderedHtml from generator function", :js do | |||
subject { page } |
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.
Do you prefer to call it subject
instead of page
? To me, page is more explicit and specific in this context.
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.
I'm being consistent with other tests in this file.
background { visit "/rendered_html" } | ||
scenario "renderedHtml should not have any errors" do | ||
expect(subject).to have_text "Props: {\"hello\":\"world\"}" | ||
expect(subject.html).to include("[SERVER] RENDERED RenderedHtml to dom node with id") |
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.
Why do we have to check with the whole string here instead of putting assertion on what we want to verify each part.
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.
Because this is in a script tag.
This is to support React Router v4, which needs the result of calling renderToString.
e04231c
to
4cf969a
Compare
Reviewed 6 of 19 files at r1. Comments from Reviewable |
@justin808 I tried only client part of |
This is to support React Router v4, which needs the result of calling
renderToString.
This change is