Implement scoping on be (#144)

This commit is contained in:
Charles Bochet
2023-05-26 14:00:32 +02:00
committed by GitHub
parent f79a45e7e6
commit 26d3716ae7
981 changed files with 14545 additions and 24213 deletions

View File

@ -18,7 +18,9 @@ jest.mock('../../../apollo', () => {
variables: GraphqlMutationPerson;
}) => {
const gqlPerson = arg.variables as unknown as GraphqlQueryPerson;
return { data: personInterface.mapToPerson(gqlPerson) };
return {
data: { updateOnePerson: personInterface.mapToPerson(gqlPerson) },
};
},
},
};
@ -46,11 +48,12 @@ it('Checks people full name edit is updating data', async () => {
throw new Error('firstNameInput is null');
}
fireEvent.change(nameInput, { target: { value: 'Jo' } });
expect(nameInput).toHaveValue('Jo');
fireEvent.click(getByText('All People')); // Click outside
});
await waitFor(() => {
expect(getByText('Jo Doe')).toBeInTheDocument();
expect(getByText('John Doe')).toBeInTheDocument();
});
});