diff options
author | Sriram Viswanathan <sriramv@thoughtworks.com> | 2017-04-04 18:27:19 -0300 |
---|---|---|
committer | Sriram Viswanathan <sriramv@thoughtworks.com> | 2017-04-04 18:27:19 -0300 |
commit | 8c4b36a93e8e089186e0ffce5aecc97d3ce9e8bc (patch) | |
tree | c3ba2d1aeb6503e1a3b738d7256b4676c7a6465c /web-ui/src/account_recovery/backup_account_step | |
parent | 50d64627a924234ef5858b82bee8c9c33fb08f09 (diff) |
[#938] Adds link to backup-account on the backup account step
with @anikarni
Diffstat (limited to 'web-ui/src/account_recovery/backup_account_step')
-rw-r--r-- | web-ui/src/account_recovery/backup_account_step/backup_account_step.js | 6 | ||||
-rw-r--r-- | web-ui/src/account_recovery/backup_account_step/backup_account_step.spec.js | 14 |
2 files changed, 20 insertions, 0 deletions
diff --git a/web-ui/src/account_recovery/backup_account_step/backup_account_step.js b/web-ui/src/account_recovery/backup_account_step/backup_account_step.js index b4dcbaaf..f2498a8a 100644 --- a/web-ui/src/account_recovery/backup_account_step/backup_account_step.js +++ b/web-ui/src/account_recovery/backup_account_step/backup_account_step.js @@ -16,6 +16,7 @@ */ import React from "react"; import {translate} from "react-i18next"; +import SubmitButton from 'src/common/submit_button/submit_button'; export const BackupAccountStep = ({ t }) => ( <div className='account-recovery-form backup-account'> @@ -25,6 +26,11 @@ export const BackupAccountStep = ({ t }) => ( alt={t('account-recovery.backup-account-step.image-description')} /> <h1>{t('account-recovery.backup-account-step.title')}</h1> + <SubmitButton + buttonText={t('account-recovery.backup-account-step.buttonText')} + containerElement='a' + href='/backup-account' + /> </div> ); diff --git a/web-ui/src/account_recovery/backup_account_step/backup_account_step.spec.js b/web-ui/src/account_recovery/backup_account_step/backup_account_step.spec.js index 3b27b369..561079c9 100644 --- a/web-ui/src/account_recovery/backup_account_step/backup_account_step.spec.js +++ b/web-ui/src/account_recovery/backup_account_step/backup_account_step.spec.js @@ -2,6 +2,7 @@ import { shallow } from 'enzyme'; import expect from 'expect'; import React from 'react'; import { BackupAccountStep } from './backup_account_step'; +import SubmitButton from 'src/common/submit_button/submit_button'; describe('BackupAccountStep', () => { let backupAccountStep; @@ -14,4 +15,17 @@ describe('BackupAccountStep', () => { it('renders title for backup account step', () => { expect(backupAccountStep.find('h1').text()).toEqual('account-recovery.backup-account-step.title'); }); + + it('renders submit button with given href', () => { + expect(backupAccountStep.find(SubmitButton).props().href).toEqual('/backup-account'); + }); + + it('renders submit button with given container element', () => { + expect(backupAccountStep.find(SubmitButton).props().containerElement).toEqual('a'); + }); + + it('renders submit button with given button text', () => { + expect(backupAccountStep.find(SubmitButton).props().buttonText) + .toEqual('account-recovery.backup-account-step.buttonText'); + }); }); |