mirror of
https://github.com/strapi/strapi.git
synced 2025-09-25 16:29:34 +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,
|
||||
stagesPerWorkflow: 10,
|
||||
});
|
||||
|
||||
expect(result.current.meta).toStrictEqual({
|
||||
workflowCount: 2,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -26,11 +26,8 @@ const server = setupServer(
|
||||
},
|
||||
],
|
||||
|
||||
pagination: {
|
||||
page: 1,
|
||||
pageSize: 100,
|
||||
pageCount: 1,
|
||||
total: 1,
|
||||
meta: {
|
||||
workflowCount: 1,
|
||||
},
|
||||
})
|
||||
);
|
||||
@ -46,11 +43,8 @@ const server = setupServer(
|
||||
stages: populate === 'stages' ? [STAGE_FIXTURE] : [],
|
||||
},
|
||||
|
||||
pagination: {
|
||||
page: 1,
|
||||
pageSize: 100,
|
||||
pageCount: 1,
|
||||
total: 1,
|
||||
meta: {
|
||||
workflowCount: 1,
|
||||
},
|
||||
})
|
||||
);
|
||||
@ -94,7 +88,7 @@ describe('useReviewWorkflows', () => {
|
||||
expect(result.current).toStrictEqual(
|
||||
expect.objectContaining({
|
||||
status: 'success',
|
||||
pagination: expect.objectContaining({ total: 1 }),
|
||||
meta: expect.objectContaining({ workflowCount: 1 }),
|
||||
workflows: [{ id: expect.any(Number), stages: expect.any(Array) }],
|
||||
})
|
||||
);
|
||||
@ -107,7 +101,7 @@ describe('useReviewWorkflows', () => {
|
||||
|
||||
expect(result.current).toStrictEqual(
|
||||
expect.objectContaining({
|
||||
pagination: expect.objectContaining({ total: 1 }),
|
||||
meta: expect.objectContaining({ workflowCount: 1 }),
|
||||
workflows: [expect.objectContaining({ id: 1, stages: expect.any(Array) })],
|
||||
})
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user