Clean nodeunit + wait test

This commit is contained in:
grosbouddha 2013-05-27 00:59:24 +02:00
parent 85fa98aaa9
commit 921502b752
2 changed files with 6 additions and 17 deletions

View File

@ -11,11 +11,6 @@ module.exports = function(grunt) {
//'<%= nodeunit.tests %>'
]
},
/*
nodeunit: {
tests: ['tests/nodeunit/*_test.js']
},
*/
connect: {
www: {
options: {
@ -38,21 +33,13 @@ module.exports = function(grunt) {
printFilePaths: true
}
}
/*
test: {
files: [{
src: ['tests/integration/casperjs/*_test.js']
}]
},
*/
}
});
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-jshint');
//grunt.loadNpmTasks('grunt-contrib-nodeunit');
grunt.loadNpmTasks('grunt-ghost');
grunt.registerTask('test', ['jshint', /*'nodeunit',*/ 'connect', 'ghost']);
grunt.registerTask('test', ['jshint', 'connect', 'ghost']);
};

View File

@ -1,9 +1,11 @@
casper
.start(casper.cli.get('baseUrl'))
.then(function () {
this.test.assertExists('#drawing-canvas-container canvas', 'Check if drawing canvas element is created');
this.test.assertExists('#preview-list .preview-tile', 'Check if first frame is created');
this.test.assertExists('#preview-canvas-container canvas', 'Check if animation preview canvas is created');
this.wait(5000, function() {
this.test.assertExists('#drawing-canvas-container canvas', 'Check if drawing canvas element is created');
this.test.assertExists('#preview-list .preview-tile', 'Check if first frame is created');
this.test.assertExists('#preview-canvas-container canvas', 'Check if animation preview canvas is created');
});
})
.run(function () {
this.test.done();