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
2fa8808d
...
2fa8808d2c5bff777ea562083dd13c0f9cfd474c
authored
2012-09-23 16:45:27 +0200
by
Nicolas Perriault
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'pr-190'
2 parents
cdc78cfa
e55c9ffd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
modules/tester.js
modules/tester.js
View file @
2fa8808
...
...
@@ -272,7 +272,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
}
...
...
@@ -290,7 +290,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
}
...
...
@@ -308,7 +308,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
...
...
@@ -466,7 +466,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
...
...
@@ -505,7 +505,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