Frontend Unit Tests
React Components
Each React component should have its own dedicated test file, and each of these test files must include at least one test case. Additionally, each component test file must include a test for page rendition. Any, and every, components that update states must include a test for a proper update.
Account Creation
Login
Render Test
Tests if the form properly renders on the page.
Expects:
Expects:
- An input field labeled "Email:"
- An input field labeled "Password:
- A button with the text "Log In"
Submission Test
Tests if the inputted data can be properly submitted.
Inputs:
Inputs:
- Email: "test@test.com"
- Password: "testpass"
- A click on the "Log In" button
Console Log Test
Tests if the submitted data is written in the console.
Inputs:
Expected:
Inputs:
- Email: "test@test.com"
- Password: "testpass"
Expected:
- Email: "test@test.com"
- Password: "testpass"