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

@@ -56,6 +56,10 @@ const mockdatabases = [...new Array(3)].map((_, i) => ({
id: i,
}));
const mockUser = {
userId: 1,
};
fetchMock.get(databasesInfoEndpoint, {
permissions: ['can_delete'],
});
@@ -77,7 +81,9 @@ fetchMock.get(databaseRelatedEndpoint, {
});
describe('DatabaseList', () => {
const wrapper = mount(<DatabaseList />, { context: { store } });
const wrapper = mount(<DatabaseList user={mockUser} />, {
context: { store },
});
beforeAll(async () => {
await waitForComponentToPaint(wrapper);