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
d4765c95
...
d4765c953abc70b027446cf7981f81f901c6945c
authored
2012-11-05 13:19:59 +0100
by
Nicolas Perriault
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
closes #267 - added test case as a PoC
1 parent
2e6cf773
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
tests/suites/casper/formfill.js
tests/suites/casper/formfill.js
View file @
d4765c9
...
...
@@ -67,10 +67,19 @@ casper.thenOpen('tests/site/multiple-forms.html', function() {
this
.
fill
(
'form[name="f2"]'
,
{
yo
:
"ok"
},
true
);
}).
then
(
function
()
{
this
.
test
.
assertUrlMatch
(
/
\?
f=f2&yo=ok$/
,
'Casper.fill() handles multiple forms'
);
});
casper
.
then
(
function
()
{
this
.
test
.
assertUrlMatch
(
/
\?
f=f2&yo=ok$/
,
'Casper.fill() handles multiple forms'
);
// issue #267: array syntax field names
casper
.
thenOpen
(
'tests/site/field-array.html'
,
function
()
{
this
.
test
.
comment
(
'Field arrays'
);
this
.
fill
(
'form'
,
{
'foo[bar]'
:
"bar"
,
'foo[baz]'
:
"baz"
},
true
);
}).
then
(
function
()
{
this
.
test
.
assertUrlMatch
(
'?foo[bar]=bar&foo[baz]=baz'
,
'Casper.fill() handles array syntax field names'
);
});
casper
.
run
(
function
()
{
...
...
Please
register
or
sign in
to post a comment