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

Add test logic to test events when rendering on top of SSR markup #6668

Merged
merged 1 commit into from
Apr 30, 2016

Conversation

aickin
Copy link
Contributor

@aickin aickin commented Apr 30, 2016

In the middle of working on #6618, I broke all events when rendering on top of server-generated markup, but no unit test failed. I looked into it, and I think that there is a test case that is intended to test this, but it has a bug. This PR attempts to fix that.

The test should have the correct mounting behavior in ReactServerRendering-test.js runs through a bunch of cases with client rendering and server-generated markup, and at the end, it tests a simple click event to make sure that events work on the client. Unfortunately, what it does right before that is test out a markup mismatch. This means that the client-generated rendering at that point did not actually follow the SSR code path; it found a checksum mismatch and then followed the non-SSR/useCreateElement code path.

This is a pretty simple PR that tests the click event after the test renders on top of server-generated markup and doesn't get a markup mismatch.

Thanks!

@jimfb
Copy link
Contributor

jimfb commented Apr 30, 2016

Thanks Sasha!

@zpao zpao modified the milestones: 15.y.z, 15.0.3, 15.1.0 May 16, 2016
zpao pushed a commit to zpao/react that referenced this pull request Jun 8, 2016
…top of server-generated markup. (facebook#6668)

(cherry picked from commit 256753b)
zpao pushed a commit that referenced this pull request Jun 14, 2016
…top of server-generated markup. (#6668)

(cherry picked from commit 256753b)
@zpao zpao modified the milestones: 15-next, 15.2.0 Jun 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants