closes #267 - added test case as a PoC
Showing
1 changed file
with
11 additions
and
2 deletions
... | @@ -67,10 +67,19 @@ casper.thenOpen('tests/site/multiple-forms.html', function() { | ... | @@ -67,10 +67,19 @@ casper.thenOpen('tests/site/multiple-forms.html', function() { |
67 | this.fill('form[name="f2"]', { | 67 | this.fill('form[name="f2"]', { |
68 | yo: "ok" | 68 | yo: "ok" |
69 | }, true); | 69 | }, true); |
70 | }).then(function() { | ||
71 | this.test.assertUrlMatch(/\?f=f2&yo=ok$/, 'Casper.fill() handles multiple forms'); | ||
70 | }); | 72 | }); |
71 | 73 | ||
72 | casper.then(function() { | 74 | // issue #267: array syntax field names |
73 | this.test.assertUrlMatch(/\?f=f2&yo=ok$/, 'Casper.fill() handles multiple forms'); | 75 | casper.thenOpen('tests/site/field-array.html', function() { |
76 | this.test.comment('Field arrays'); | ||
77 | this.fill('form', { | ||
78 | 'foo[bar]': "bar", | ||
79 | 'foo[baz]': "baz" | ||
80 | }, true); | ||
81 | }).then(function() { | ||
82 | this.test.assertUrlMatch('?foo[bar]=bar&foo[baz]=baz', 'Casper.fill() handles array syntax field names'); | ||
74 | }); | 83 | }); |
75 | 84 | ||
76 | casper.run(function() { | 85 | casper.run(function() { | ... | ... |
-
Please register or sign in to post a comment