Skip to content

Instantly share code, notes, and snippets.

@joshtombs
Last active August 29, 2015 14:05
Show Gist options
  • Save joshtombs/615fda9b9355971f50d1 to your computer and use it in GitHub Desktop.
Save joshtombs/615fda9b9355971f50d1 to your computer and use it in GitHub Desktop.
module.exports = function(){
this.Given(/^I visit TODOMVC$/,function(){
this.driver.get('http://todomvc.com/architecture-examples/backbone/')
});
this.When(/^I enter "([^"]*)"$/, function(value){
new this.Widget({
root: "#new-todo"
}).sendKeys(value,Driver.Key.ENTER);
});
this.Then(/^I should see "([^"]*)"$/, function(expected){
this.Widget.List.extend({
root: "ul",
childSelector: "li"
}).readAt(0).then(function(read){
console.log(read)
});
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment