-
Notifications
You must be signed in to change notification settings - Fork 0
Test Case List
✅ = Automated Test Case implemented
Component tests
LoginPage
- ✅ should display the login form.
(See test cases) (See test code)
LoginForm
- ✅ should display a 'You need to login to continue.' text.
- ✅ should display an email input.
- ✅ should display an password input.
- ✅ should display a 'Remember Me' button.
- ✅ should display a 'LOGIN' button.
- ✅ should display a 'CREATE ACCOUNT' button.
- ✅ should have focus set on then email field.
- ✅ should display a password input field of type password.
(See test cases) (See test code)
Functional tests
Positive tests
- ✅ should redirect to login page when user is not logged in.
- ✅ should allow the user to login with valid credentials.
- ✅ should display a success message on login success.
- ✅ should allow the user to check a 'Remember Me' checkbox and have his email pre-written on the email input on next visit.
- ✅ should persist user being logged in after page reload when 'Remember Me' checkbox is checked.
- ✅ should persist user being logged in after page reload when 'Remember Me' checkbox is not checked.
- ✅ should not display the user's email on the email field when 'Remember Me' checkbox is not checked.
- ✅ should redirect to the 'Register User' form when CREATE ACCOUNT button is clicked.
Negative tests
- ✅ should not allow the user to login with invalid credentials.
- ✅ should display an alert message when either email or password are invalid.
- ✅ should display error label 'An email address is required.' when submitting an empty email address.
- ✅ should display error label 'Email must be at least 6 characters.' when submitting a shorter email address.
- ✅ should display error label 'Email must be shorter than 255 characters.' when submitting a longer email address.
- ✅ should display 'Email must be valid.' when submitting an invalid email address
- ✅ should display error label 'A password is required.' when submitting an empty password.
- ✅ should display error label 'Password must be at least 8 characters.' when submitting a shorter password.
- ✅ should display error label 'Password must be less than 128 characters.' when submitting a longer password.
(See test cases) (See test code)
Component tests
RegisterPage
- ✅ should display the register form.
(See test cases) (See test code)
RegisterForm
- ✅ should display an username input.
- ✅ should display an email input.
- ✅ should display an password input.
- ✅ should display an password confirmation input.
- ✅ should display a 'REGISTER' button.
- ✅ should have focus set on then username field.
- ✅ should display a password input field of type password.
- ✅ should display a password confirmation input field of type password.
- ✅ should display a 'Already have an account?' text and 'LOGIN' button that redirects to login page.
(See test cases) (See test code)
Functional tests
Positive tests
- ✅ should allow the user to register with valid credentials.
- ✅ should display a success message on register success.
Negative tests
- ✅ should not allow user to register with existing credentials.
- ✅ should display an alert message when username, email, password or password confirmation are invalid.
- ✅ should display error label 'A username is required.' when submitting empty username.
- ✅ should display error label 'Username must be at least 6 characters.' when submitting a shorter username.
- ✅ should display error label 'Username must be shorter than 20 characters.' when submitting longer username.
- ✅ should display error label 'An email address is required.' when submitting empty email address.
- ✅ should display error label 'Email must be at least 6 characters.' when submitting a shorter email address.
- ✅ should display error label 'Email must be shorter than 255 characters.' when submitting a longer email address.
- ✅ should display error label 'Email address is invalid.' when submitting an invalid email address.
- ✅ should display error label 'A password is required.' appears submitting empty password.
- ✅ should display error label 'Password must be at least 8 characters.' when submitting a shorter password.
- ✅ should display error label 'Password must be less than 128 characters.' when submitting a longer password.
- ✅ should display error label 'A password confirmation is required.' when submitting empty password confirmation.
- ✅ should display error label 'Passwords do not match.' when submitting incorrect password confirmation.
- ✅ should display error label 'Password must be at least 8 characters.' when submitting a password without at least 8 characters.
- ✅ should display error label 'Password must contain at least 1 uppercase character.' when submitting a password without at least 1 uppercase character.
- ✅ should display error label 'Password must contain at least 1 lowercase character.' when submitting a password without at least 1 lowercase character.
- ✅ should display error label 'Password must contain at least 1 number character.' when submitting a password without at least 1 number character.
- ✅ should display error label 'Password must contain at least 1 special character.' when submitting a password without at least 1 special character.
(See test cases) (See test code)
Component tests
TodoPage
- ✅ should display h1 heading with the text 'To Dos'.
(See test cases) (See test code)
TodoStatistics
- ✅ should display first statistics block with the text 'Completed today:'.
- ✅ should display second statistics block with the text 'Avg daily completed:'.
- ✅ should display third statistics block with the text 'Percentage difference:'.
(See test cases) (See test code)
TodoList
- ✅ should display input with placeholder text 'Add new todos...'.
- ✅ should display button with the text 'Add Todo'.
(See test cases) (See test code)
Positive tests
- ✅ should add a todo by writing on input and clicking on a 'Add todo' button.
- ✅ should add a todo by writing on input and pressing enter key.
- ✅ should display added todos correctly on the list.
- ✅ should persist todos after page reload.
Negative tests
- ✅ should not allow to add a todo with more than 40 characters.
- ✅ should display an error label 'Todos must be shorter than 40 characters.' when exceeding that amount.
- ✅ should not allow to add a todo when leaving input field empty.
- ✅ should display an error label indicating 'Todos must be at least 3 characters.' when falling below that amount.
(See test cases) (See test code)
Positive tests
- ✅ should edit a todo.
- ✅ should persist edited todos after page reload.
Negative tests
- ✅ should not allow to edit a todo so it has more than 40 characters.
- ✅ should display an error label 'Todos must be shorter than 40 characters.' when edited todo exceeds that amount.
- ✅ should not allow to edit a todo so it has less than 3 characters.
- ✅ should display an error label 'Todos must be at least 3 characters.' when edited todo falls below that amount.
(See test cases) (See test code)
Positive tests
- ✅ should delete a todo and remove it from the list.
- ✅ should not show deleted todos after page reload.
(See test cases) (See test code)
Positive tests
- ✅ should mark a todo as complete.
- ✅ should move the completed todo to the completed todos list.
(See test cases) (See test code)
Positive tests
- ✅ should reorder todos by dragging them up and down.
- ✅ should persist reordered todos order after page reload.
- ✅ should edit reordered todos.
(See test cases) (See test code)
Positive tests
- ✅ should display the number of completed todos for the day.
- ✅ should display the average number of completed todos per day.
- ✅ should display the percentage increase/decrease indicator for completed todos.
Negative tests
- ✅ should display 0 as the number of completed todos today when user sets todos as complete and then sets them as uncomplete.
- ✅ should display 0 as the number of average daily completed todos today when user sets todos as complete and then sets them as uncomplete.
- ✅ should display 0% as the number of percentage difference when user sets todos as complete and then sets them as uncomplete.
(See test cases) (See test code)
Positive tests
- ✅ should display 3 tabs above the todos list: 'All', 'Completed', 'Uncompleted'.
- ✅ should by default have 'Uncompleted' tab active.
- ✅ should by default display all existing todos.
- ✅ should display all todos when user clicks on the 'All' tab.
- ✅ should display only completed todos when user clicks on the 'Completed' tab.
- ✅ should display only uncomplete todos when user clicks on the 'Uncompleted' tab.
- ✅ should only have 1 active tab at any moment.
- ✅ should have as active tab the last tab clicked.
(See test cases) (See test code)
Positive tests
- ✅ should allow a user to log in with valid (existing) data.
- ✅ should include a success message in its response.
- ✅ should include the correct user properties in its response.
Negative tests
- ✅ should not allow a user to log in with invalid (unexisting) data.
- ✅ should not allow a user to log in with empty data.
- ✅ should respond with a message indicating any missing credentials.
- should respond with error message 'Email must be at least 6 characters.' when submitting a shorter email address.
- should respond with error message 'Email must be shorter than 255 characters.' when submitting a longer email address.
- ✅ should respond with error message 'Password must be at least 8 characters.' when submitting a shorter password.
- ✅ should respond with error message 'Password must be less than 128 characters.' when submitting a longer password.
(See test cases) (See test code)
Positive tests
- ✅ should allow a user to register with valid data.
- ✅ should respond with a success message when registering user.
- ✅ should respond with the correct properties for the registered user.
Negative tests
- ✅ should not allow a user to register with invalid (existing) data.
- ✅ should not allow a user to register with empty data.
- ✅ should respond with a message indicating any missing credentials.
- ✅ should respond with error message 'Username must be at least 6 characters.' when submitting a shorter username.
- ✅ should respond with error message 'Username must be shorter than 20 characters.' when submitting a longer username.
- ✅ should respond with error message 'Email must be at least 6 characters.' when submitting a shorter email address.
- ✅ should respond with error message 'Email must be shorter than 255 characters.' when submitting a longer email address.
- ✅ should respond with error message 'Password must be at least 8 characters.' when submitting a shorter password.
- ✅ should respond with error message 'Password must be less than 128 characters.' when submitting a longer password.
(See test cases) (See test code)
Positive tests
- ✅ should create a todo with valid data.
- ✅ should have correct success message on response.
- ✅ should have properties of correct type.
- ✅ should have last id on response.
- ✅ should add +1 to the current number of todos.
Negative tests
- ✅ should not create a todo with invalid data.
- ✅ should not allow a user to create todo with empty data.
- ✅ should respond with a message indicating any missing data.
- ✅ should not create a todo with invalid token.
- ✅ should respond with error message 'Description must be at least 3 characters.' when submitting a shorter description.
- ✅ should respond with error message 'Description must be shorter than 40 characters.' when submitting a longer description.
(See test cases) (See test code)
Positive tests
- ✅ should retrieve all existing todos.
- ✅ should retrieve a specific todo.
- ✅ should have completed and description properties on returned todos.
- ✅ should have the correct type on returned todos.
Negative tests
- ✅ should not retrieve a todo with invalid token.
(See test cases) (See test code)
Positive tests
- ✅ should update a specific todo with valid data.
Negative tests
- ✅ should not update a todo with invalid data.
- ✅ should not update a todo with invalid id.
- ✅ should not update todo with empty data.
- ✅ should respond with a message indicating any missing data.
- ✅ should not update a todo with invalid token.
- ✅ should respond with error message 'Description must be at least 3 characters.' when submitting a shorter description.
- ✅ should respond with error message 'Description must be shorter than 40 characters.' when submitting a longer description.
(See test cases) (See test code)
Positive tests
- ✅ should delete a specific todo with valid id.
- ✅ should subtract -1 to the current number of todos when deleting one.
Negative tests
- ✅ should not delete a todo with invalid id.
- ✅ should not delete a todo with invalid token.