Commit 79eae894 79eae894d4b4cd46e70922365ded3d8cfc81db49 by Michael Geers

added a small coffeescript test

1 parent 4c35297b
# a small subset of the run.js written in coffeescript
phantom.injectJs "casper.js"
casper = new phantom.Casper(
faultTolerant: false
verbose: true
)
casper.start "tests/site/index.html", ->
@test.assertTitle "CasperJS test index", "Casper.start() casper can start itself an open an url"
@test.comment "fetching"
@test.assertEquals @fetchText("ul li"), "onetwothree", "Casper.fetchText() can retrieves text contents"
@test.comment "clicking"
@click "a[href=\"test.html\"]"
casper.test.comment "then"
casper.then ->
@test.assertTitle "CasperJS test target", "Casper.click() casper can click on a text link"
@click "a[href=\"form.html\"]"
casper.run()
\ No newline at end of file