@@ -4,6 +4,7 @@ casper.test.begin('todomvc', 63, function (test) {
4
4
casper
5
5
. start ( 'examples/todomvc/index.html' )
6
6
. then ( function ( ) {
7
+ this . viewport ( 1000 , 1000 ) // for appearing destroy buttons by mouse hover
7
8
test . assertNotVisible ( '.main' , '.main should be hidden' )
8
9
test . assertNotVisible ( '.footer' , '.footer should be hidden' )
9
10
test . assertElementCount ( '.filters .selected' , 1 , 'should have one filter selected' )
@@ -90,6 +91,9 @@ casper.test.begin('todomvc', 63, function (test) {
90
91
91
92
// remove a completed item --------------------------------------------
92
93
94
+ . then ( function ( ) {
95
+ this . mouse . move ( '.todo:nth-child(1)' )
96
+ } )
93
97
. thenClick ( '.todo:nth-child(1) .destroy' , function ( ) {
94
98
test . assertElementCount ( '.todo' , 4 , 'should have 4 items now' )
95
99
test . assertElementCount ( '.todo.completed' , 2 , 'should have 2 item completed' )
@@ -98,6 +102,9 @@ casper.test.begin('todomvc', 63, function (test) {
98
102
99
103
// remove a incompleted item ------------------------------------------
100
104
105
+ . then ( function ( ) {
106
+ this . mouse . move ( '.todo:nth-child(2)' )
107
+ } )
101
108
. thenClick ( '.todo:nth-child(2) .destroy' , function ( ) {
102
109
test . assertElementCount ( '.todo' , 3 , 'should have 3 items now' )
103
110
test . assertElementCount ( '.todo.completed' , 2 , 'should have 2 item completed' )
0 commit comments