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
0e6a844a
...
0e6a844a47ec6973175fe6ef209b53467d1fe5fb
authored
2014-01-11 12:25:19 +0100
by
mickaelandrieu
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
REFS #790 - Added tests
1 parent
5a07023b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletions
tests/site/index.html
tests/suites/tester/assert.js
tests/site/index.html
View file @
0e6a844
...
...
@@ -16,5 +16,6 @@
<input
type=
"text"
name=
"dummy_name"
value=
"dummy_value"
/>
<h1>
Title
</h1>
<p
id=
"hidden"
style=
"display:none"
>
I'm hidden.
</p>
<div
id=
"exports"
>
Exports
</div>
</body>
</html>
...
...
tests/suites/tester/assert.js
View file @
0e6a844
...
...
@@ -2,7 +2,7 @@
/*jshint strict:false, maxstatements:99*/
var
fs
=
require
(
'fs'
);
casper
.
test
.
begin
(
'Common assertions tests'
,
4
6
,
function
(
test
)
{
casper
.
test
.
begin
(
'Common assertions tests'
,
4
7
,
function
(
test
)
{
casper
.
start
(
'tests/site/index.html'
,
function
()
{
test
.
assertTextExists
(
'form'
,
'Tester.assertTextExists() checks that page body contains text'
);
test
.
assertTextExist
(
'form'
,
'Tester.assertTextExist() checks that page body contains text [alias]'
);
...
...
@@ -66,6 +66,7 @@ casper.test.begin('Common assertions tests', 46, function(test) {
test
.
assertVisible
(
'img'
,
'Tester.assertVisible() works as expected'
);
test
.
assertNotVisible
(
'p#hidden'
,
'Tester.assertNotVisible() works as expected'
);
test
.
assertInvisible
(
'p#hidden'
,
'Tester.assertInvisible() works as expected [alias]'
);
test
.
assertExists
(
'div#exports'
,
'Tester.assertExists() works as expected with reserved word id'
);
}).
run
(
function
()
{
test
.
done
();
});
...
...
Please
register
or
sign in
to post a comment