Created
June 30, 2010 15:24
-
-
Save gamafranco/458785 to your computer and use it in GitHub Desktop.
This file contains 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
# @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 | 2009/06/09 | Action | 1 | | |
| act | 2009/06/09 | Action | 0 | | |
| action | 2009/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