Conceptual Tests - achapawa/SD2 GitHub Wiki

Mark as complete

Given: A task not yet complete
When: User attempts to mark it as complete
Then: The task is marked and saved as complete

Given: A task is complete
When: User trys to mark task as complete
Then: An error message is given saying the task is complete

Delete a task

Given: A task is is in a list
When: User selects to delete the task
Then: The task is deleted

Given: No task has been made
When: User tries to elete a task
Then: There will be no option to delete a task until a task is made

Make a task

Given: User is viewing a listen
When: User selects to make a task, and inputs the wanted information
Then: A new task is made within the list being viewd

Given: User is viewing a task
When: User selects to make a task, and inputs the wanted information
Then: A subtask is created

Given: User is viewing a subtask
When: User trys to make a task
Then: no task is able to be created

See User

Given: Admin is logged in, and Users have created accounts
When: Admin attempts to view Users
Then: All the User profiles are shown to the Admin

Given: Admin is logged in, and Users have not yet created accounts
When: Admin attempts to view Users
Then: A screen is loaded stating that there are currently no Users

Given: User is logged in
When: User wants to see  other Users
Then: THere is no way for the User to see other Users.

Change password

Given: Admin is logged in, and can put in ther own password
When: Admin attempts to change a password
Then: The password is changed

Given: Admin is logged in, but can't put in ther own password
When: Admin attempts to change a password
Then: The pssword is not changed, as the Admin needs top put in there own password as well

Duplicate

Given: User has a task
When: User attempts to duplicate task
Then: Task is duplicated

Given: User doen't have a task
When: User tries to duplicate a task
Then: THere will be no optipon to duplicate when a task hasn't been made yet

View Archived List

Given: User has archived at least one list
When: User goes to view archived lists
Then: The Archived Lists will be displayed for the User

Given: User has not yet archived any lists
When: User goes to view archived lists\
Then: A message is displayed saying there are no archived lists to view

Log in

GIVEN: This user's account already exists
WHEN: User inputs correct username and password
THEN: User is "logged in" and their home screen is displayed

GIVEN: This user's account does not already exist
WHEN: User selects "Create new account"
THEN: User is sent to the "Create Account" acceptance test

GIVEN: This user's account already exists
WHEN: User inputs incorrect username and password
THEN: User is informed that their password was incorrect and is asked to log in again

##Remove Task from List
GIVEN: User is in list, selects a task
WHEN: User presses "delete task"
THEN: Deletes "task" object from list and refreshes UI to show new list

GIVEN: User is in list view, selects a sublist
WHEN: User presses "delete task"
THEN: Displays error message declaring that the item was not a task and cannot be deleted with that command

Move task to list

GIVEN: User is in list, selects a task
WHEN: User presses "move to list" button, selects ID of list to move to
THEN: Moves task to selected list, updates UI and saves

GIVEN: User is in list, selects a task
WHEN: User presses "move to list" button, but does not select a list to move to (i.e. cancels selection)
THEN: Display confirmation dialog to not move task, replaces program to initial state

GIVEN: User is in list, selects a non-task object
WHEN: User presses "move to list" button
THEN: Displays error message declaring the item was not a task and cannot use this method

Create sublist

GIVEN: User is in list
WHEN: User presses "create sublist" button, writes sublist name and description
THEN: Creates sublist with input information, places UI state in sublist

GIVEN: User is in list
WHEN: User presses "create sublist" button, cancels creation before writing name and description
THEN: Resets program state to position before the button was pressed

GIVEN: User is in list
WHEN: User presses "create sublist" button, but uses special characters or characters that cannot be parsed
THEN: Displays error dialog and prompts user to input name and description without special characters

Create new section

GIVEN: User is in list
WHEN: Selects "create new section" button, writes section name when prompted
THEN: Creates sublist with input information, adds sublist to list state after saving program

GIVEN: User is in list
WHEN: User presses "create new section" button, but cancels creation before finishing section name
THEN: Resets program state to position before the button was pressed in the first place

GIVEN: User is in list
WHEN: User presses "create new section" button, but uses special characters or characters that cannot be parsed
THEN: Displays error dialog and prompts user to input section name without special characters

Archive List

GIVEN: User is in list view
WHEN: User selects "Archive this list" button
THEN: Displays confirmation dialog. If confirmed, then archives the list and updates the UI to "archived list" UI

GIVEN: User is in list view
WHEN: User selects "Archive this list" button
THEN: Displays confirmation dialog. If not confirmed, then resets program state to before button was pressed

Search

GIVEN: The user is logged in and is on a search bar 
WHEN: User attempts to search for a task\
THEN: System displays that task and user can work on it.

GIVEN: The user is logged in and is on a search bar
WHEN: User attempts to search for a list\
THEN: System displays that list and user can work on it.

GIVEN: The user is logged in and finds a search bar
WHEN: User types something that is not a list/sublist/label/task/subtask etc.
THEN: System gives a message saying nothing matches to the user.

System settings

GIVEN: The user clicks the settings diaglog 
WHEN: User attempts to store the information in a particular location 
THEN: The system stores the information in a data file in the specified location.

GIVEN: The system with default no. of items per page and the user is in settings dialog 
WHEN: User attempts to change to 10 items per page
THEN: The system displays the 10 items in a page.

GIVEN: The user clicks the settings dialog 
WHEN: User attempts to set base directory name
THEN: The system sets the name relative to the base program's directory or possibly stored in the user's home directory.

View completed tasks

GIVEN: There are no any completed tasks\
THEN: User attempts to see the completed tasks
THEN: The system displays no any tasks completed.

GIVEN: The user is in view list 
WHEN: User attempts to see all the completed tasks
THEN: The system displays the completed tasks.

Make a list

GIVEN: The user is in view list dialog
WHEN: User attempts to create a new list "List2"
THEN: The system makes List2 and user is able to view and add task to that list

GIVEN: The user is in view list dialog
WHEN: User attempts to create a new list but doesn't enter required field such as name of list
THEN: The system shows a error and asks to enter the required fields.

Make a subtask

GIVEN: The user is in the task in the list view
WHEN: User attempts to make a new subtask "newSubtask" with it's priority and due date.
THEN: The system adds that to the task and user is able to work and view on that task.

GIVEN: The user is in the task in the list view
THEN: User attempts to make a subtask and doesn't input due date and priority details to the subtask
THEN: The system shows a error message and directs to input the details.

User creation tests

GIVEN: User is logged out
WHEN: User attempts to create a new user
THEN: System adds new user info to “./config/users.json” and the user is prompted to log in

GIVEN: User is logged out and there is user info in the system
WHEN: User attempts to create a new user with an identifier already in use
THEN: System displays an error and prompts user to re enter their information

GIVEN: User is logged out
WHEN: User attempts to create a new user with an invalid email address
THEN: System displays an error and prompts user to re enter their information

GIVEN: User is logged out
WHEN: User attempts to create a new user with missing information
THEN: System displays an error and prompts user to re enter their information

Task edit tests

GIVEN: User has a task called “Feed Cat” and a user id of “johnsmith”
WHEN: User attempts to edit task to be called “Feed Dog”
THEN: System changes the task title to “Feed Dog” and saves the changes in “./data/johnsmith.json

GIVEN: User has a task with no tags and a user id of “johnsmith”
WHEN: User attempts to add the tag “Important” to the task
THEN: System adds “Important” to the tasks list of tags and saves the changes in “./data/johnsmith.json”

GIVEN: User has a task that is due on 03/11 and a user id of “johnsmith”
WHEN: User attempts to edit the task to have a due date of 03/22
THEN: System updates task due date to 03/22 and saves the changes in “./data/johnsmith.json”

GIVEN: User has an overdue task due 02/09 and a user id of “johnsmith”
WHEN: User attempts to edit the task to have a due date of 05/15 so it is no longer overdue
THEN: System updates task due date to 05/15, sets the “overdue” value to false, and saves the changes in “./data/johnsmith.json”

Log out test

GIVEN: User is logged in and has a user id of “johnsmith”
WHEN: User attempts to log out
THEN: System saves user data to “./data/johnsmith.json”, empties the ui manager of all the user’s lists, and prompts the user to log in or create a user

Add Comment Test

GIVEN: User has a list without comments and has a user id of “johnsmith”
WHEN: User attempts to added a comment called “This list is pretty cool” to the list
THEN: The system adds “This list is pretty cool” to the list’s list of comments, displays the comment to the user, and saves the changes to “./data/johnsmith.json” 
⚠️ **GitHub.com Fallback** ⚠️