Created
September 29, 2011 20:30
-
-
Save patrick99e99/1251839 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feature: In order to find posts that are relevant to what I am looking for | |
I want to be able to search for posts and filter the results | |
Background: | |
Given I am on the posts page | |
And the following posts exist: | |
| title | days old | price | distance | category | | |
| bike | .5 | 100 | 5 | Cars & Vehicles | | |
| sandwich | 6 | 5 | 10 | Stuff | | |
| computer | 25 | 1000 | 25 | Phones & Electronics | | |
| t-shirt | 40 | 20 | 666 | Stuff | | |
Scenario Outline: Searching for posts by age | |
When I click the date filter link <link> | |
Then I should see <expected> | |
And I should not see <unexpected> | |
| link | expected | unexpected | | |
| Last 24 Hours | bike | sandwich, computer, t-shirt | | |
| Last 7 days | sandwich | bike, computer, t-shirt | | |
| Last 30 days | computer | bike, sandwich, t-shirt | | |
Scenario Outline: Searching for posts by price range | |
When I search with a price range of <range> | |
Then I should see <expected> | |
And I should not see <unexpected> | |
| price range | expected | unexpected | | |
| 90-110 | bike | sandwich, computer, t-shirt | | |
| 4-6 | sandwich | bike, computer, t-shirt | | |
| 550-1100 | computer | bike, sandwich, t-shirt | | |
| 15-25 | t-shirt | bike, computer, sandwich | | |
Scenario Outline: Searching for posts by distance | |
When I choose the distance <option> | |
Then I should see <expected> | |
And I should not see <unexpected> | |
| option | expected | unexpected | | |
| 1 miles | | bike, sandwich, computer, t-shirt | | |
| 5 miles | bike | computer, t-shirt, sandwich | | |
| 10 miles | bike, sandwich | t-shirt, computer | | |
| 25 miles | computer, bike, sandwich | t-shirt | | |
| 50 miles | computer, bike, sandwich | t-shirt | | |
| Doesn't matter | computer, bike, sandwich, t-shirt | | | |
Scenario Outline: Searching for posts by categories | |
When I click the category link <category> | |
Then I should see <expected> | |
And I should not see <unexpected> | |
| category | expected | unexpected | | |
| Stuff | sandwich, t-shirt | computer, bike | | |
| Phones & Electronics | computer | sandwich, t-shirt, bike | | |
| Cars & Vehicles | bike | sandwich, t-shirt, computer | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment