Commit 01cc9a77 01cc9a772faf725e2ed971c7af96cbd7943539c4 by Nicolas Perriault

removed obsolete compatibility layer in tests

1 parent 1a068884
1 /*global casper*/ 1 /*global casper*/
2 /*jshint strict:false*/ 2 /*jshint strict:false*/
3 // skip this test for phantom versions < 1.5 3 casper.setFilter('page.prompt', function(message, value) {
4 if (phantom.version.major === 1 && phantom.version.minor < 6) {
5 casper.test.comment('Skipped tests, PhantomJS 1.6 required');
6 casper.test.done();
7 } else {
8 casper.setFilter('page.prompt', function(message, value) {
9 return 'Chuck ' + value; 4 return 'Chuck ' + value;
10 }); 5 });
11 6
12 casper.start('tests/site/prompt.html', function() { 7 casper.start('tests/site/prompt.html', function() {
13 this.test.assertEquals(this.getGlobal('name'), 'Chuck Norris', 'prompted value has been received'); 8 this.test.assertEquals(this.getGlobal('name'), 'Chuck Norris', 'prompted value has been received');
14 }); 9 });
15 10
16 casper.run(function() { 11 casper.run(function() {
17 this.test.done(); 12 this.test.done();
18 }); 13 });
19 }
......