Test Cases - OskarKlintrotSkolarbeteWP14/1dv608-Project GitHub Wiki

##Test case 1.1, Register new user Register a new login with incorrect credentials

Input

  • Press Register a new user
  • Press Register

Output

  • Error messages complaining about incorrect username and password are shown

##Test case 1.2, Register new user Register a new login with existing username and incorrect password

Input

  • Press Register a new user
  • Choose Admin as username
  • Fill in a password but don't repeat it
  • Press Register

Output

  • Error messages complaining about existing username and passwords that do not match are shown

##Test case 1.3, Register new user Register a new login with correct credentials

Input

  • Press Register a new user
  • Choose a username that is at least three (3) characters
  • Choose a password longer that is at least six (6) characters
  • Repeat password
  • Press Register

Output

  • Page redirects to front page
  • Message that confirms successful registration is shown
  • Chosen username is pre-filled Refreshing the page removes the success message

##Test case 2.1, Login Login with empty password

Input

  • TC 1.3
  • Press Login

Output

  • Error message complaining about empty password is shown
  • Username is still pre-filled

##Test case 2.2, Login Login with incorrect password

Input

  • TC 2.1
  • Fill in incorrect password
  • Press Login

Output

  • Error message Wrong name or password is shown

##Test case 2.3, Login Login with correct credentials

Input

  • TC 2.2
  • Fill in correct password
  • Press Login

Output

  • An empty TODO-list is shown and Older and Newer buttons are disabled

Test case 3.1, Todo

Test validation on empty todo

Input

  • TC 2.3
  • Press Add todo

Output

  • Error message is shown
  • Error message disappear when reloading the page

Test case 3.2, Todo

Test validation on to long todo

Input

  • TC 2.3
  • Enter todo longer than 55 characters
  • Press Add todo

Output

  • Error message is shown
  • Error message disappear when reloading the page

Test case 3.3, Todo

Test validation on script-tags

Input

  • TC 2.3
  • Enter <script>alert()</script>
  • Press Add todo

Output

  • Error message is shown
  • Error message disappear when reloading the page

Test case 3.4, Todo

Add proper Todo

Input

  • TC 2.3
  • Enter Buy tomatoes as a todo
  • Press enter

Output

  • Buy tomatoes is shown together with a timestamp

Test case 3.5, Todo

Test pagination

Input

  • TC 2.3 or TC 3.4
  • Add more than five (5) more todos

Output

  • The button Older should now be available

Test case 3.6, Todo

Test pagination

Input

  • TC 3.5
  • Press Older

Output

  • Second pagination page should be shown
  • Older button should be disabled
  • Newer button should be available
  • ?page=1 should have been added to the url

Test case 3.7, Todo

Remove todo

Input

  • TC 3.6
  • Press "Remove" on a todo
  • Cancel removing todo
  • Press "Remove" on a todo
  • Confirm removing todo

Output

  • Todo should have been removed

Test case 3.8, Todo

Mark todo as done

Input

  • At least one todo
  • Press Done

Output

  • The todo is strike through

Test case 3.9, Todo

Edit todo

Input

  • At least one todo
  • Press edit on a todo
  • Press cancel
  • Press edit on a todo
  • Write a new description
  • Press save

Output

  • The new description should now be shown

Test case 4.1, Logout

Logout

Input

  • Press logout

Output

  • User should now be logged out
  • Good bye message is shown
  • Good bye message disappears on refreshing the page
⚠️ **GitHub.com Fallback** ⚠️