diff options
author | Anike Arni <aarni@thoughtworks.com> | 2017-03-28 13:11:04 -0300 |
---|---|---|
committer | Anike Arni <aarni@thoughtworks.com> | 2017-03-28 15:23:45 -0300 |
commit | 815c8f2799c440d8226d1047f49e773078473f96 (patch) | |
tree | b4f96b62a8d6fa71d82db21204871a1999c0bed8 /web-ui/src | |
parent | 444b39959ad1c34fb9eb91def835d9e695710374 (diff) |
[#932] Adds user recovery code form
Diffstat (limited to 'web-ui/src')
-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'); + }); }); |