Commit 79eae894 79eae894d4b4cd46e70922365ded3d8cfc81db49 by Michael Geers

added a small coffeescript test

1 parent 4c35297b
1 # a small subset of the run.js written in coffeescript
2
3 phantom.injectJs "casper.js"
4 casper = new phantom.Casper(
5 faultTolerant: false
6 verbose: true
7 )
8
9 casper.start "tests/site/index.html", ->
10 @test.assertTitle "CasperJS test index", "Casper.start() casper can start itself an open an url"
11 @test.comment "fetching"
12 @test.assertEquals @fetchText("ul li"), "onetwothree", "Casper.fetchText() can retrieves text contents"
13 @test.comment "clicking"
14 @click "a[href=\"test.html\"]"
15
16 casper.test.comment "then"
17 casper.then ->
18 @test.assertTitle "CasperJS test target", "Casper.click() casper can click on a text link"
19 @click "a[href=\"form.html\"]"
20
21 casper.run()
...\ No newline at end of file ...\ No newline at end of file