Created
April 11, 2011 23:34
-
-
Save gmoeck/914609 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
Scenario('Searching For An Item', function() { | |
Given('an item that is available', function() { | |
var itemTitle = 'item'; | |
beforeEach(function() { | |
Application.server.addResource('Item', {title: itemTitle}); | |
}); | |
When('I am on the homepage of the application', function() { | |
beforeEach(function() { | |
Application.statechart.gotoState('started'); | |
}); | |
And('I search for that item', function() { | |
beforeEach(function() { | |
WebPage.fillIn('#mainSearchWidget .search-field-view input[type="text"]', itemTitle); | |
WebPage.clickOn('#mainSearchWidget .submit-search'); | |
}); | |
Then('I should see the auction item within the search results', function() { | |
WebPage.within('.search-results', function(page) { | |
expect(page).toHaveContent(itemTitle); | |
}); | |
}); | |
}); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment