add drawing tests to casper

This commit is contained in:
jdescottes
2014-08-22 00:37:35 +02:00
parent 1955d3f8f5
commit 56b1f421bc
15 changed files with 341 additions and 24 deletions

View File

@@ -0,0 +1,15 @@
casper
.start(casper.cli.get('baseUrl')+"?debug")
.then(function () {
this.wait(casper.cli.get('delay'));
})
.then(function () {
this.echo(casper.cli.get('baseUrl')+"?debug");
// If there was a JS error after the page load, casper won't perform asserts
this.test.assertExists('html', 'Casper JS cannot assert DOM elements. A JS error has probably occured.');
this.test.assertExists('#drawing-canvas-container canvas', 'Check if drawing canvas element is created');
})
.run(function () {
this.test.done();
});