removed obsolete compatibility layer in tests
Showing
1 changed file
with
9 additions
and
15 deletions
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) { | 4 | return 'Chuck ' + value; |
5 | casper.test.comment('Skipped tests, PhantomJS 1.6 required'); | 5 | }); |
6 | casper.test.done(); | ||
7 | } else { | ||
8 | casper.setFilter('page.prompt', function(message, value) { | ||
9 | return 'Chuck ' + value; | ||
10 | }); | ||
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 | } | ... | ... |
-
Please register or sign in to post a comment