Skip to content

Instantly share code, notes, and snippets.

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