feat: filter by me on CRUD list view (#11683)

This commit is contained in:
Lily Kuang
2020-11-25 11:56:48 -08:00
committed by GitHub
parent c354e7e0ab
commit 9c69679e14
16 changed files with 135 additions and 12 deletions

View File

@@ -52,6 +52,10 @@ const mockdatasets = [...new Array(3)].map((_, i) => ({
table_name: `coolest table ${i}`,
}));
const mockUser = {
userId: 1,
};
fetchMock.get(datasetsInfoEndpoint, {
permissions: ['can_list', 'can_edit', 'can_add', 'can_delete'],
});
@@ -70,7 +74,7 @@ fetchMock.get(databaseEndpoint, {
});
async function mountAndWait(props) {
const mounted = mount(<DatasetList {...props} />, {
const mounted = mount(<DatasetList {...props} user={mockUser} />, {
context: { store },
});
await waitForComponentToPaint(mounted);