Acceptance Tests - PaulL48/SOEN341-SC4 GitHub Wiki
Acceptance Test 1: Create a question
Acceptance Test 2: Viewing questions
Acceptance Test 3: Answering a question
Acceptance Test 4: Voting on questions and answers
Acceptance Test 5: Accepting an answer
Acceptance Test 6: Suggesting a rewording of a question
This test shows whether a user can write and post a question when logged in.
User Story: 1
Step | Test Data | Expected Outcome | Actual Outcome | Notes | Status |
---|---|---|---|---|---|
1. The user logs into an account which takes them to the homepage | Valid email and password | The user is logged in | The user is logged in | Pass | |
2. The user clicks on the "Ask a Question" button | Redirects the user to the Ask a Question page. | Redirected the user to the Ask a Question page. | Pass | ||
3. Then the user is taken to a page with two text boxes for question title and body | Title and body fields | The fields can be modified by the user. | The fields can be modified by the user. | Pass | |
4. The user enters the question title and body in their respective text boxes | Title and body strings | The user can enter the title and body of his or her question. | The user can enter the title and body of his or her question. | Pass | |
5. The user clicks the "Post your Question" button | The question gets posted | The question gets posted | Pass | ||
6. The user is taken to the home page | The user gets redirected to the home page, where the question appears | The user got redirected to the home page, where the question appears. | Pass |
PASSED
This test shows whether a user can view a question.
User Story: 2
Step | Test Data | Expected Outcome | Actual Outcome | Notes | Status |
---|---|---|---|---|---|
1. The user navigates to the homepage | Directs user to the Home Page | Directed user to the Home Page | Allows guest users | Pass | |
2. The user clicks on one of the question titles displayed on the page | Directs user to the Question Page | Directed user to the Question Page | Allows guest users | Pass | |
3. The user is taken to a page with the Question details | Question ID | Displays the question title, body, the answers, the votes and whether an answer is accepted. | Displayed the question title, body, the answers, the votes and whether an answer is accepted. | Pass |
PASSED
This test shows that a user can answer a question that is not his own.
User Story: 3
Step | Test Data | Expected Outcome | Actual Outcome | Notes | Status |
---|---|---|---|---|---|
1. The logged-in user clicks on a question that is not his own | Question ID | The user is redirected to the Question Page | The user was redirected to the Question Page | The question does not yet have an accepted answer | Pass |
2. The user types his/her answer in the answer box below the question | String, answer | The text box is populated with the answer | The text box is populated with the answer | Pass | |
3. The user presses the button to submit his/her answer | The answer appears under the question | The answer appeared under the question | Pass | ||
4. The user repeats steps 1-3, but with a question he/she wrote him/herself. | A pop-up shall appear telling the user they cannot answer their own question | A pop-up appeared telling the user they cannot answer their own question. | Pass |
PASSED
This test shows that a user can upvote/downvote on a question/answer, but only once in either direction. The user must also be logged in.
User Story: 4
Step | Test Data | Expected Outcome | Actual Outcome | Notes | Status |
---|---|---|---|---|---|
1. The logged-out user attempts to upvote or downvote on any question on the front page. | No effect on votecount. | No effect on votecount. | Pass | ||
2. The logged-out user clicks on any question. | The user is redirected to the question page | The user was redirected to the question page | Pass | ||
3. The logged-out user attempts to upvote or downvote on any answer. | No effect on votecount. | No effect on votecount. | Pass | ||
4. The user logs into the website. | Valid email and password | User is now logged in | User is now logged in | Pass | |
5. The user upvotes any question. | The votecount increases by one. | The votecount increases by one. | Pass | ||
6. The user tries upvoting the same question again. | The votecount does not change. | The votecount does not change. | Pass | ||
7. The user downvotes the question | Shall return the vote count to the original amount. | Returned the vote count to the original amount. | Pass | ||
8. The user downvotes again. | The votecount reduces by one. | The votecount reduces by one. | Pass | ||
9. The user tries downvoting again | The vote count shall not change. | The vote count did not change | Pass | ||
10. The user clicks on any question. | The user is redirected to the question page | The user was redirected to the question page | Pass | ||
11. Steps 5-9 are performed on any answer to the question. | The same limit of one upvote/downvote shall apply | The same limit of one upvote/downvote did apply | Pass |
PASSED
This test shows that the user shall be able to accept only one answer to his or her question, without being able to accept another answer unless the original accepted answer is unaccepted.
User Story: 5
Step | Test Data | Expected Outcome | Actual Outcome | Notes | Status |
---|---|---|---|---|---|
1. As an existing user, click on sign-in and enter a valid email address and password | email address and password | The user is signed in successfully | The user is signed in successfully | Pass | |
2. Click on a question written by the user with at least one answer, none of which are accepted | Question, array of answers | The question shall appear with a list of answers, none of which have the "Accepted" icon. | The question appears with a list of answers, none of which have the "Accepted" icon. | Pass | |
3. Click the Accept Answer button next to the answer that should be accepted. | Answer 2 | The button shall turn green | The button turns green | Pass | |
4. Attempt to click the Accept Answer button next to another answer. | Answer 2 | Nothing should happen. | Nothing happens. | Pass | |
5. Click on the Accept Answer button once more on the answer that is already accepted. | Answer 1 | The answer shall no longer be accepted. | The answer is no longer accepted. | Pass | |
6. Click on the Accept Answer button on any other answer. | Answer 2 | The answer shall be accepted. | The answer is accepted. | Pass |
PASSED
This test shows that the user shall be able to suggest an edit to an a question with no accepted answer, and the original author shall be able to accept or decline the suggestion.
User Story: 6
Step | Test Data | Expected Outcome | Actual Outcome | Notes | Status |
---|---|---|---|---|---|
1. Click on a question written by another user with no accepted answers | Question, array of answers | The user is redirected to the Question Page | The user is redirected to the Question Page | Pass | |
3. A suggestion box is present under the question, the user enters a suggestion and clicks the Suggest button | Suggestion string | The suggestion shall appear under the question | The suggestion appears under the question. | Pass | |
4. The author of the question logs in | Valid email and password | The user is redirected to the home page | The user is redirected to the home page. | Pass | |
5. The author of the question clicks on the question with the pending suggestion from the homepage. | The user is redirected to the Question Page, where the suggestion is present with an Accept and a Decline button. | The user is redirected to the Question Page, where the suggestion is present with an Accept and a Decline button. | Pass | ||
6. The author clicks the accept or decline button. | If the Accept button is pressed, the question shall become the suggestion and the suggestion shall disappear. If the Decline button is pressed, the question shall remain the same and the suggestion shall disappear. | If the Accept button is pressed, the question becomes the suggestion and the suggestion disappears. If the Decline button is pressed, the question remains the same and the suggestion disappears. | Pass |
PASSED