Skip to content

The open alternative to Salesforce, designed for AI.

fix the tests (#1491)

gitstart-twenty0e6bd5c09832
diff --git a/front/src/pages/people/__stories__/People.filterBy.stories.tsx b/front/src/pages/people/__stories__/People.filterBy.stories.tsx
index e3db31dfe2d..a02f17c3b98 100644
--- a/front/src/pages/people/__stories__/People.filterBy.stories.tsx
+++ b/front/src/pages/people/__stories__/People.filterBy.stories.tsx
@@ -47,7 +47,7 @@ export const Email: Story = {
delay: 200,
});
- await sleep(50);
+ await sleep(100);
expect(await canvas.findByText('Alexandre Prot')).toBeInTheDocument();
await expect(canvas.queryAllByText('John Doe')).toStrictEqual([]);
diff --git a/front/src/testing/graphqlMocks.ts b/front/src/testing/graphqlMocks.ts
index 081cd25f549..f3dba76a456 100644
--- a/front/src/testing/graphqlMocks.ts
+++ b/front/src/testing/graphqlMocks.ts
@@ -249,14 +249,14 @@ export const graphqlMocks = [
graphql.query(getOperationName(GET_VIEW_FIELDS) ?? '', (req, res, ctx) => {
const {
where: {
- objectId: { equals: objectId },
+ viewId: { equals: viewId },
},
} = req.variables;
return res(
ctx.data({
viewFields:
- objectId === 'company'
+ viewId === mockedCompanyViews[0].id
? mockedCompanyViewFields
: mockedPersonViewFields,
}),