summaryrefslogtreecommitdiff
path: root/web-ui/src/backup_account/confirmation/confirmation.spec.js
blob: 7a6f38ca701669312e8f7e2f906c478b360eb5e0 (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('BackLink').props().text).toEqual('backup-account.confirmation.retry-button');
  });

  it('retries button redirects to backup account', () => {
    expect(page.find('BackLink').props().href).toEqual('/backup-account');
  });
});