added more tests for frames support
Showing
1 changed file
with
11 additions
and
1 deletions
... | @@ -14,13 +14,23 @@ casper.waitForFrame('frame2', function() { | ... | @@ -14,13 +14,23 @@ casper.waitForFrame('frame2', function() { |
14 | 14 | ||
15 | casper.withFrame('frame1', function() { | 15 | casper.withFrame('frame1', function() { |
16 | this.test.assertTitle('CasperJS frame 1'); | 16 | this.test.assertTitle('CasperJS frame 1'); |
17 | this.test.assertExists("#f1"); | ||
18 | this.test.assertDoesntExist("#f2"); | ||
19 | this.test.assertEval(function() { | ||
20 | return '__utils__' in window && 'getBinary' in __utils__; | ||
21 | }, '__utils__ object is available in child frame'); | ||
17 | }); | 22 | }); |
18 | 23 | ||
19 | casper.withFrame('frame2', function() { | 24 | casper.withFrame('frame2', function() { |
20 | this.test.assertTitle('CasperJS frame 2'); | 25 | this.test.assertTitle('CasperJS frame 2'); |
26 | this.test.assertExists("#f2"); | ||
27 | this.test.assertDoesntExist("#f1"); | ||
28 | this.test.assertEval(function() { | ||
29 | return '__utils__' in window && 'getBinary' in __utils__; | ||
30 | }, '__utils__ object is available in other child frame'); | ||
21 | }); | 31 | }); |
22 | 32 | ||
23 | casper.run(function() { | 33 | casper.run(function() { |
24 | this.test.assertTitle('CasperJS test frames'); | 34 | this.test.assertTitle('CasperJS test frames'); |
25 | this.test.done(7); | 35 | this.test.done(13); |
26 | }); | 36 | }); | ... | ... |
-
Please register or sign in to post a comment