Append autocomplete attribute & fix unit tests (#2585)
This commit is contained in:
parent
9174a81d6c
commit
b4b19919a3
|
@ -85,9 +85,9 @@
|
||||||
},
|
},
|
||||||
"authentication" : "Demo",
|
"authentication" : "Demo",
|
||||||
"cfgAuthor" : "The LemonLDAP::NG team",
|
"cfgAuthor" : "The LemonLDAP::NG team",
|
||||||
"cfgNum" : 1,
|
|
||||||
"cfgDate" : "1627287638",
|
"cfgDate" : "1627287638",
|
||||||
"cfgVersion" : "2.0.12",
|
"cfgNum" : 1,
|
||||||
|
"cfgVersion" : "2.0.13",
|
||||||
"cookieName" : "lemonldap",
|
"cookieName" : "lemonldap",
|
||||||
"demoExportedVars" : {
|
"demoExportedVars" : {
|
||||||
"cn" : "cn",
|
"cn" : "cn",
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<!-- //endif -->
|
<!-- //endif -->
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<img class="renewcaptchaclick" src="<TMPL_VAR NAME="STATIC_PREFIX">common/icons/arrow_refresh.png" alt="Renew Captcha" title="Renew Captcha" class="img-thumbnail mb-3" />
|
<img class="renewcaptchaclick" src="<TMPL_VAR NAME="STATIC_PREFIX">common/icons/arrow_refresh.png" alt="Renew Captcha" title="Renew Captcha" autocomplete="one-time-code" class="img-thumbnail mb-3" />
|
||||||
<img id="captcha" src="<TMPL_VAR NAME=CAPTCHA_SRC>" class="img-thumbnail" />
|
<img id="captcha" src="<TMPL_VAR NAME=CAPTCHA_SRC>" class="img-thumbnail" />
|
||||||
</div>
|
</div>
|
||||||
<div class="input-group mb-3">
|
<div class="input-group mb-3">
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><label for="mailfield" class="mb-0"><i class="fa fa-envelope"></i></label></span>
|
<span class="input-group-text"><label for="mailfield" class="mb-0"><i class="fa fa-envelope"></i></label></span>
|
||||||
</div>
|
</div>
|
||||||
<input id="mailfield" name="mail" type="text" value="<TMPL_VAR NAME="MAIL">" class="form-control" trplaceholder="mail" required />
|
<input id="mailfield" name="mail" type="text" value="<TMPL_VAR NAME="MAIL">" class="form-control" autocomplete="email" trplaceholder="mail" required />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<TMPL_IF NAME=CAPTCHA_SRC>
|
<TMPL_IF NAME=CAPTCHA_SRC>
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
<input type="hidden" name="token" value="<TMPL_VAR NAME="TOKEN">" />
|
<input type="hidden" name="token" value="<TMPL_VAR NAME="TOKEN">" />
|
||||||
</TMPL_IF>
|
</TMPL_IF>
|
||||||
<TMPL_IF NAME="DOWNLOAD">
|
<TMPL_IF NAME="DOWNLOAD">
|
||||||
<input id="urlfield" name="url" type="text" class="form-control" value="<TMPL_VAR NAME="URL">" trplaceholder="URL / DNS" aria-required="true"/>
|
<input id="urlfield" name="url" type="text" class="form-control" value="<TMPL_VAR NAME="URL">" autocomplete="url" trplaceholder="URL / DNS" aria-required="true"/>
|
||||||
<pre><textarea id="checkDevOpsFile" name="checkDevOpsFile" class="form-control rounded-1" rows="6" trplaceholder="pasteHere"><TMPL_VAR NAME="FILE"></textarea></pre>
|
<pre><textarea id="checkDevOpsFile" name="checkDevOpsFile" class="form-control rounded-1" rows="6" trplaceholder="pasteHere"><TMPL_VAR NAME="FILE"></textarea></pre>
|
||||||
<TMPL_ELSE>
|
<TMPL_ELSE>
|
||||||
<pre><textarea id="checkDevOpsFile" name="checkDevOpsFile" class="form-control rounded-1" rows="6" trplaceholder="pasteHere" required><TMPL_VAR NAME="FILE"></textarea></pre>
|
<pre><textarea id="checkDevOpsFile" name="checkDevOpsFile" class="form-control rounded-1" rows="6" trplaceholder="pasteHere" required><TMPL_VAR NAME="FILE"></textarea></pre>
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><label for="urlfield" class="mb-0"><i class="fa fa-link"></i></label></span>
|
<span class="input-group-text"><label for="urlfield" class="mb-0"><i class="fa fa-link"></i></label></span>
|
||||||
</div>
|
</div>
|
||||||
<input id="urlfield" name="url" type="text" class="form-control" value="<TMPL_VAR NAME="URL">" trplaceholder="URL / DNS" aria-required="true"/>
|
<input id="urlfield" name="url" type="text" class="form-control" value="<TMPL_VAR NAME="URL">" autocomplete="url" trplaceholder="URL / DNS" aria-required="true"/>
|
||||||
</div>
|
</div>
|
||||||
<button type="submit" class="btn btn-success">
|
<button type="submit" class="btn btn-success">
|
||||||
<span class="fa fa-search"></span>
|
<span class="fa fa-search"></span>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><label for="userfield" class="mb-0"><i class="fa fa-user"></i></label></span>
|
<span class="input-group-text"><label for="userfield" class="mb-0"><i class="fa fa-user"></i></label></span>
|
||||||
</div>
|
</div>
|
||||||
<input id="userfield" name="user" type="text" class="form-control" value="<TMPL_VAR NAME="LOGIN">" trplaceholder="mail" required aria-required="true"/>
|
<input id="userfield" name="user" type="text" class="form-control" value="<TMPL_VAR NAME="LOGIN">" autocomplete="email" trplaceholder="mail" required aria-required="true"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="input-group mb-3">
|
<div class="input-group mb-3">
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><label for="mail" class="mb-0"><i class="fa fa-envelope"></i></label></span>
|
<span class="input-group-text"><label for="mail" class="mb-0"><i class="fa fa-envelope"></i></label></span>
|
||||||
</div>
|
</div>
|
||||||
<input id="mail" name="mail" type="text" value="<TMPL_VAR NAME="MAIL">" class="form-control" trplaceholder="mail" required />
|
<input id="mail" name="mail" type="text" value="<TMPL_VAR NAME="MAIL">" class="form-control" autocomplete="email" trplaceholder="mail" required />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<TMPL_IF NAME=CAPTCHA_SRC>
|
<TMPL_IF NAME=CAPTCHA_SRC>
|
||||||
|
|
|
@ -23,21 +23,21 @@
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><label for="firstnamefield" class="mb-0"><i class="fa fa-user"></i></label></span>
|
<span class="input-group-text"><label for="firstnamefield" class="mb-0"><i class="fa fa-user"></i></label></span>
|
||||||
</div>
|
</div>
|
||||||
<input id="firstnamefield" name="firstname" type="text" value="<TMPL_VAR NAME="FIRSTNAME">" class="form-control" trplaceholder="firstName" required aria-required="true"/>
|
<input id="firstnamefield" name="firstname" type="text" value="<TMPL_VAR NAME="FIRSTNAME">" class="form-control" autocomplete="given-name" trplaceholder="firstName" required aria-required="true"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="input-group mb-3">
|
<div class="input-group mb-3">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><label for="lastnamefield" class="mb-0"><i class="fa fa-user"></i></label></span>
|
<span class="input-group-text"><label for="lastnamefield" class="mb-0"><i class="fa fa-user"></i></label></span>
|
||||||
</div>
|
</div>
|
||||||
<input id="lastnamefield" name="lastname" type="text" value="<TMPL_VAR NAME="LASTNAME">" class="form-control" trplaceholder="lastName" required aria-required="true"/>
|
<input id="lastnamefield" name="lastname" type="text" value="<TMPL_VAR NAME="LASTNAME">" class="form-control" autocomplete="family-name" trplaceholder="lastName" required aria-required="true"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="input-group mb-3">
|
<div class="input-group mb-3">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><label for="mailfield" class="mb-0"><i class="fa fa-envelope"></i></label></span>
|
<span class="input-group-text"><label for="mailfield" class="mb-0"><i class="fa fa-envelope"></i></label></span>
|
||||||
</div>
|
</div>
|
||||||
<input id="mailfield" name="mail" type="text" value="<TMPL_VAR NAME="MAIL">" class="form-control" trplaceholder="mail" required aria-required="true"/>
|
<input id="mailfield" name="mail" type="text" value="<TMPL_VAR NAME="MAIL">" class="form-control" autocomplete="email" trplaceholder="mail" required aria-required="true"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<TMPL_IF NAME=CAPTCHA_SRC>
|
<TMPL_IF NAME=CAPTCHA_SRC>
|
||||||
|
|
|
@ -41,7 +41,7 @@ SKIP: {
|
||||||
' Captcha image inserted' );
|
' Captcha image inserted' );
|
||||||
ok(
|
ok(
|
||||||
$res->[2]->[0] =~
|
$res->[2]->[0] =~
|
||||||
m#<img class="renewcaptchaclick" src="/static/common/icons/arrow_refresh.png" alt="Renew Captcha" title="Renew Captcha" class="img-thumbnail mb-3" />#,
|
m#<img class="renewcaptchaclick" src="/static/common/icons/arrow_refresh.png"#,
|
||||||
' Renew Captcha button found'
|
' Renew Captcha button found'
|
||||||
) or explain( $res->[2]->[0], 'Renew captcha button not found' );
|
) or explain( $res->[2]->[0], 'Renew captcha button not found' );
|
||||||
ok( $res->[2]->[0] =~ /captcha\.(?:min\.)?js/, 'Get captcha javascript' );
|
ok( $res->[2]->[0] =~ /captcha\.(?:min\.)?js/, 'Get captcha javascript' );
|
||||||
|
|
|
@ -134,7 +134,7 @@ m%<input[^>]*name="password"%,
|
||||||
' New captcha image inserted' );
|
' New captcha image inserted' );
|
||||||
ok(
|
ok(
|
||||||
$res->[2]->[0] =~
|
$res->[2]->[0] =~
|
||||||
m#<img class="renewcaptchaclick" src="/static/common/icons/arrow_refresh.png" alt="Renew Captcha" title="Renew Captcha" class="img-thumbnail mb-3" />#,
|
m#<img class="renewcaptchaclick" src="/static/common/icons/arrow_refresh.png" alt="Renew Captcha" title="Renew Captcha" autocomplete="one-time-code" class="img-thumbnail mb-3" />#,
|
||||||
' Renew Captcha button found'
|
' Renew Captcha button found'
|
||||||
) or explain( $res->[2]->[0], 'Renew captcha button not found' );
|
) or explain( $res->[2]->[0], 'Renew captcha button not found' );
|
||||||
ok( $res->[2]->[0] =~ /captcha\.(?:min\.)?js/, 'Get captcha javascript' );
|
ok( $res->[2]->[0] =~ /captcha\.(?:min\.)?js/, 'Get captcha javascript' );
|
||||||
|
|
|
@ -62,7 +62,7 @@ s/^.*token=([^&]+).*$/token=$1&firstname=who&lastname=doctor&mail=dwho%40badwolf
|
||||||
) or print STDERR Dumper( $res->[2]->[0] );
|
) or print STDERR Dumper( $res->[2]->[0] );
|
||||||
ok(
|
ok(
|
||||||
$res->[2]->[0] =~
|
$res->[2]->[0] =~
|
||||||
m#<img class="renewcaptchaclick" src="/static/common/icons/arrow_refresh.png" alt="Renew Captcha" title="Renew Captcha" class="img-thumbnail mb-3" />#,
|
m#<img class="renewcaptchaclick" src="/static/common/icons/arrow_refresh.png"#,
|
||||||
' Renew Captcha button found'
|
' Renew Captcha button found'
|
||||||
) or explain( $res->[2]->[0], 'Renew captcha button not found' );
|
) or explain( $res->[2]->[0], 'Renew captcha button not found' );
|
||||||
ok( $res->[2]->[0] =~ /captcha\.(?:min\.)?js/, 'Get captcha javascript' );
|
ok( $res->[2]->[0] =~ /captcha\.(?:min\.)?js/, 'Get captcha javascript' );
|
||||||
|
|
|
@ -69,7 +69,7 @@ m%<a class="btn btn-secondary" href="http://auth.example.com/resetpwd\?skin=boot
|
||||||
) or print STDERR Dumper( $res->[2]->[0] );
|
) or print STDERR Dumper( $res->[2]->[0] );
|
||||||
ok(
|
ok(
|
||||||
$res->[2]->[0] =~
|
$res->[2]->[0] =~
|
||||||
m#<img class="renewcaptchaclick" src="/static/common/icons/arrow_refresh.png" alt="Renew Captcha" title="Renew Captcha" class="img-thumbnail mb-3" />#,
|
m#<img class="renewcaptchaclick" src="/static/common/icons/arrow_refresh.png"#,
|
||||||
' Renew Captcha button found'
|
' Renew Captcha button found'
|
||||||
) or explain( $res->[2]->[0], 'Renew captcha button not found' );
|
) or explain( $res->[2]->[0], 'Renew captcha button not found' );
|
||||||
ok( $res->[2]->[0] =~ /captcha\.(?:min\.)?js/, 'Get captcha javascript' );
|
ok( $res->[2]->[0] =~ /captcha\.(?:min\.)?js/, 'Get captcha javascript' );
|
||||||
|
|
|
@ -124,7 +124,7 @@ count(1);
|
||||||
expectForm( $res, undef, '/checkuser', 'user', 'url' );
|
expectForm( $res, undef, '/checkuser', 'user', 'url' );
|
||||||
ok(
|
ok(
|
||||||
$res->[2]->[0] =~
|
$res->[2]->[0] =~
|
||||||
m%<input id="urlfield" name="url" type="text" class="form-control" value="http://test1.example.com" trplaceholder="URL / DNS"%,
|
m%<input id="urlfield" name="url" type="text" class="form-control" value="http://test1.example.com" autocomplete="url" trplaceholder="URL / DNS"%,
|
||||||
'Found HTTP url'
|
'Found HTTP url'
|
||||||
) or explain( $res->[2]->[0], 'HTTP url' );
|
) or explain( $res->[2]->[0], 'HTTP url' );
|
||||||
ok(
|
ok(
|
||||||
|
@ -224,7 +224,7 @@ ok(
|
||||||
expectForm( $res, undef, '/checkuser', 'user', 'url' );
|
expectForm( $res, undef, '/checkuser', 'user', 'url' );
|
||||||
ok(
|
ok(
|
||||||
$res->[2]->[0] =~
|
$res->[2]->[0] =~
|
||||||
m%<input id="urlfield" name="url" type="text" class="form-control" value="https://test2.example.com" trplaceholder="URL / DNS"%,
|
m%<input id="urlfield" name="url" type="text" class="form-control" value="https://test2.example.com" autocomplete="url" trplaceholder="URL / DNS"%,
|
||||||
'Found HTTPS url'
|
'Found HTTPS url'
|
||||||
) or explain( $res->[2]->[0], 'HTTP url' );
|
) or explain( $res->[2]->[0], 'HTTP url' );
|
||||||
count(2);
|
count(2);
|
||||||
|
|
|
@ -48,7 +48,7 @@ SKIP: {
|
||||||
' Captcha image inserted' );
|
' Captcha image inserted' );
|
||||||
ok(
|
ok(
|
||||||
$res->[2]->[0] =~
|
$res->[2]->[0] =~
|
||||||
m#<img class="renewcaptchaclick" src="/static/common/icons/arrow_refresh.png" alt="Renew Captcha" title="Renew Captcha" class="img-thumbnail mb-3" />#,
|
m#<img class="renewcaptchaclick" src="/static/common/icons/arrow_refresh.png"#,
|
||||||
' Renew Captcha button found'
|
' Renew Captcha button found'
|
||||||
) or explain( $res->[2]->[0], 'Renew captcha button not found' );
|
) or explain( $res->[2]->[0], 'Renew captcha button not found' );
|
||||||
ok( $res->[2]->[0] =~ /captcha\.(?:min\.)?js/, 'Get captcha javascript' );
|
ok( $res->[2]->[0] =~ /captcha\.(?:min\.)?js/, 'Get captcha javascript' );
|
||||||
|
|
Loading…
Reference in New Issue