feat: filters for alerts and reports list view (#11900)

This commit is contained in:
Lily Kuang
2020-12-04 09:58:34 -08:00
committed by GitHub
parent 77d362d306
commit 60122a2b2d
3 changed files with 75 additions and 20 deletions

View File

@@ -62,6 +62,10 @@ const mockalerts = [...new Array(3)].map((_, i) => ({
type: 'alert',
}));
const mockUser = {
userId: 1,
};
fetchMock.get(alertsEndpoint, {
ids: [2, 0, 1],
result: mockalerts,
@@ -74,7 +78,7 @@ fetchMock.put(alertEndpoint, { ...mockalerts[0], active: false });
fetchMock.put(alertsEndpoint, { ...mockalerts[0], active: false });
async function mountAndWait(props) {
const mounted = mount(<AlertList {...props} />, {
const mounted = mount(<AlertList {...props} user={mockUser} />, {
context: { store },
});
await waitForComponentToPaint(mounted);