Skip to content

Instantly share code, notes, and snippets.

@mpelzsherman
Forked from colinrymer/gist:5798469
Created June 17, 2013 17:49
Show Gist options
  • Save mpelzsherman/5798742 to your computer and use it in GitHub Desktop.
Save mpelzsherman/5798742 to your computer and use it in GitHub Desktop.

Product management has come up with the idea of allowing website users to leave reviews and ratings for listings. This feedback will be entered similar to how leads are submitted, but the user must enter the following information:

  • name
  • email address
  • phone number
  • rating from 1 to 5
  • optional review

In addition to the above information, a CAPTCHA presenting three different apartment complexes (only one of which is correct) is used in conjunction with the user’s name and phone number to determine whether or not the user actually lived at the listing. After validating and verifying the information, the user gets redirected to a thank you page. After a review is successfully submitted, it will show up as the first entry in the reviews for the listing. Pre-existing “certified resident” reviews will be integrated along with reviews that are submitted through the site. On the search results page, users can sort on rating type or filter on review type and rating. A link on each listing will take the user to the review area, which is presented as the sixth tab on the listing’s details page.

@mpelzsherman
Copy link
Author

Feature: User-Submitted Ratings
  In order to help other users make an informed decision about renting a property
  As a user
  I should be able to submit a property review

  Scenario: User submits a review with valid data
    Given they navigate to the "Submit Review" page for a listing
    When they submit the review with valid data
    Then they should see a success message

  Scenario: User submits a review with invalid data
    Given they navigate to the "Submit Review" page for a listing
    When they submit the review with invalid data
    Then they should see an error message

Feature: Captcha for User Reviews
  In order to ensure the authenticity of user reviews
  As a user
  I should be forced to answer a Captcha challenge correctly

  Scenario: User fails challenge
    Given they see the captcha challenge
    And they answer incorrectly
    Then should see an error message
    And the review should not be submitted

  Scenario: User wins challenge
    Given they see the captcha challenge
    And they answer correctly
    Then the review should be submitted

Feature: Sort on Rating Type

  Scenario: User sorts by user ratings
    Given they search for listings with both user and resident ratings
    And they sort by rating type "user"
    Then the first listing should be of type "user"

  Scenario: User sorts by resident ratings
    Given they search for listings with both user and resident ratings
    And they sort by rating type "resident"
    Then the first listing should be of type "resident"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment