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
af9dcbc2
...
af9dcbc23ef7f86777bb033f5b638278070918de
authored
2012-12-28 13:42:30 +0100
by
Nicolas Perriault
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
added missing test file
1 parent
d4e2d545
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
tests/suites/pagestack.js
tests/suites/pagestack.js
0 → 100644
View file @
af9dcbc
/*global casper*/
/*jshint strict:false maxstatements:99*/
var
pagestack
=
require
(
'pagestack'
);
var
utils
=
require
(
'utils'
);
var
webpage
=
require
(
'webpage'
);
casper
.
test
.
begin
(
'pagestack module tests'
,
14
,
function
(
test
)
{
var
stack
=
pagestack
.
create
();
var
page1
=
webpage
.
create
();
page1
.
url
=
'page1.html'
;
stack
.
push
(
page1
);
test
.
assertEquals
(
stack
.
length
,
1
);
test
.
assert
(
utils
.
isWebPage
(
stack
[
0
]));
test
.
assertEquals
(
stack
[
0
],
page1
);
test
.
assertEquals
(
stack
.
list
().
length
,
1
);
test
.
assertEquals
(
stack
.
list
()[
0
],
page1
.
url
);
var
page2
=
webpage
.
create
();
page2
.
url
=
'page2.html'
;
stack
.
push
(
page2
);
test
.
assertEquals
(
stack
.
length
,
2
);
test
.
assert
(
utils
.
isWebPage
(
stack
[
1
]));
test
.
assertEquals
(
stack
[
1
],
page2
);
test
.
assertEquals
(
stack
.
list
().
length
,
2
);
test
.
assertEquals
(
stack
.
list
()[
1
],
page2
.
url
);
test
.
assertEquals
(
stack
.
clean
(
page1
),
1
);
test
.
assertEquals
(
stack
[
0
],
page2
);
test
.
assertEquals
(
stack
.
list
().
length
,
1
);
test
.
assertEquals
(
stack
.
list
()[
0
],
page2
.
url
);
test
.
done
();
});
Please
register
or
sign in
to post a comment