Skip to content

Commit

Permalink
Intento arreglo de tests 7
Browse files Browse the repository at this point in the history
  • Loading branch information
uo289039 committed Mar 14, 2024
1 parent dcd7c77 commit e021a04
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 8 deletions.
28 changes: 22 additions & 6 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions webapp/src/components/Login.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe('Login component', () => {
it('should log in successfully', async () => {
const sendLogin=jest.fn();
const sendUsername=jest.fn();
render(<Login sendLogin={sendLogin()} sendUsername={sendUsername()}/>);
render(<Login sendLogin={sendLogin} sendUsername={sendUsername}/>);

const usernameInput = screen.getByLabelText(/Username/i);
const passwordInput = screen.getByLabelText(/Password/i);
Expand All @@ -41,7 +41,7 @@ describe('Login component', () => {
it('should handle error when logging in', async () => {
const sendLogin=jest.fn();
const sendUsername=jest.fn();
render(<Login sendLogin={sendLogin()} sendUsername={sendUsername()}/>);
render(<Login sendLogin={sendLogin} sendUsername={sendUsername}/>);

const usernameInput = screen.getByLabelText(/Username/i);
const passwordInput = screen.getByLabelText(/Password/i);
Expand Down

0 comments on commit e021a04

Please sign in to comment.