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
3afc9a75
...
3afc9a7533833212101987ef0efd0d6b0b0e5118
authored
2012-09-23 17:00:08 +0100
by
Donovan Hutchinson
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Adding assertion to test visibility: casper.test.assertVisible
1 parent
21919047
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
modules/tester.js
modules/tester.js
View file @
3afc9a7
...
...
@@ -535,6 +535,23 @@ var Tester = function Tester(casper, options) {
};
/**
* Asserts that a selector expression is currently visible.
*
* @param String expected selector expression
* @param String message Test description
* @return Object An assertion result object
*/
this
.
assertVisible
=
function
assertType
(
selector
,
message
)
{
return
this
.
assert
(
casper
.
visible
(
selector
),
message
,
{
type
:
"assertVisible"
,
standard
:
"Selector is visible"
,
values
:
{
selector
:
selector
}
});
};
/**
* Prints out a colored bar onto the console.
*
*/
...
...
Please
register
or
sign in
to post a comment