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
3f1d2a39
...
3f1d2a3991e0314e04a6b00298c18f077ec58f85
authored
2013-03-01 17:19:08 +0100
by
Nicolas Perriault
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
more detailled test output for assertSelectorContains()
1 parent
848791c2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
modules/tester.js
modules/tester.js
View file @
3f1d2a3
...
...
@@ -666,13 +666,15 @@ Tester.prototype.assertFalsy = function assertFalsy(subject, message) {
Tester
.
prototype
.
assertSelectorHasText
=
Tester
.
prototype
.
assertSelectorContains
=
function
assertSelectorHasText
(
selector
,
text
,
message
)
{
"use strict"
;
var
textFound
=
this
.
casper
.
fetchText
(
selector
).
indexOf
(
text
)
!==
-
1
;
var
got
=
this
.
casper
.
fetchText
(
selector
);
var
textFound
=
got
.
indexOf
(
text
)
!==
-
1
;
return
this
.
assert
(
textFound
,
message
,
{
type
:
"assertSelectorHasText"
,
standard
:
f
(
'Found "%s" within the selector "%s"'
,
text
,
selector
),
values
:
{
selector
:
selector
,
text
:
text
text
:
text
,
actualContent
:
got
}
});
};
...
...
Please
register
or
sign in
to post a comment