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 unit tests for props to attribute mapping in SSR. #9106

Merged
merged 20 commits into from
Mar 19, 2017
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
437d029
Added a handful of SSR unit tests, ported from a previous pull request.
aickin Feb 23, 2017
7c85408
Fixing linting errors
aickin Feb 23, 2017
c1d9787
Fixed a test helper function to properly report errors.
aickin Feb 23, 2017
5531bf3
Merge branch 'master' into server-render-unit-tests
aickin Feb 28, 2017
9257660
Un-nested the new rendering tests. Updated the fiber test passing/not…
aickin Feb 28, 2017
08b4936
Edited to comply with the react/jsx-space-before-closing eslint rule,…
aickin Feb 28, 2017
a91c836
Response to code review from @spicyj. Moved tests to separate file, r…
aickin Mar 1, 2017
1d680be
Converted the unit tests to use async-await style.
aickin Mar 1, 2017
66fe606
Merge branch 'master' into server-render-unit-tests
aickin Mar 1, 2017
0cb238e
Merge branch 'server-render-unit-tests' into server-render-unit-tests…
aickin Mar 1, 2017
d9ac8bb
Moved async-await babel transform for tests from .babelrc to preproce…
aickin Mar 1, 2017
ec62549
Response to code review in PR #9089. Thanks, @spicyj!
aickin Mar 1, 2017
d60e2ea
Merge branch 'master' into server-render-unit-tests-async-await
aickin Mar 3, 2017
d243a80
Fixing some bugs in the SSR unit tests.
aickin Mar 3, 2017
ab55523
Missed deleting some repeated code in the last commit.
aickin Mar 3, 2017
47fc0e8
Adding unit tests for property to attribute mapping in SSR.
aickin Mar 3, 2017
c593dbc
Removing some redundant unit tests.
aickin Mar 11, 2017
db82b93
Oops. I forgot to re-run record-tests after c593dbc; fixing that here.
aickin Mar 11, 2017
2af386b
Merge branch 'master' into server-render-unit-tests-attributes
aickin Mar 18, 2017
c1734ee
Reformatting for prettier so that the build will pass.
aickin Mar 19, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions scripts/fiber/tests-failing.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,52 @@ src/renderers/dom/shared/__tests__/ReactDOMComponent-test.js
* gives source code refs for unknown prop warning for exact elements (ssr)
* gives source code refs for unknown prop warning for exact elements in composition (ssr)

src/renderers/dom/shared/__tests__/ReactDOMServerIntegration-test.js
* renders a blank div with client render on top of good server markup
* renders a div with inline styles with client render on top of good server markup
* renders a self-closing tag with client render on top of good server markup
* renders a self-closing tag as a child with client render on top of good server markup
* renders simple numbers with client render on top of good server markup
* renders simple strings with client render on top of good server markup
* renders string prop with true value with client render on top of good server markup
* renders string prop with false value with client render on top of good server markup
* renders string prop with true value with client render on top of good server markup
* renders boolean prop with true value with client render on top of good server markup
* renders boolean prop with false value with client render on top of good server markup
* renders boolean prop with missing value with client render on top of good server markup
* renders boolean prop with self value with client render on top of good server markup
* renders boolean prop with "" value with client render on top of good server markup
* renders boolean prop with string value with client render on top of good server markup
* renders boolean prop with array value with client render on top of good server markup
* renders boolean prop with object value with client render on top of good server markup
* renders boolean prop with non-zero number value with client render on top of good server markup
* renders boolean prop with zero value with client render on top of good server markup
* renders download prop with true value with client render on top of good server markup
* renders download prop with false value with client render on top of good server markup
* renders download prop with no value with client render on top of good server markup
* renders download prop with string value with client render on top of good server markup
* renders download prop with string "true" value with client render on top of good server markup
* renders className prop with string value with client render on top of good server markup
* renders className prop with empty string value with client render on top of good server markup
* renders className prop with true value with client render on top of good server markup
* renders className prop with false value with client render on top of good server markup
* renders className prop with false value with client render on top of good server markup
* renders htmlFor with string value with client render on top of good server markup
* renders htmlFor with an empty string with client render on top of good server markup
* renders className prop with true value with client render on top of good server markup
* renders className prop with false value with client render on top of good server markup
* renders className prop with false value with client render on top of good server markup
* renders no ref attribute with client render on top of good server markup
* renders no children attribute with client render on top of good server markup
* renders no key attribute with client render on top of good server markup
* renders no dangerouslySetInnerHTML attribute with client render on top of good server markup
* renders no unknown attributes with client render on top of good server markup
* renders unknown data- attributes with client render on top of good server markup
* renders no unknown attributes for non-standard elements with client render on top of good server markup
* renders unknown attributes for custom elements with client render on top of good server markup
* renders unknown attributes for custom elements using is with client render on top of good server markup
* renders no HTML events with client render on top of good server markup

src/renderers/dom/shared/__tests__/ReactDOMTextComponent-test.js
* can reconcile text merged by Node.normalize() alongside other elements
* can reconcile text merged by Node.normalize()
Expand Down
42 changes: 42 additions & 0 deletions scripts/fiber/tests-passing-except-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,48 @@ src/renderers/dom/shared/__tests__/ReactDOMServerIntegration-test.js
* renders a div with inline styles with client render on top of bad server markup
* renders a self-closing tag with client render on top of bad server markup
* renders a self-closing tag as a child with client render on top of bad server markup
* renders simple numbers with client render on top of bad server markup
* renders simple strings with client render on top of bad server markup
* renders string prop with true value with client render on top of bad server markup
* renders string prop with false value with client render on top of bad server markup
* renders string prop with true value with client render on top of bad server markup
* renders boolean prop with true value with client render on top of bad server markup
* renders boolean prop with false value with client render on top of bad server markup
* renders boolean prop with missing value with client render on top of bad server markup
* renders boolean prop with self value with client render on top of bad server markup
* renders boolean prop with "" value with client render on top of bad server markup
* renders boolean prop with string value with client render on top of bad server markup
* renders boolean prop with array value with client render on top of bad server markup
* renders boolean prop with object value with client render on top of bad server markup
* renders boolean prop with non-zero number value with client render on top of bad server markup
* renders boolean prop with zero value with client render on top of bad server markup
* renders download prop with true value with client render on top of bad server markup
* renders download prop with false value with client render on top of bad server markup
* renders download prop with no value with client render on top of bad server markup
* renders download prop with string value with client render on top of bad server markup
* renders download prop with string "true" value with client render on top of bad server markup
* renders className prop with string value with client render on top of bad server markup
* renders className prop with empty string value with client render on top of bad server markup
* renders className prop with true value with client render on top of bad server markup
* renders className prop with false value with client render on top of bad server markup
* renders className prop with false value with client render on top of bad server markup
* renders htmlFor with string value with client render on top of bad server markup
* renders htmlFor with an empty string with client render on top of bad server markup
* renders className prop with true value with client render on top of bad server markup
* renders className prop with false value with client render on top of bad server markup
* renders className prop with false value with client render on top of bad server markup
* renders no ref attribute with client render on top of bad server markup
* renders no children attribute with client render on top of bad server markup
* renders no key attribute with client render on top of bad server markup
* renders no dangerouslySetInnerHTML attribute with client render on top of bad server markup
* renders no unknown attributes with server string render
* renders no unknown attributes with client render on top of bad server markup
* renders unknown data- attributes with client render on top of bad server markup
* renders no unknown attributes for non-standard elements with server string render
* renders no unknown attributes for non-standard elements with client render on top of bad server markup
* renders unknown attributes for custom elements with client render on top of bad server markup
* renders unknown attributes for custom elements using is with client render on top of bad server markup
* renders no HTML events with client render on top of bad server markup

src/renderers/dom/shared/__tests__/ReactMount-test.js
* should warn if mounting into dirty rendered markup
Expand Down
82 changes: 78 additions & 4 deletions scripts/fiber/tests-passing.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1119,16 +1119,90 @@ src/renderers/dom/shared/__tests__/ReactDOMSVG-test.js
src/renderers/dom/shared/__tests__/ReactDOMServerIntegration-test.js
* renders a blank div with server string render
* renders a blank div with clean client render
* renders a blank div with client render on top of good server markup
* renders a div with inline styles with server string render
* renders a div with inline styles with clean client render
* renders a div with inline styles with client render on top of good server markup
* renders a self-closing tag with server string render
* renders a self-closing tag with clean client render
* renders a self-closing tag with client render on top of good server markup
* renders a self-closing tag as a child with server string render
* renders a self-closing tag as a child with clean client render
* renders a self-closing tag as a child with client render on top of good server markup
* renders simple numbers with server string render
* renders simple numbers with clean client render
* renders simple strings with server string render
* renders simple strings with clean client render
* renders string prop with true value with server string render
* renders string prop with true value with clean client render
* renders string prop with false value with server string render
* renders string prop with false value with clean client render
* renders string prop with true value with server string render
* renders string prop with true value with clean client render
* renders boolean prop with true value with server string render
* renders boolean prop with true value with clean client render
* renders boolean prop with false value with server string render
* renders boolean prop with false value with clean client render
* renders boolean prop with missing value with server string render
* renders boolean prop with missing value with clean client render
* renders boolean prop with self value with server string render
* renders boolean prop with self value with clean client render
* renders boolean prop with "" value with server string render
* renders boolean prop with "" value with clean client render
* renders boolean prop with string value with server string render
* renders boolean prop with string value with clean client render
* renders boolean prop with array value with server string render
* renders boolean prop with array value with clean client render
* renders boolean prop with object value with server string render
* renders boolean prop with object value with clean client render
* renders boolean prop with non-zero number value with server string render
* renders boolean prop with non-zero number value with clean client render
* renders boolean prop with zero value with server string render
* renders boolean prop with zero value with clean client render
* renders download prop with true value with server string render
* renders download prop with true value with clean client render
* renders download prop with false value with server string render
* renders download prop with false value with clean client render
* renders download prop with no value with server string render
* renders download prop with no value with clean client render
* renders download prop with string value with server string render
* renders download prop with string value with clean client render
* renders download prop with string "true" value with server string render
* renders download prop with string "true" value with clean client render
* renders className prop with string value with server string render
* renders className prop with string value with clean client render
* renders className prop with empty string value with server string render
* renders className prop with empty string value with clean client render
* renders className prop with true value with server string render
* renders className prop with true value with clean client render
* renders className prop with false value with server string render
* renders className prop with false value with clean client render
* renders className prop with false value with server string render
* renders className prop with false value with clean client render
* renders htmlFor with string value with server string render
* renders htmlFor with string value with clean client render
* renders htmlFor with an empty string with server string render
* renders htmlFor with an empty string with clean client render
* renders className prop with true value with server string render
* renders className prop with true value with clean client render
* renders className prop with false value with server string render
* renders className prop with false value with clean client render
* renders className prop with false value with server string render
* renders className prop with false value with clean client render
* renders no ref attribute with server string render
* renders no ref attribute with clean client render
* renders no children attribute with server string render
* renders no children attribute with clean client render
* renders no key attribute with server string render
* renders no key attribute with clean client render
* renders no dangerouslySetInnerHTML attribute with server string render
* renders no dangerouslySetInnerHTML attribute with clean client render
* renders no unknown attributes with clean client render
* renders unknown data- attributes with server string render
* renders unknown data- attributes with clean client render
* renders no unknown attributes for non-standard elements with clean client render
* renders unknown attributes for custom elements with server string render
* renders unknown attributes for custom elements with clean client render
* renders unknown attributes for custom elements using is with server string render
* renders unknown attributes for custom elements using is with clean client render
* renders no HTML events with server string render
* renders no HTML events with clean client render

src/renderers/dom/shared/__tests__/ReactDOMTextComponent-test.js
* updates a mounted text component in place
Expand Down
Loading