Commit d4765c95 d4765c953abc70b027446cf7981f81f901c6945c by Nicolas Perriault

closes #267 - added test case as a PoC

1 parent 2e6cf773
...@@ -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() {
......