Skip to content

Commit

Permalink
fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pdotsani committed Feb 13, 2021
1 parent 1892f7e commit cc6ded1
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/components/Auth/AuthForm.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ describe('Signup', () => {

userEvent.type(screen.getByLabelText(/username/i), 'Carolyne.Carter');

userEvent.type(screen.getByLabelText(/password/i), 'password');
userEvent.type(screen.getByLabelText(/password1/i), 'password');

userEvent.type(screen.getByLabelText(/password2/i), 'password');

userEvent.type(
screen.getByLabelText(/email/i),
Expand Down Expand Up @@ -129,15 +131,15 @@ describe('Login', () => {
data: {
token:
'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6IkNhcm9seW5lLkNhcnRlciIsImlhdCI6MTU4NDM0MDAyMiwiZXhwIjoxNTg0MzQzNjIyLCJ1c2VyX2lkIjo4MCwib3JpZ19pYXQiOjE1ODQzNDAwMjJ9.0zNlXPVAjkBjxUQjq4B0HXnvrez93H2pz6n2ROKWzzg',
username: 'Carolyne.Carter',
email: 'Carolyne.Carter@mail.com',
},
});

await act(async () =>
userEvent.type(getByLabelText(/username/i), 'Carolyne.Carter')
userEvent.type(getByLabelText(/email/i), 'Carolyne.Carter@mail.com')
);
await act(async () =>
userEvent.type(getByLabelText(/username/i), 'Carolyne.Carter')
userEvent.type(getByLabelText(/email/i), 'Carolyne.Carter@mail.com')
);

await act(async () =>
Expand Down

0 comments on commit cc6ded1

Please sign in to comment.