Convert PasswordFields to GovukPasswordFields

Converts them directly in the following forms:
- LoginForm
- ConfirmPasswordForm

Changes the password function to return
GovukPasswordField instead of PasswordField which
effects the following forms:
- RegisterUserForm
- RegisterUserFromInviteForm
- RegisterUserFromOrgInviteForm
- NewPasswordForm
- ChangePasswordForm

It also updates StringField on RegisterUserFromOrgInviteForm
to GovukTextInputField

Also includes changes to templates that use this
form and associated tests.
This commit is contained in:
Tom Byers
2020-08-07 09:53:09 +01:00
parent 5cbf57e1fb
commit e316e33180
13 changed files with 37 additions and 28 deletions

View File

@@ -1132,8 +1132,8 @@ def test_confirm_update_organisation_with_incorrect_password(
page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser')
assert normalize_spaces(
page.select_one('.error-message').text
) == 'Invalid password'
page.select_one('.govuk-error-message').text
) == 'Error: Invalid password'
def test_confirm_update_organisation_with_name_already_in_use(