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
6611bc21
...
6611bc2150cdbdd45368df0cea135071e9b81ecc
authored
2012-12-28 12:26:52 +0100
by
Nicolas Perriault
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
migrated coffee tests to new testing format
1 parent
ccabfa82
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
11 deletions
tests/suites/coffee.coffee
tests/suites/coffee.coffee
View file @
6611bc2
...
...
@@ -4,16 +4,17 @@ steps = 0
casper
.
options
.
onStepComplete
=
->
steps
++
casper
.
start
"tests/site/index.html"
,
->
@
test
.
assertTitle
"CasperJS test index"
,
"Casper.start() casper can start itself an open an url"
@
test
.
assertEquals
@
fetchText
(
"ul li"
),
"onetwothree"
,
"Casper.fetchText() can retrieves text contents"
@
click
"a[href=
\"
test.html
\"
]"
casper
.
test
.
begin
"writing async tests in coffeescript"
,
4
,
(
test
)
->
casper
.
start
"tests/site/index.html"
,
->
test
.
assertTitle
"CasperJS test index"
,
"Casper.start() casper can start itself an open an url"
test
.
assertEquals
@
fetchText
(
"ul li"
),
"onetwothree"
,
"Casper.fetchText() can retrieves text contents"
@
click
"a[href=
\"
test.html
\"
]"
casper
.
then
->
@
test
.
assertTitle
"CasperJS test target"
,
"Casper.click() casper can click on a text link"
@
click
"a[href=
\"
form.html
\"
]"
casper
.
then
->
test
.
assertTitle
"CasperJS test target"
,
"Casper.click() casper can click on a text link"
@
click
"a[href=
\"
form.html
\"
]"
casper
.
run
->
@
test
.
assertEquals
steps
,
3
,
"Casper.options.onStepComplete() is called on step complete"
@
options
.
onStepComplete
=
null
@
test
.
done
(
4
)
casper
.
run
->
test
.
assertEquals
steps
,
3
,
"Casper.options.onStepComplete() is called on step complete"
@
options
.
onStepComplete
=
null
@
test
.
done
(
)
...
...
Please
register
or
sign in
to post a comment