added Function.prototype.bind polyfill for PhantomJS. Make Casper happy.

This commit is contained in:
jdescottes
2013-08-04 21:20:25 +02:00
parent 8acd91b4d9
commit a16e1bab09
4 changed files with 44 additions and 27 deletions

View File

@ -1,8 +1,12 @@
casper
.start(casper.cli.get('baseUrl'))
.then(function () {
this.test.assertExists('#drawing-canvas-container canvas', 'Check if drawing canvas element is created');
})
.run(function () {
this.test.done();
});
.start(casper.cli.get('baseUrl')+"?debug")
.then(function () {
// 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();
});