Skip to content

Voting on posts #27

@yashburshe

Description

@yashburshe

Feature: Voting on posts

Context: Voting on a post increases the post's credibility. A post with many votes is considered a “better” post than ones without as many votes. When viewing a site like SO where a user may come to find “good” or correct answers to their questions, voting provides insight to the user on which posts to discard immediately. Voting can also help users evaluate their posts in retrospective, receiving less votes (or even negative votes) acts as a nudge/punishment to the OP that their post wasn’t up to the mark of the general community they posted to which can help them improve their posting behavior in the future.

Description: As a registered user on the website I want to be able to vote down/up on posts

Acceptance Criteria

Scenario 1: Successfully view vote count

Given a user (logged in or not) is viewing a post
When they see a post
Then they should see the amount of votes a post has and two vote arrows up and down both grey

Scenario 2: Successfully vote up a post

Given the user is logged in and has not voted up on the post before
When they vote up the post
Then the vote count should increase by one

Scenario 3: Successfully remove an existing vote up

Given the user is logged in and has voted up the post before
When they vote up the post
Then the vote count should decrease by one

Scenario 4: Successfully vote down a post

Given the user is logged in and has not voted down the post before
When they vote down a post
Then the vote count should decrease by one

Scenario 5: Successfully remove an existing vote down

Given the user is logged in and has voted down on the post before
When they vote down the post
Then the vote count should increase by one

Scenario 5: Successfully change a vote up to a vote down

Given the user is logged in and has voted up on the post before
When they vote down the post
Then the vote count should decrease by two

Scenario 5: Successfully change a vote down to a vote up

Given the user is logged in and has voted down on the post before
When they vote up the post
Then the vote count should increase by two

Scenario 6: Unsuccessfully vote on a post

Given the user is not logged in
When they vote up or down a post
Then the vote count should not change and the user should be prompted to log in

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions