Test form replay feature (closes: #630)

environments/ppa-mbqj77/deployments/1
Xavier Guimard 9 years ago
parent f5856422e0
commit baedbcef1a
  1. 13
      _example/form.html
  2. 2
      _example/test/index.pl
  3. 13
      e2e-tests/handler/02-post.js

@ -0,0 +1,13 @@
<html>
<head>
<title></title>
</head>
<body>
<form id="test" method="post" action="index.pl">
<input name="postuid" placeholder="postuid" />
<input name="postmail" placeholder="postmail" />
<input name="poststatic" placeholder="poststatic" />
<input name="post" type="submit" />
</form>
</body>
</html>

@ -153,7 +153,7 @@ print "<thead><tr><th>Parameter</th><th>Value</th></tr></thead><tbody>\n";
foreach ( sort $cgi->param() ) {
my $tmp = $cgi->param($_);
print "<tr><td>$_</td><td><big>☞</big> $tmp</td></tr>\n";
print qq{<tr><td>$_</td><td><big>☞</big> <span id="field_$_">$tmp</span></td></tr>\n};
}
print "</tbody></table>\n";
print "</div>\n";

@ -0,0 +1,13 @@
'use strict';
/* http://docs.angularjs.org/guide/dev_guide.e2e-testing */
describe('Lemonldap::NG', function() {
describe('Form replay mechanism', function() {
it('should redirect to index.pl', function() {
browser.driver.get('http://test1.example.com:' + process.env.TESTWEBSERVERPORT + '/form.html');
expect(browser.driver.findElement(by.id('field_postuid')).getText()).toEqual('dwho');
});
});
});
Loading…
Cancel
Save