Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix broken todomvc test #3701

Merged
merged 2 commits into from
Sep 19, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"babel-core": "^5.8.0",
"babel-loader": "^5.4.0",
"babel-runtime": "^5.8.0",
"casperjs": "^1.1.0-beta5",
"casperjs": "^1.1.3",
"codecov.io": "^0.1.2",
"eslint": "^2.9.0",
"eslint-config-vue": "^1.0.0",
Expand Down
7 changes: 7 additions & 0 deletions test/e2e/todomvc.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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')
Expand All @@ -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')
Expand Down