Yes! Finally we have a chance to compete with the hottest web startups; Todo lists (seriously). To differentiate ourselves from the competition, we've decided to go with a single page app, since that's clearly the best thing we can do. Obviously, our customers care more about our technology choices and less about the actual feature set.
Since we're really awesome developers, we've decided to forego any JavaScript frameworks and build it all from scratch. You're not allowed to have any controllers render HTML. JavaScript all the way!
As a user
When I navigate to the homepage
Then I see a place type a todo
As a user
When I type in a todo
And I click "Create Todo"
Then I see that todo below the input
As a user
When I type in a todo
And I click "Create Todo"
Then I see a flash message telling me it's created
And it fades out after 5 seconds
As a user
Given I have a create todo flash
When I click on the 'x'
Then the flash message is removed
As a user
Given I've created a todo
When I click on the 'x' next to the todo
Then the todo is deleted
As a user
When I type in a todo
And I click "x"
Then I see a flash message telling me it's deleted
And it fades out after 5 seconds
And it's dismissable
As a user
Given I've created a todo
When I click on '✓'
Then the todo is removed from the initial list
And I see it in the 'Completed' section
As a user
When I type in a todo
And I click '✓'
Then I see a flash message telling me it's created
And it fades out after 5 seconds
And it's dismissible
As a user
Given I've created a todo
And I've completed the todo
When I click the 'x' next to the todo
Then the todo is removed
As a user
Given I have only one completed todo
When I delete that todo
Then I no longer see the 'Completed' section
As a user
Given I've created a todo
And I've completed the todo
When I click the 'undo' next to the todo
Then the todo is back in the "Todo" section
As a user
Given I've done a lot of things
When I refresh the page
Then the state of my todo list is persisted