As a user, I want to sort questions by date or some scoring system. - CMPUT301F14T06/Team06MapleSyrup GitHub Wiki

Use Case: User want to sort question by other options

Use Case Name: SorterByOtherOption

Participating Actors: User

Goal: Sort question in question list by user's preference.

Trigger: User select the Sort By Date or Sort By Scoring from the sort spinner to sort the questions

Precondition: User knows what order he want to see

Postcondition: The system should show question in the order of user's preference

Basic Flow:

1. User click on sort spinner

2. User selects sort by date or sort by score from the sort spinner

3. App display sorted list

Exceptions:

3.0 No Question 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 upvote once, second one with downvote once.
    • Insert the Questions into the Question list
    • Click Sort by Score (number of Upvote - number of Downvote)
    • Are the Questions correctly sorted?
    • Click Sort by Date
    • Are the Questions correctly sorted?