diff options
Diffstat (limited to 'web-ui/src/account_recovery/forms')
-rw-r--r-- | web-ui/src/account_recovery/forms/user_recovery_code_form.js | 6 | ||||
-rw-r--r-- | web-ui/src/account_recovery/forms/user_recovery_code_form.spec.js | 12 |
2 files changed, 18 insertions, 0 deletions
diff --git a/web-ui/src/account_recovery/forms/user_recovery_code_form.js b/web-ui/src/account_recovery/forms/user_recovery_code_form.js index 2eec96ba..9f13b498 100644 --- a/web-ui/src/account_recovery/forms/user_recovery_code_form.js +++ b/web-ui/src/account_recovery/forms/user_recovery_code_form.js @@ -18,9 +18,15 @@ import React from 'react'; import { translate } from 'react-i18next'; +import InputField from 'src/common/input_field/input_field'; +import SubmitButton from 'src/common/submit_button/submit_button'; + export const UserRecoveryCodeForm = ({ t }) => ( <form> <h1>{t('account-recovery.user-form.title')}</h1> + <p>{t('account-recovery.user-form.description')}</p> + <InputField name='admin-code' label={t('account-recovery.user-form.input-label')} /> + <SubmitButton buttonText={t('account-recovery.user-form.button')} /> </form> ); diff --git a/web-ui/src/account_recovery/forms/user_recovery_code_form.spec.js b/web-ui/src/account_recovery/forms/user_recovery_code_form.spec.js index ade96f9c..c950e305 100644 --- a/web-ui/src/account_recovery/forms/user_recovery_code_form.spec.js +++ b/web-ui/src/account_recovery/forms/user_recovery_code_form.spec.js @@ -16,4 +16,16 @@ describe('UserRecoveryCodeForm', () => { it('renders title for user recovery code', () => { expect(userRecoveryCodeForm.find('h1').text()).toEqual('account-recovery.user-form.title'); }); + + it('renders description', () => { + expect(userRecoveryCodeForm.find('p').text()).toEqual('account-recovery.user-form.description'); + }); + + it('renders input for user code', () => { + expect(userRecoveryCodeForm.find('InputField').props().label).toEqual('account-recovery.user-form.input-label'); + }); + + it('renders submit button', () => { + expect(userRecoveryCodeForm.find('SubmitButton').props().buttonText).toEqual('account-recovery.user-form.button'); + }); }); |