Skip to content

Instantly share code, notes, and snippets.

@aghecht
Forked from colinrymer/gist:5798469
Created June 17, 2013 17:41
Show Gist options
  • Save aghecht/5798675 to your computer and use it in GitHub Desktop.
Save aghecht/5798675 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.

@aghecht
Copy link
Author

aghecht commented Jun 17, 2013

  Feature: Submit a review
     In order to provide better feedback on apartment listings
     As a user
     I should be able to submit a review when visiting the site

  Scenario: User submits a valid review and verifies the apartment identity
   Given a user views a listing
    When the user submits a review containing name, email address, phone number, and rating
     And the user selects the correct captcha
    Then the user should see the thank you page
     And the user should see the review appended to the list of apartment reviews

  Scenario: User submits a valid review and does not verify the apartment identity
   Given a user views a listing
    When the user submits a review containing name, email address, phone number, and rating
     And the user selects an incorrect captcha
    Then the user should see a verification message

  Scenario: User submits an invalid review
    Given a user views a listing
    When the user submits a review containing email address
    Then the user should see a validation message

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