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
a30a7209
...
a30a7209826d83f87e0921cc8ebe50936b0eaf0c
authored
2012-10-18 10:04:19 +0200
by
Nicolas Perriault
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
cleaned PR #188
1 parent
1d22ab37
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 additions
and
10 deletions
modules/casper.js
tests/suites/casper/headers.js
tests/suites/casper/steps.js
modules/casper.js
View file @
a30a720
...
...
@@ -190,7 +190,6 @@ Casper.prototype.back = function back() {
this
.
evaluate
(
function
_evaluate
()
{
history
.
back
();
});
this
.
currentResponse
=
this
.
resources
.
pop
();
});
};
...
...
tests/suites/casper/headers.js
View file @
a30a720
...
...
@@ -8,7 +8,7 @@ var service = server.listen(8090, function(request, response) {
'Content-Type'
:
'text/html'
,
'Date'
:
new
Date
().
toUTCString
()
};
response
.
write
(
"
\o/
"
);
response
.
write
(
"
ok
"
);
response
.
close
();
});
...
...
@@ -33,12 +33,6 @@ casper.thenOpen('http://localhost:8090/', function thenLocalhost(response) {
this
.
test
.
assertEquals
(
headers
.
get
(
'X-Is-Troll'
),
null
,
'Checking unexisting header'
);
});
casper
.
back
();
casper
.
then
(
function
(
response
)
{
this
.
test
.
assertEquals
(
response
,
undefined
,
'Response should match the one of the previous step'
);
});
casper
.
run
(
function
()
{
server
.
close
();
this
.
test
.
done
();
...
...
tests/suites/casper/steps.js
View file @
a30a720
...
...
@@ -6,8 +6,6 @@ var nsteps = casper.steps.length;
casper
.
then
(
function
(
response
)
{
this
.
test
.
assertTitle
(
'CasperJS test index'
,
'Casper.then() added a new step'
);
require
(
'utils'
).
dump
(
response
);
this
.
test
.
assertEquals
(
response
,
undefined
,
'Casper.then() response is undefined in local mode'
);
});
casper
.
test
.
assertEquals
(
casper
.
steps
.
length
,
nsteps
+
1
,
'Casper.then() can add a new step'
);
...
...
Please
register
or
sign in
to post a comment