auth2_fc: set novalidate on unlink cancel button (#39445)
This commit is contained in:
parent
f03e3aae66
commit
64abfdca0c
|
@ -28,6 +28,6 @@
|
|||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<input type="submit" name="unlink" value="{% trans "Unlink" %}"/>
|
||||
<input type="submit" name="cancel" value="{% trans "Cancel" %}"/>
|
||||
<input type="submit" name="cancel" formnovalidate value="{% trans "Cancel" %}"/>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
|
|
@ -148,6 +148,15 @@ def test_login_simple(app, fc_settings, caplog, hooks, exp):
|
|||
# we must be connected
|
||||
assert app.session['_auth_user_id']
|
||||
assert models.FcAccount.objects.count() == 1
|
||||
|
||||
# test unlink cancel case
|
||||
response = app.get('/accounts/')
|
||||
response = response.click('Delete link')
|
||||
assert len(response.pyquery('[name=cancel][formnovalidate]')) == 1
|
||||
response = response.form.submit(name='cancel')
|
||||
response = response.follow()
|
||||
|
||||
# test unlink submit case
|
||||
response = app.get('/accounts/')
|
||||
response = response.click('Delete link')
|
||||
response.form.set('new_password1', 'ikKL1234')
|
||||
|
|
Loading…
Reference in New Issue