Skip to content

Instantly share code, notes, and snippets.

@gamafranco
Created June 30, 2010 15:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gamafranco/458786 to your computer and use it in GitHub Desktop.
Save gamafranco/458786 to your computer and use it in GitHub Desktop.
# @admin
Background:
Given today is "2010/06/16"
Given a user "Ima Director" has a movie "Land of the Dead" with genres "Action, Adventure, Animation, Anime"
And the user "Ima Director" has a movie "The Dark Knight" with genre "Children, Teen, Comedy"
And the user "Ima Director" has a movie "Ninja Scroll" with genre "Documentary, Drama, Family, Fantasy"
Scenario Outline: No searches
When stats page
Then I should see the following in the "Top Genres (2010/05/17 - 2010/06/16)" table:
| Genre | Hits |
| Action | 0 |
| Adventure | 0 |
| Animation | 0 |
| Anime | 0 |
| Children | 0 |
| Teen | 0 |
| Comedy | 0 |
| Documentary | 0 |
| Drama | 0 |
| Family | 0 |
And I should not see "Fantasy"
Scenario Outline: Genre Searches
Given a user "Ima Director" searched for "<search term>" on "<search date>"
When I go to the stats page
Then I should see "<genre>" with "<hits>" hits on table "Top Genres (2010/05/17 - 2010/06/16)"
Examples:
| search term | search date | genre | hits |
| action | 2010/06/09 | Action | 1 |
| act | 2010/06/09 | Action | 0 |
| action | 2010/06/09 | Adventure | 0 |
| action | 2005/06/09 | Action | 0 |
Scenario Outline: Multiple searches
Given a user "Ima Director" searched for "children" on "010/05/10"
Given a user "Ima Director" searched for "children" on "010/05/16"
Given a user "Ima Director" searched for "children" on "010/05/19"
Given a user "Ima Director" searched for "children" on "010/05/21"
Given a user "Ima Director" searched for "adventure" on "010/05/21"
Given a user "Ima Director" searched for "animation" on "010/05/21"
Then I should see the following in the "Top Genres (2010/05/17 - 2010/06/16)" table:
| Genre | Hits |
| Children | 3 |
| Adventure | 1 |
| Animation | 1 |
| Anime | 0 |
| Action | 0 |
| Teen | 0 |
| Comedy | 0 |
| Documentary | 0 |
| Drama | 0 |
| Family | 0 |
And I should not see "Fantasy"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment