Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
akellbl4 committed Jul 1, 2022
1 parent 70ab646 commit 36c3fea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/app/components/auth/auth.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ describe('<Auth/>', () => {

it('should show validation error for token', async () => {
StaticStore.config.auth_providers = ['email'];
jest.spyOn(api, 'emailSignin').mockImplementationOnce(async () => null);
const emailSignin = jest.spyOn(api, 'emailSignin').mockImplementationOnce(async () => null);

const { getByText, getByTitle, getByPlaceholderText } = render(<Auth />);

Expand All @@ -183,7 +183,7 @@ describe('<Auth/>', () => {
target: { value: 'email@email.com' },
});
fireEvent.click(getByText('Submit'));
await waitFor(() => expect(api.emailSignin).toBeCalled());
await waitFor(() => expect(emailSignin).toBeCalled());

expect(getByText('Back')).toHaveClass('auth-back-button');
expect(getByTitle('Close sign-in dropdown')).toHaveClass('auth-close-button');
Expand Down

0 comments on commit 36c3fea

Please sign in to comment.