blob: c0ff7df23715239f40087bd33a2b5bfeb9cecc62 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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('retry button redirects to backup account', () => {
expect(page.find('a').props().href).toEqual('/backup-account');
});
});
|