added tests for #101 (phantomjs 1.8 only)
Showing
1 changed file
with
21 additions
and
0 deletions
tests/suites/casper/location.js
0 → 100644
1 | /*jshint strict:false*/ | ||
2 | /*global CasperError casper console phantom require*/ | ||
3 | if (phantom.version.major === 1 && phantom.version.minor < 8) { | ||
4 | // https://github.com/n1k0/casperjs/issues/101 | ||
5 | casper.warn('document.location is broken under phantomjs < 1.8'); | ||
6 | casper.test.done(); | ||
7 | } else { | ||
8 | casper.start('tests/site/index.html', function() { | ||
9 | this.evaluate(function() { | ||
10 | document.location = '/tests/site/form.html'; | ||
11 | }); | ||
12 | }); | ||
13 | |||
14 | casper.then(function() { | ||
15 | this.test.assertUrlMatches(/form\.html$/); | ||
16 | }); | ||
17 | |||
18 | casper.run(function() { | ||
19 | this.test.done(); | ||
20 | }); | ||
21 | } |
-
Please register or sign in to post a comment