As a user, I want to upvote the answer of other users. - CMPUT301F14T06/Team06MapleSyrup GitHub Wiki
Use Case: User want to upvote the answer of other users
Use Case Name: AnswerUpVote
Participating Actors: User
Goal: Upvote Sepcific answer
Trigger: User Presses the Upvote button
Precondition: User is viewing the question content and the answers for the question, and knows which answer he want to upvote for
Postcondition: Upvote attribute for that specific answer +1, the upvote count for the answer and the answer list will also update visually to show change.
Basic Flow:
1. User browse a specific question and it's answer
2. User presses Upvote button for the specific answer
3. Answer upvote attribute updates
4. Answer upvote count change on screen
Exceptions:
2.0 Internet is not connected
- 2.1 Return to the main fragment, the List become empty
- 2.2 A Toast shows no internet access
- 2.3 Go to profile fragment and click local questions button to view saved questions and answers
Test:
- the apps will allow user upvote/downvote the Questions.
- Create a Question list
- Create some Questions
- Insert the Questions
- Click upvote/downvote button
- Are the Questions Score (number of Upvote - number of Downvote) correctly displayed?