As a user, I want to sort questions by if they have pictures. - CMPUT301F14T06/Team06MapleSyrup GitHub Wiki

Use Case: User want to sort question by image

Use Case Name: SortByImage

Participating Actors: User

Goal: sort the question by if they have picture or not

Trigger: User click the sort spinner to see sort options

Precondition: User is connected to the internet, user knows the order of questions he want to see.

Postcondition: The system should show the questions that contain images first if user choose to sort by have picture, and show the question that do not contain images first if user choose to sort by no picture.

Basic Flow:

1. User click on sort spinner

2. User selects Sort By Picture option

3. the List display sorted list

Exceptions:

3.0 No Questions in the database

- The sort List is empty

3.0 Internet is not connected

- 3.1 Return to the main fragment, the List become empty

- 3.2 A Toast shows no internet access

- 3.3 Go to profile fragment and click local questions button to view saved questions and answers

Test:

  • the apps will allow user sort the Questions.
    • Create a Question list
    • Create two Questions, first one with picture, second one without picture.
    • Insert the Questions into the Question list
    • Click Sort by Qictures
    • Are the Questions correctly sorted?