-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 react-testing-library #20428
Merged
Merged
Add react-testing-library #20428
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
fb771ab
Add react-testing-library
diegohaz 26d74f5
Merge branch 'master' into add/react-testing-library
diegohaz d68d38d
Merge branch 'master' into add/react-testing-library
diegohaz e68005b
Merge branch 'master' into add/react-testing-library
diegohaz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
128 changes: 81 additions & 47 deletions
128
packages/components/src/slot-fill/test/__snapshots__/slot.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,132 +1,166 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Slot bubblesVirtually false should subsume another slot by the same name 1`] = ` | ||
Array [ | ||
<div> | ||
<div | ||
data-position="first" | ||
/>, | ||
/> | ||
<div | ||
data-position="second" | ||
> | ||
Content | ||
</div>, | ||
] | ||
</div> | ||
</div> | ||
`; | ||
|
||
exports[`Slot bubblesVirtually false should subsume another slot by the same name 2`] = ` | ||
Array [ | ||
<div> | ||
<div | ||
data-position="first" | ||
/>, | ||
/> | ||
<div | ||
data-position="second" | ||
> | ||
Content | ||
</div>, | ||
] | ||
</div> | ||
</div> | ||
`; | ||
|
||
exports[`Slot bubblesVirtually false should unmount two slots with the same name 1`] = `"<div data-position=\\"first\\"></div><div data-position=\\"second\\"></div>"`; | ||
exports[`Slot bubblesVirtually false should unmount two slots with the same name 1`] = ` | ||
<div> | ||
<div | ||
data-position="first" | ||
/> | ||
<div | ||
data-position="second" | ||
/> | ||
</div> | ||
`; | ||
|
||
exports[`Slot bubblesVirtually true should subsume another slot by the same name 1`] = ` | ||
Array [ | ||
<div> | ||
<div | ||
data-position="first" | ||
> | ||
<div /> | ||
</div>, | ||
</div> | ||
<div | ||
data-position="second" | ||
> | ||
<div /> | ||
</div>, | ||
] | ||
<div> | ||
Content | ||
</div> | ||
</div> | ||
</div> | ||
`; | ||
Comment on lines
40
to
55
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Now Portal works! :) |
||
|
||
exports[`Slot bubblesVirtually true should subsume another slot by the same name 2`] = ` | ||
Array [ | ||
<div> | ||
<div | ||
data-position="first" | ||
/>, | ||
/> | ||
<div | ||
data-position="second" | ||
> | ||
<div /> | ||
</div>, | ||
] | ||
<div> | ||
Content | ||
</div> | ||
</div> | ||
</div> | ||
`; | ||
|
||
exports[`Slot bubblesVirtually true should unmount two slots with the same name 1`] = `"<div data-position=\\"first\\"></div><div data-position=\\"second\\"></div>"`; | ||
exports[`Slot bubblesVirtually true should unmount two slots with the same name 1`] = ` | ||
<div> | ||
<div | ||
data-position="first" | ||
/> | ||
<div | ||
data-position="second" | ||
/> | ||
</div> | ||
`; | ||
|
||
exports[`Slot should re-render Slot when not bubbling virtually 1`] = ` | ||
Array [ | ||
<div> | ||
<div> | ||
1 | ||
</div>, | ||
</div> | ||
<button | ||
onClick={[Function]} | ||
type="button" | ||
/>, | ||
] | ||
/> | ||
</div> | ||
`; | ||
|
||
exports[`Slot should re-render Slot when not bubbling virtually 2`] = ` | ||
Array [ | ||
<div> | ||
<div> | ||
2 | ||
</div>, | ||
</div> | ||
<button | ||
onClick={[Function]} | ||
type="button" | ||
/>, | ||
] | ||
/> | ||
</div> | ||
`; | ||
|
||
exports[`Slot should render a Fill containing an array 1`] = ` | ||
<div> | ||
<span /> | ||
<div /> | ||
text | ||
<div> | ||
<span /> | ||
<div /> | ||
text | ||
</div> | ||
</div> | ||
`; | ||
|
||
exports[`Slot should render a Fill containing an element 1`] = ` | ||
<div> | ||
<span /> | ||
<div> | ||
<span /> | ||
</div> | ||
</div> | ||
`; | ||
|
||
exports[`Slot should render a string Fill 1`] = ` | ||
<div> | ||
content | ||
<div> | ||
content | ||
</div> | ||
</div> | ||
`; | ||
|
||
exports[`Slot should render a string Fill with HTML wrapper when render props used 1`] = ` | ||
<div> | ||
<blockquote> | ||
content | ||
</blockquote> | ||
<div> | ||
<blockquote> | ||
content | ||
</blockquote> | ||
</div> | ||
</div> | ||
`; | ||
|
||
exports[`Slot should render empty Fills 1`] = `<div />`; | ||
exports[`Slot should render empty Fills 1`] = ` | ||
<div> | ||
<div /> | ||
</div> | ||
`; | ||
|
||
exports[`Slot should render empty Fills without HTML wrapper when render props used 1`] = `<div />`; | ||
exports[`Slot should render empty Fills without HTML wrapper when render props used 1`] = ` | ||
<div> | ||
<div /> | ||
</div> | ||
`; | ||
|
||
exports[`Slot should render in expected order 1`] = ` | ||
Array [ | ||
<div> | ||
<div> | ||
first | ||
second | ||
</div>, | ||
</div> | ||
<button | ||
onClick={[Function]} | ||
type="button" | ||
/>, | ||
/> | ||
<button | ||
onClick={[Function]} | ||
type="button" | ||
/>, | ||
] | ||
/> | ||
</div> | ||
`; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
All the snapshots will have this wrapping
div
added by react-testing-library.