diff options
author | thaissiqueira <thais.siqueira@thoughtworks.com> | 2017-03-16 11:51:00 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-16 11:51:00 -0300 |
commit | d1459b65bc24e51b4cf350de052cf8cfa5cd88d8 (patch) | |
tree | c46172a8ad735864121bfd7195075bc82a1a178d /web-ui/src/backup_account/confirmation/confirmation.spec.js | |
parent | ea05559a4346b7119287356e408db453e39d1cb7 (diff) | |
parent | a36902d4a520e933e4ffde1e6bbc8fae20522f10 (diff) |
Merge pull request #1011 from pixelated/confirmation-page
[#971] Add backup account confirmation page
Diffstat (limited to 'web-ui/src/backup_account/confirmation/confirmation.spec.js')
-rw-r--r-- | web-ui/src/backup_account/confirmation/confirmation.spec.js | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/web-ui/src/backup_account/confirmation/confirmation.spec.js b/web-ui/src/backup_account/confirmation/confirmation.spec.js new file mode 100644 index 00000000..291d156d --- /dev/null +++ b/web-ui/src/backup_account/confirmation/confirmation.spec.js @@ -0,0 +1,29 @@ +import { shallow } from 'enzyme'; +import expect from 'expect'; +import React from 'react'; +import { Confirmation } from 'src/backup_account/confirmation/confirmation'; + +describe('Confirmation', () => { + let page; + + beforeEach(() => { + const mockTranslations = key => key; + page = shallow(<Confirmation t={mockTranslations} />); + }); + + it('renders confirmation title', () => { + expect(page.find('h1').text()).toContain('backup-account.confirmation.title1'); + }); + + it('renders confirmation submit button', () => { + expect(page.find('SubmitButton').props().buttonText).toEqual('backup-account.confirmation.button'); + }); + + it('renders confirmation retry button', () => { + expect(page.find('a').text()).toEqual('backup-account.confirmation.retry-button'); + }); + + it('retries button redirects to backup account', () => { + expect(page.find('a').props().href).toEqual('/backup-account'); + }); +}); |