-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
03a7a6c
commit 8845e01
Showing
5 changed files
with
17 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,7 +41,7 @@ describe("Given that I am a user on login page", () => { | |
|
||
const form = screen.getByTestId("form-employee"); | ||
const handleSubmit = jest.fn((e) => e.preventDefault()); | ||
|
||
form.addEventListener("submit", handleSubmit); | ||
fireEvent.submit(form); | ||
expect(screen.getByTestId("form-employee")).toBeTruthy(); | ||
|
@@ -142,12 +142,12 @@ describe("Given that I am a user on login page", () => { | |
document.body.innerHTML = LoginUI(); | ||
|
||
const inputEmailUser = screen.getByTestId("admin-email-input"); | ||
fireEvent.change(inputEmailUser, { target: { value: "pasunemail" } }); | ||
expect(inputEmailUser.value).toBe("pasunemail"); | ||
fireEvent.change(inputEmailUser, { target: { value: "[email protected]" } }); | ||
expect(inputEmailUser.value).toBe("[email protected]"); | ||
|
||
const inputPasswordUser = screen.getByTestId("admin-password-input"); | ||
fireEvent.change(inputPasswordUser, { target: { value: "azerty" } }); | ||
expect(inputPasswordUser.value).toBe("azerty"); | ||
fireEvent.change(inputPasswordUser, { target: { value: "admin" } }); | ||
expect(inputPasswordUser.value).toBe("admin"); | ||
|
||
const form = screen.getByTestId("form-admin"); | ||
const handleSubmit = jest.fn((e) => e.preventDefault()); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,7 +52,6 @@ export default class { | |
} | ||
} | ||
}) | ||
console.log('length', bills.length) | ||
return bills | ||
}) | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters