fix the tests (#1491)
* fix the tests Co-authored-by: v1b3m <vibenjamin6@gmail.com> * Update front/src/testing/graphqlMocks.ts Co-authored-by: Thaïs <guigon.thais@gmail.com> --------- Co-authored-by: v1b3m <vibenjamin6@gmail.com> Co-authored-by: Thaïs <guigon.thais@gmail.com>
This commit is contained in:
@ -47,7 +47,7 @@ export const Email: Story = {
|
|||||||
delay: 200,
|
delay: 200,
|
||||||
});
|
});
|
||||||
|
|
||||||
await sleep(50);
|
await sleep(100);
|
||||||
|
|
||||||
expect(await canvas.findByText('Alexandre Prot')).toBeInTheDocument();
|
expect(await canvas.findByText('Alexandre Prot')).toBeInTheDocument();
|
||||||
await expect(canvas.queryAllByText('John Doe')).toStrictEqual([]);
|
await expect(canvas.queryAllByText('John Doe')).toStrictEqual([]);
|
||||||
|
|||||||
@ -249,14 +249,14 @@ export const graphqlMocks = [
|
|||||||
graphql.query(getOperationName(GET_VIEW_FIELDS) ?? '', (req, res, ctx) => {
|
graphql.query(getOperationName(GET_VIEW_FIELDS) ?? '', (req, res, ctx) => {
|
||||||
const {
|
const {
|
||||||
where: {
|
where: {
|
||||||
objectId: { equals: objectId },
|
viewId: { equals: viewId },
|
||||||
},
|
},
|
||||||
} = req.variables;
|
} = req.variables;
|
||||||
|
|
||||||
return res(
|
return res(
|
||||||
ctx.data({
|
ctx.data({
|
||||||
viewFields:
|
viewFields:
|
||||||
objectId === 'company'
|
viewId === mockedCompanyViews[0].id
|
||||||
? mockedCompanyViewFields
|
? mockedCompanyViewFields
|
||||||
: mockedPersonViewFields,
|
: mockedPersonViewFields,
|
||||||
}),
|
}),
|
||||||
|
|||||||
Reference in New Issue
Block a user