mirror of
https://github.com/strapi/strapi.git
synced 2025-09-26 17:00:55 +00:00
Chore: Update useReviewWorkflows tests
This commit is contained in:
parent
669c7baae4
commit
cecf3026c9
@ -24,10 +24,6 @@ jest.mock('../../../../../../hooks', () => ({
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
||||||
meta: {
|
|
||||||
workflowCount: 2,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
})),
|
})),
|
||||||
}));
|
}));
|
||||||
@ -44,9 +40,5 @@ describe('useReviewWorkflowLicenseLimits', () => {
|
|||||||
workflows: 10,
|
workflows: 10,
|
||||||
stagesPerWorkflow: 10,
|
stagesPerWorkflow: 10,
|
||||||
});
|
});
|
||||||
|
|
||||||
expect(result.current.meta).toStrictEqual({
|
|
||||||
workflowCount: 2,
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -26,11 +26,8 @@ const server = setupServer(
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
||||||
pagination: {
|
meta: {
|
||||||
page: 1,
|
workflowCount: 1,
|
||||||
pageSize: 100,
|
|
||||||
pageCount: 1,
|
|
||||||
total: 1,
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
@ -46,11 +43,8 @@ const server = setupServer(
|
|||||||
stages: populate === 'stages' ? [STAGE_FIXTURE] : [],
|
stages: populate === 'stages' ? [STAGE_FIXTURE] : [],
|
||||||
},
|
},
|
||||||
|
|
||||||
pagination: {
|
meta: {
|
||||||
page: 1,
|
workflowCount: 1,
|
||||||
pageSize: 100,
|
|
||||||
pageCount: 1,
|
|
||||||
total: 1,
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
@ -94,7 +88,7 @@ describe('useReviewWorkflows', () => {
|
|||||||
expect(result.current).toStrictEqual(
|
expect(result.current).toStrictEqual(
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
status: 'success',
|
status: 'success',
|
||||||
pagination: expect.objectContaining({ total: 1 }),
|
meta: expect.objectContaining({ workflowCount: 1 }),
|
||||||
workflows: [{ id: expect.any(Number), stages: expect.any(Array) }],
|
workflows: [{ id: expect.any(Number), stages: expect.any(Array) }],
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
@ -107,7 +101,7 @@ describe('useReviewWorkflows', () => {
|
|||||||
|
|
||||||
expect(result.current).toStrictEqual(
|
expect(result.current).toStrictEqual(
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
pagination: expect.objectContaining({ total: 1 }),
|
meta: expect.objectContaining({ workflowCount: 1 }),
|
||||||
workflows: [expect.objectContaining({ id: 1, stages: expect.any(Array) })],
|
workflows: [expect.objectContaining({ id: 1, stages: expect.any(Array) })],
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user