Skip to content

Commit a4396b9

Browse files
ktsnyyx990803
authored andcommitted
Fix broken todomvc test (vuejs#3701)
* fix broken todomvc test * bump casperjs
1 parent c6b1455 commit a4396b9

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"babel-core": "^5.8.0",
5252
"babel-loader": "^5.4.0",
5353
"babel-runtime": "^5.8.0",
54-
"casperjs": "^1.1.0-beta5",
54+
"casperjs": "^1.1.3",
5555
"codecov.io": "^0.1.2",
5656
"eslint": "^2.9.0",
5757
"eslint-config-vue": "^1.0.0",

test/e2e/todomvc.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ casper.test.begin('todomvc', 63, function (test) {
44
casper
55
.start('examples/todomvc/index.html')
66
.then(function () {
7+
this.viewport(1000, 1000) // for appearing destroy buttons by mouse hover
78
test.assertNotVisible('.main', '.main should be hidden')
89
test.assertNotVisible('.footer', '.footer should be hidden')
910
test.assertElementCount('.filters .selected', 1, 'should have one filter selected')
@@ -90,6 +91,9 @@ casper.test.begin('todomvc', 63, function (test) {
9091

9192
// remove a completed item --------------------------------------------
9293

94+
.then(function () {
95+
this.mouse.move('.todo:nth-child(1)')
96+
})
9397
.thenClick('.todo:nth-child(1) .destroy', function () {
9498
test.assertElementCount('.todo', 4, 'should have 4 items now')
9599
test.assertElementCount('.todo.completed', 2, 'should have 2 item completed')
@@ -98,6 +102,9 @@ casper.test.begin('todomvc', 63, function (test) {
98102

99103
// remove a incompleted item ------------------------------------------
100104

105+
.then(function () {
106+
this.mouse.move('.todo:nth-child(2)')
107+
})
101108
.thenClick('.todo:nth-child(2) .destroy', function () {
102109
test.assertElementCount('.todo', 3, 'should have 3 items now')
103110
test.assertElementCount('.todo.completed', 2, 'should have 2 item completed')

0 commit comments

Comments
 (0)