Skip to content

Commit

Permalink
Merge pull request facebook#264 from bvaughn/filter-owners-list
Browse files Browse the repository at this point in the history
Fetch owners list from renderer (using suspense)
  • Loading branch information
Brian Vaughn committed May 10, 2019
2 parents 17516b7 + ac0022b commit 8536995
Show file tree
Hide file tree
Showing 19 changed files with 2,358 additions and 224 deletions.
77 changes: 77 additions & 0 deletions src/__tests__/__snapshots__/ownersListContext-test.js.snap
@@ -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,
},
]
`;

0 comments on commit 8536995

Please sign in to comment.