web - add autocomplete off to password on login
concourse/concourse#3839 Signed-off-by: Jamie Klassen <cklassen@pivotal.io> Co-authored-by: James Thomson <jthomson@pivotal.io>
This commit is contained in:
parent
ca0a454620
commit
b5aea536fe
|
@ -18,7 +18,7 @@
|
|||
<div class="theme-form-label">
|
||||
<label for="password">password</label>
|
||||
</div>
|
||||
<input tabindex="2" required id="password" name="password" type="password" class="theme-form-input" {{ if .Invalid }} autofocus {{ end }}/>
|
||||
<input tabindex="2" required id="password" name="password" type="password" class="theme-form-input" autocomplete="off" {{ if .Invalid }} autofocus {{ end }}/>
|
||||
</div>
|
||||
|
||||
{{ if .Invalid }}
|
||||
|
|
|
@ -58,3 +58,11 @@ test('can fly login with browser and reuse same browser without CSRF issues', as
|
|||
await t.context.web.page.waitForSelector(pauseButton, {timeout: 90000});
|
||||
t.pass();
|
||||
});
|
||||
|
||||
test.only('password input does not autocomplete', async t => {
|
||||
await t.context.web.page.goto(t.context.web.route('/sky/login'));
|
||||
let passwordInput = await t.context.web.page.waitForSelector('#password', {timeout: 90000});
|
||||
const autocomplete = await t.context.web.page.evaluate(body => body.getAttribute('autocomplete'), passwordInput);
|
||||
await passwordInput.dispose();
|
||||
t.is(autocomplete, 'off');
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue