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
cd69df4e
...
cd69df4ef516c812e727b45cf837320edba7cfea
authored
2011-10-17 10:22:43 +0200
by
Nicolas Perriault
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
code cleaning
1 parent
f46c7193
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
casper.js
casper.js
View file @
cd69df4
...
...
@@ -67,7 +67,7 @@
log
:
[],
status
:
"success"
,
time
:
0
}
}
;
this
.
started
=
false
;
this
.
step
=
0
;
this
.
steps
=
[];
...
...
@@ -350,7 +350,7 @@
return
__utils__
.
fill
(
'%selector%'
,
JSON
.
parse
(
'%values%'
));
},
{
selector
:
selector
.
replace
(
"'"
,
"\'"
),
values
:
JSON
.
stringify
(
vals
).
replace
(
"'"
,
"\'"
)
,
values
:
JSON
.
stringify
(
vals
).
replace
(
"'"
,
"\'"
)
});
if
(
!
fillResults
)
{
throw
"unable to fill form"
;
...
...
@@ -382,7 +382,7 @@
+
', HTTP '
+
(
form
.
getAttribute
(
'method'
).
toUpperCase
()
||
"GET"
));
form
.
submit
();
},
{
selector
:
selector
.
replace
(
"'"
,
"\'"
)
,
selector
:
selector
.
replace
(
"'"
,
"\'"
)
});
}
},
...
...
@@ -406,7 +406,7 @@
getTitle
:
function
()
{
return
this
.
evaluate
(
function
()
{
return
document
.
title
;
})
})
;
},
/**
...
...
@@ -433,7 +433,7 @@
level
:
level
,
space
:
space
,
message
:
message
,
date
:
new
Date
().
toString
()
,
date
:
new
Date
().
toString
()
});
return
this
;
},
...
...
@@ -594,7 +594,7 @@
*/
thenOpenAndEvaluate
:
function
(
location
,
fn
,
replacements
)
{
return
this
.
thenOpen
(
location
).
thenEvaluate
(
fn
,
replacements
);
}
,
}
};
/**
...
...
@@ -696,7 +696,7 @@
var
out
=
{
errors
:
[],
fields
:
[],
files
:
[]
,
files
:
[]
};
if
(
!
(
form
instanceof
HTMLElement
)
||
typeof
form
===
"string"
)
{
console
.
log
(
"attempting to fetch form element from selector: '"
+
form
+
"'"
);
...
...
@@ -729,7 +729,7 @@
if
(
e
.
name
===
"FileUploadError"
)
{
out
.
files
.
push
({
name
:
name
,
path
:
e
.
path
,
path
:
e
.
path
});
}
else
{
throw
e
;
...
...
@@ -1128,15 +1128,15 @@
*/
this
.
renderResults
=
function
(
exit
,
status
,
save
)
{
save
=
typeof
save
===
"string"
?
save
:
this
.
options
.
save
;
var
total
=
this
.
testResults
.
passed
+
this
.
testResults
.
failed
,
status
,
style
,
result
;
var
total
=
this
.
testResults
.
passed
+
this
.
testResults
.
failed
,
status
Text
,
style
,
result
;
if
(
this
.
testResults
.
failed
>
0
)
{
status
=
FAIL
;
status
Text
=
FAIL
;
style
=
'RED_BAR'
;
}
else
{
status
=
PASS
;
status
Text
=
PASS
;
style
=
'GREEN_BAR'
;
}
result
=
status
+
' '
+
total
+
' tests executed, '
+
this
.
testResults
.
passed
+
' passed, '
+
this
.
testResults
.
failed
+
' failed.'
;
result
=
status
Text
+
' '
+
total
+
' tests executed, '
+
this
.
testResults
.
passed
+
' passed, '
+
this
.
testResults
.
failed
+
' failed.'
;
if
(
result
.
length
<
80
)
{
result
+=
new
Array
(
80
-
result
.
length
+
1
).
join
(
' '
);
}
...
...
@@ -1217,7 +1217,7 @@
*/
this
.
getXML
=
function
()
{
return
xml
;
}
}
;
};
/**
...
...
Please
register
or
sign in
to post a comment