From 0e6bd5c09832d72911cfb23c3f672fe586296e1c Mon Sep 17 00:00:00 2001 From: gitstart-twenty <140154534+gitstart-twenty@users.noreply.github.com> Date: Thu, 7 Sep 2023 21:41:19 +0100 Subject: [PATCH] fix the tests (#1491) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix the tests Co-authored-by: v1b3m * Update front/src/testing/graphqlMocks.ts Co-authored-by: Thaïs --------- Co-authored-by: v1b3m Co-authored-by: Thaïs --- .../src/pages/people/__stories__/People.filterBy.stories.tsx | 2 +- front/src/testing/graphqlMocks.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/front/src/pages/people/__stories__/People.filterBy.stories.tsx b/front/src/pages/people/__stories__/People.filterBy.stories.tsx index e3db31dfe..a02f17c3b 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 081cd25f5..f3dba76a4 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, }),