forked from facebook/react
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request facebook#264 from bvaughn/filter-owners-list
Fetch owners list from renderer (using suspense)
- Loading branch information
Showing
19 changed files
with
2,358 additions
and
224 deletions.
There are no files selected for viewing
77 changes: 77 additions & 0 deletions
77
src/__tests__/__snapshots__/ownersListContext-test.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 |
---|---|---|
@@ -0,0 +1,77 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`OwnersListContext should fetch the owners list for the selected element that includes filtered components: mount 1`] = ` | ||
[root] | ||
▾ <Grandparent> | ||
<Child> | ||
<Child> | ||
`; | ||
exports[`OwnersListContext should fetch the owners list for the selected element that includes filtered components: owners for "Child" 1`] = ` | ||
Array [ | ||
Object { | ||
"displayName": "Grandparent", | ||
"id": 7, | ||
}, | ||
Object { | ||
"displayName": "Parent", | ||
"id": 9, | ||
}, | ||
Object { | ||
"displayName": "Child", | ||
"id": 8, | ||
}, | ||
] | ||
`; | ||
exports[`OwnersListContext should fetch the owners list for the selected element: mount 1`] = ` | ||
[root] | ||
▾ <Grandparent> | ||
▾ <Parent> | ||
<Child> | ||
<Child> | ||
`; | ||
exports[`OwnersListContext should fetch the owners list for the selected element: owners for "Child" 1`] = ` | ||
Array [ | ||
Object { | ||
"displayName": "Grandparent", | ||
"id": 2, | ||
}, | ||
Object { | ||
"displayName": "Parent", | ||
"id": 3, | ||
}, | ||
Object { | ||
"displayName": "Child", | ||
"id": 4, | ||
}, | ||
] | ||
`; | ||
exports[`OwnersListContext should fetch the owners list for the selected element: owners for "Parent" 1`] = ` | ||
Array [ | ||
Object { | ||
"displayName": "Grandparent", | ||
"id": 2, | ||
}, | ||
Object { | ||
"displayName": "Parent", | ||
"id": 3, | ||
}, | ||
] | ||
`; | ||
exports[`OwnersListContext should include the current element even if there are no other owners: mount 1`] = ` | ||
[root] | ||
<Grandparent> | ||
`; | ||
exports[`OwnersListContext should include the current element even if there are no other owners: owners for "Grandparent" 1`] = ` | ||
Array [ | ||
Object { | ||
"displayName": "Grandparent", | ||
"id": 5, | ||
}, | ||
] | ||
`; |
Oops, something went wrong.