As a user, I want to see the most upvoted questions and most upvoted answers. - CMPUT301F14T06/Team06MapleSyrup GitHub Wiki
Use Case: Display the Most Upvoted Questions and Answers
Use Case Name: MostUpvote
Participating Actors: User
Goal: Display the most upvoted questions and answers for users.
Trigger: User choose sort by question upvote or sort by answer upvote option from the sort spinner
Precondition: User go to the main activity
Postcondition: The list of question that is sort by question's upvote or by answer's upvote will be showed on the screen. The first question will be the question with the most upvote or the question with the most upvote answer, depends on which sort method the user chose.
Basic Flow:
-
User goes to the main page
-
User choose sort by question upvote or sort by answer upvote option from the sort spinner
-
The list view of question will be update. The first question will be the question with the most upvote or the question with the most upvote answer, depends on which sort method the user chose.
Exceptions:
1.0 No data recorded in the database
- 1.1 The view is empty
1.0 Internet is not connected
- 1.1 Return to the main fragment, the List become empty
- 1.2 A Toast shows no internet access
- 1.3 Go to profile fragment and click local questions button to view saved questions and answers
Constraints: User need to have wifi connected in order to retrieve data from the database.
Test:
- the apps will allow user view the most upvoted Question and Answer.
- Create a Question list
- Create some Questions
- Insert Questions into Question list
- upvote these Questions with different value
- Create some Answers for these Questions
- Insert Answers under Questions
- upvote Answers with different value
- Are the most upvoted Question and the most upvoted answer correctly displayed?