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
6f4899a2
...
6f4899a25a92fee629ede0ae9b7a760d706799a5
authored
2012-07-14 15:05:03 +0200
by
Nicolas Perriault
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixed selftest failed outside lib root path
1 parent
cd85a928
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
6 deletions
docs
modules/casper.js
modules/tester.js
tests/suites/xunit.js
docs
@
8cd7fe5c
Subproject commit
f2d604f78f2c6005c6fd6b63617a2df67c48bab3
Subproject commit
8cd7fe5c1657b79ca1c467e7dae2b34425778c54
...
...
modules/casper.js
View file @
6f4899a
...
...
@@ -1081,7 +1081,7 @@ Casper.prototype.runStep = function runStep(step) {
var
skipLog
=
utils
.
isObject
(
step
.
options
)
&&
step
.
options
.
skipLog
===
true
;
var
stepInfo
=
f
(
"Step %d/%d"
,
this
.
step
,
this
.
steps
.
length
);
var
stepResult
;
if
(
!
skipLog
)
{
if
(
!
skipLog
&&
/^http/
.
test
(
this
.
getCurrentUrl
())
)
{
this
.
log
(
stepInfo
+
f
(
' %s (HTTP %d)'
,
this
.
getCurrentUrl
(),
this
.
currentHTTPStatus
),
"info"
);
}
if
(
utils
.
isNumber
(
this
.
options
.
stepTimeout
)
&&
this
.
options
.
stepTimeout
>
0
)
{
...
...
modules/tester.js
View file @
6f4899a
...
...
@@ -107,7 +107,18 @@ var Tester = function Tester(casper, options) {
}
if
(
failure
.
values
&&
Object
.
keys
(
failure
.
values
).
length
>
0
)
{
for
(
var
name
in
failure
.
values
)
{
this
.
comment
(
' '
+
name
+
': '
+
utils
.
serialize
(
failure
.
values
[
name
]));
var
comment
=
' '
+
name
+
': '
;
var
value
=
failure
.
values
[
name
];
try
{
comment
+=
utils
.
serialize
(
failure
.
values
[
name
]);
}
catch
(
e
)
{
try
{
comment
+=
utils
.
serialize
(
failure
.
values
[
name
].
toString
());
}
catch
(
e
)
{
comment
+=
'(unserializable value)'
;
}
}
this
.
comment
(
comment
);
}
}
});
...
...
tests/suites/xunit.js
View file @
6f4899a
...
...
@@ -9,8 +9,8 @@ casper.test.assertMatch(xunit.getXML(), /<testcase classname="bar" name="baz"><f
// named classname
xunit
=
require
(
'xunit'
).
create
();
xunit
.
addSuccess
(
require
(
'fs'
).
workingDirectory
+
'/plop.js'
,
'It worked'
);
casper
.
test
.
assertMatch
(
xunit
.
getXML
(),
/<testcase classname="plop" name="It worked"/
,
'XUnitExporter.addSuccess() handles class name'
);
casper
.
test
.
assertMatch
(
xunit
.
getXML
(),
/<testcase classname="
(
.*
)
plop" name="It worked"/
,
'XUnitExporter.addSuccess() handles class name'
);
xunit
.
addSuccess
(
require
(
'fs'
).
workingDirectory
+
'/plip.js'
,
'Failure'
);
casper
.
test
.
assertMatch
(
xunit
.
getXML
(),
/<testcase classname="plip" name="Failure"/
,
'XUnitExporter.addFailure() handles class name'
);
casper
.
test
.
assertMatch
(
xunit
.
getXML
(),
/<testcase classname="
(
.*
)
plip" name="Failure"/
,
'XUnitExporter.addFailure() handles class name'
);
casper
.
test
.
done
();
\ No newline at end of file
casper
.
test
.
done
();
...
...
Please
register
or
sign in
to post a comment