2013-05-26 22:29:40 +00:00
|
|
|
casper
|
2013-08-04 19:47:17 +00:00
|
|
|
.start(casper.cli.get('baseUrl')+"?debug")
|
2013-08-04 19:20:25 +00:00
|
|
|
.then(function () {
|
2013-08-11 08:45:56 +00:00
|
|
|
this.wait(3000);
|
2013-08-04 19:47:17 +00:00
|
|
|
})
|
|
|
|
.then(function () {
|
|
|
|
this.echo(casper.cli.get('baseUrl')+"?debug");
|
2013-08-11 08:45:56 +00:00
|
|
|
// If there was a JS error after the page load, casper won't perform asserts
|
2013-08-04 19:20:25 +00:00
|
|
|
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();
|
2013-08-11 08:45:56 +00:00
|
|
|
});
|