Skip to content

Instantly share code, notes, and snippets.

@samccone
Created July 16, 2014 17:30
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/9f5c14a0753b45711196 to your computer and use it in GitHub Desktop.
Save samccone/9f5c14a0753b45711196 to your computer and use it in GitHub Desktop.
todo mvc sample
./node_modules/.bin/dill --coffee --require steps --format=pretty
Feature: TODO MVC
Background:
Given I am viewing todomvc
Scenario: Adding and Completing
When I add a new todo
And I finish it
Then I should see no undone todos
module.exports = ->
@Given /^I am viewing todomvc$/, ->
@driver.get("http://todomvc.com/architecture-examples/backbone/")
@When /^I add a new todo$/, ->
@Widget.find({root: "#new-todo"}).then (widget) ->
widget.el.sendKeys("doge", Driver.Key.ENTER)
@When /^I finish it$/, (callback) ->
new @Widget({root: "#todo-list .toggle"}).click()
@Then /^I should see no undone todos$/, (callback) ->
new @Widget({root: "#todo-count"}).read().should.eventually.eql("0 items left")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment