|
|
@@ -4,6 +4,7 @@ casper.test.begin('todomvc', 63, function (test) {
|
|
|
casper
|
|
|
.start('examples/todomvc/index.html')
|
|
|
.then(function () {
|
|
|
+ this.viewport(1000, 1000) // for appearing destroy buttons by mouse hover
|
|
|
test.assertNotVisible('.main', '.main should be hidden')
|
|
|
test.assertNotVisible('.footer', '.footer should be hidden')
|
|
|
test.assertElementCount('.filters .selected', 1, 'should have one filter selected')
|
|
|
@@ -90,6 +91,9 @@ casper.test.begin('todomvc', 63, function (test) {
|
|
|
|
|
|
// remove a completed item --------------------------------------------
|
|
|
|
|
|
+ .then(function () {
|
|
|
+ this.mouse.move('.todo:nth-child(1)')
|
|
|
+ })
|
|
|
.thenClick('.todo:nth-child(1) .destroy', function () {
|
|
|
test.assertElementCount('.todo', 4, 'should have 4 items now')
|
|
|
test.assertElementCount('.todo.completed', 2, 'should have 2 item completed')
|
|
|
@@ -98,6 +102,9 @@ casper.test.begin('todomvc', 63, function (test) {
|
|
|
|
|
|
// remove a incompleted item ------------------------------------------
|
|
|
|
|
|
+ .then(function () {
|
|
|
+ this.mouse.move('.todo:nth-child(2)')
|
|
|
+ })
|
|
|
.thenClick('.todo:nth-child(2) .destroy', function () {
|
|
|
test.assertElementCount('.todo', 3, 'should have 3 items now')
|
|
|
test.assertElementCount('.todo.completed', 2, 'should have 2 item completed')
|