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
2118ecbb
...
2118ecbb2c1a29c0f23f2698781d8669dce52781
authored
2013-05-08 22:47:18 +0200
by
Nicolas Perriault
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixed tests for phantomjs <1.9.0
1 parent
896e8ec8
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
tests/suites/casper/keys.js
tests/suites/utils.js
tests/suites/casper/keys.js
View file @
2118ecb
...
...
@@ -18,7 +18,8 @@ casper.test.begin('sendKeys() tests', 3, function(test) {
});
});
casper
.
test
.
begin
(
'sendKeys() key modifiers tests'
,
1
,
function
(
test
)
{
if
(
utils
.
gteVersion
(
phantom
.
version
,
'1.9.0'
))
{
casper
.
test
.
begin
(
'sendKeys() key modifiers tests'
,
1
,
function
(
test
)
{
casper
.
start
().
then
(
function
()
{
this
.
setContent
([
'<input>'
,
...
...
@@ -38,4 +39,5 @@ casper.test.begin('sendKeys() key modifiers tests', 1, function(test) {
}).
run
(
function
()
{
test
.
done
();
});
});
});
}
...
...
tests/suites/utils.js
View file @
2118ecb
...
...
@@ -52,7 +52,8 @@ casper.test.begin('utils.clone() tests', 2, function(test) {
test
.
done
();
});
casper
.
test
.
begin
(
'utils.computeModifier() tests'
,
7
,
function
(
test
)
{
if
(
utils
.
gteVersion
(
phantom
.
version
,
'1.9.0'
))
{
casper
.
test
.
begin
(
'utils.computeModifier() tests'
,
7
,
function
(
test
)
{
var
modifiers
=
require
(
'webpage'
).
create
().
event
.
modifier
;
test
.
assertType
(
modifiers
,
"object"
);
test
.
assertEquals
(
utils
.
computeModifier
(
""
,
modifiers
),
0
,
...
...
@@ -71,7 +72,8 @@ casper.test.begin('utils.computeModifier() tests', 7, function(test) {
test
.
assertThrows
(
utils
.
computeModifier
,
[
"chuck+norris"
,
modifiers
],
'computeModifier() checks for a valid complex modifier'
);
test
.
done
();
});
});
}
casper
.
test
.
begin
(
'equals() tests'
,
23
,
function
(
test
)
{
test
.
assert
(
utils
.
equals
(
null
,
null
),
'equals() null equality'
);
...
...
Please
register
or
sign in
to post a comment