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
e55c9ffd
...
e55c9ffdf2933c0194e3d99f6f582bdd364f9c09
authored
2012-09-23 16:25:23 +0200
by
Nicolas Perriault
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge remote-tracking branch 'starlocke/fix_189' into pr-190
2 parents
8d4083b9
26a85b0e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
modules/tester.js
modules/tester.js
View file @
e55c9ff
...
...
@@ -248,7 +248,7 @@ var Tester = function Tester(casper, options) {
this
.
assertExists
=
this
.
assertExist
=
this
.
assertSelectorExists
=
this
.
assertSelectorExist
=
function
assertExists
(
selector
,
message
)
{
return
this
.
assert
(
casper
.
exists
(
selector
),
message
,
{
type
:
"assertExists"
,
standard
:
f
(
"Found an element matching
%s"
,
this
.
colorize
(
selector
,
'COMMENT'
)
),
standard
:
f
(
"Found an element matching
: %s"
,
selector
),
values
:
{
selector
:
selector
}
...
...
@@ -266,7 +266,7 @@ var Tester = function Tester(casper, options) {
this
.
assertDoesntExist
=
this
.
assertNotExists
=
function
assertDoesntExist
(
selector
,
message
)
{
return
this
.
assert
(
!
casper
.
exists
(
selector
),
message
,
{
type
:
"assertDoesntExist"
,
standard
:
f
(
"No element
matching selector %s is found"
,
this
.
colorize
(
selector
,
'COMMENT'
)
),
standard
:
f
(
"No element
found matching selector: %s"
,
selector
),
values
:
{
selector
:
selector
}
...
...
@@ -284,7 +284,7 @@ var Tester = function Tester(casper, options) {
var
currentHTTPStatus
=
casper
.
currentHTTPStatus
;
return
this
.
assert
(
this
.
testEquals
(
casper
.
currentHTTPStatus
,
status
),
message
,
{
type
:
"assertHttpStatus"
,
standard
:
f
(
"HTTP status code is
%s"
,
this
.
colorize
(
status
,
'COMMENT'
)
),
standard
:
f
(
"HTTP status code is
: %s"
,
status
),
values
:
{
current
:
currentHTTPStatus
,
expected
:
status
...
...
@@ -402,7 +402,7 @@ var Tester = function Tester(casper, options) {
var
currentTitle
=
casper
.
getTitle
();
return
this
.
assert
(
this
.
testEquals
(
currentTitle
,
expected
),
message
,
{
type
:
"assertTitle"
,
standard
:
f
(
'Page title is
"%s"'
,
this
.
colorize
(
expected
,
'COMMENT'
)
),
standard
:
f
(
'Page title is
: "%s"'
,
expected
),
values
:
{
subject
:
currentTitle
,
expected
:
expected
...
...
@@ -441,7 +441,7 @@ var Tester = function Tester(casper, options) {
var
actual
=
utils
.
betterTypeOf
(
subject
);
return
this
.
assert
(
this
.
testEquals
(
actual
,
type
),
message
,
{
type
:
"assertType"
,
standard
:
f
(
'Subject type is
"%s"'
,
this
.
colorize
(
type
,
'COMMENT'
)
),
standard
:
f
(
'Subject type is
: "%s"'
,
type
),
values
:
{
subject
:
subject
,
type
:
type
,
...
...
Please
register
or
sign in
to post a comment