Use cases - OskarKlintrotSkolarbeteWP14/1dv608-Project GitHub Wiki

UC1 Register a new user

Preconditions

User is at the front page

Main scenario

  1. User want to register a new user account.
  2. The system renders a registration form.
  3. The user fill in the form.
  4. The system creates the user

Alternate scenarios

  • 4a. User already exist
    • i. System presents error message.
    • ii. Step 2 in main scenario.
  • 4b. User enters illegal credentials
    • i. System presents error message.
    • ii. Step 2 in main scenario.

UC2 Login

Preconditions

UC 1 is successful.

Main scenario

  1. User enters credentials
  2. System login user

Alternate scenarios

  • 2a. Credentials are incorrect
    • i. System presents error message.
    • ii. Step 1 in main scenario.

UC3 Create Todo

Preconditions

UC 2 is successful.

Main scenario

  1. The user enters a new todo
  2. The system adds the new todo to the database
  3. The system renders a new view with the new todo's from the database

Alternate scenarios

  • 2a. The todo is not valid.
    • i. System shows an error message.
    • ii. Step 1 in main scenario.

UC4 Edit todo

Preconditions

UC 3 is successful.

Main scenario

  1. User wants to edit a todo
  2. System rerender the view and now let's the user edit the todo
  3. User edits todo and saves it
  4. The system updates the todo in the database

Alternate scenarios

  • 4a. Todo is not valid
    • i. System shows an error message.
    • ii. Step 2 in main scenario.

UC5 Mark todo as done

Preconditions

UC 3 is successful.

Main scenario

  1. User marks a todo as done
  2. System rerender the view and now strike out the todo

Alternate scenarios

UC6 Unmark todo as done

Preconditions

UC 5 is successful.

Main scenario

  1. User want to unmark a todo as done
  2. System rerender the view and now don't strike out the todo

Alternate scenarios

UC7 Remove todo

Preconditions

UC 3 is successful.

Main scenario

  1. User want to remove a todo
  2. System ask the user to confirm
  3. User confirm
  4. System removes the todo

Alternate scenarios

  • 3a. User don't confirm
    • i. Rerender todo-list.

UC8 Logout

Preconditions

UC2 is successful.

Main scenario

  1. User want to log out
  2. System logout user

Alternate scenarios