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
5a351ad3
...
5a351ad3652c50e90e36f70287193acf631a0b3d
authored
2012-12-28 13:54:43 +0100
by
Nicolas Perriault
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
migrated casper/agent tests to new testing format
1 parent
08625bd0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
11 deletions
tests/suites/casper/agent.js
tests/suites/casper/agent.js
View file @
5a351ad
...
...
@@ -12,15 +12,12 @@ function fetchUA(request) {
}).
pop
().
value
,
/plop/
);
}
testUA
(
casper
.
options
.
pageSettings
.
userAgent
,
/CasperJS/
);
casper
.
start
();
casper
.
userAgent
(
'plop'
).
on
(
'resource.requested'
,
fetchUA
);
casper
.
thenOpen
(
'tests/site/index.html'
);
casper
.
run
(
function
()
{
this
.
removeListener
(
'resource.requested'
,
fetchUA
);
this
.
test
.
done
(
3
);
casper
.
test
.
begin
(
'userAgent() tests'
,
3
,
function
(
test
)
{
testUA
(
casper
.
options
.
pageSettings
.
userAgent
,
/CasperJS/
);
casper
.
start
();
casper
.
userAgent
(
'plop'
).
on
(
'resource.requested'
,
fetchUA
);
casper
.
thenOpen
(
'tests/site/index.html'
).
run
(
function
()
{
this
.
removeListener
(
'resource.requested'
,
fetchUA
);
test
.
done
();
});
});
...
...
Please
register
or
sign in
to post a comment