Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
casperjs
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
79eae894
...
79eae894d4b4cd46e70922365ded3d8cfc81db49
authored
2011-11-25 22:11:43 +0100
by
Michael Geers
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
added a small coffeescript test
1 parent
4c35297b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
tests/run.coffee
tests/run.coffee
0 → 100644
View file @
79eae89
# 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
Please
register
or
sign in
to post a comment