|
1 | | -import i18n from '../../../../../../i18n/testConfigEnglish' |
2 | | - |
3 | | -import { createSimpleWrapperFactory } from '../../test/createWrapperFactory' |
| 1 | +import { |
| 2 | + createSimpleWrapperFactory, |
| 3 | + expectSimpleRowText, |
| 4 | + expectSimpleRowLabel, |
| 5 | +} from '../../test' |
4 | 6 | import { Simple } from '../Simple' |
5 | 7 | import mockAccountDelete from './mock_data/AccountDelete.json' |
6 | 8 | import mockAccountDeleteWithDestinationTag from './mock_data/AccountDeleteWithDestinationTag.json' |
| 9 | +import mockAccountDeleteWithCredentialIDs from './mock_data/AccountDeleteWithCredentialIDs.json' |
7 | 10 |
|
8 | | -const createWrapper = createSimpleWrapperFactory(Simple, i18n) |
| 11 | +const createWrapper = createSimpleWrapperFactory(Simple) |
9 | 12 |
|
10 | 13 | describe('AccountDelete: Simple', () => { |
11 | 14 | it('renders', () => { |
12 | 15 | const wrapper = createWrapper(mockAccountDelete) |
13 | | - expect(wrapper.find('.label')).toHaveText('destination') |
14 | | - expect(wrapper.find('.value')).toHaveText( |
| 16 | + expectSimpleRowText( |
| 17 | + wrapper, |
| 18 | + 'destination', |
15 | 19 | 'raT74sdzpxJUaubcBAQNS8aLqFMU85Rr5J', |
16 | 20 | ) |
17 | 21 | wrapper.unmount() |
18 | 22 | }) |
19 | 23 |
|
20 | 24 | it('renders with destination tag', () => { |
21 | 25 | const wrapper = createWrapper(mockAccountDeleteWithDestinationTag) |
22 | | - expect(wrapper.find('.label')).toHaveText('destination') |
23 | | - expect(wrapper.find('.value')).toHaveText( |
| 26 | + expectSimpleRowText( |
| 27 | + wrapper, |
| 28 | + 'destination', |
24 | 29 | 'rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn:123123', |
25 | 30 | ) |
26 | 31 | wrapper.unmount() |
27 | 32 | }) |
| 33 | + |
| 34 | + it('renders with CredentialIDs', () => { |
| 35 | + const wrapper = createWrapper(mockAccountDeleteWithCredentialIDs) |
| 36 | + |
| 37 | + expectSimpleRowText( |
| 38 | + wrapper, |
| 39 | + 'destination', |
| 40 | + 'raT74sdzpxJUaubcBAQNS8aLqFMU85Rr5J', |
| 41 | + ) |
| 42 | + expectSimpleRowText( |
| 43 | + wrapper, |
| 44 | + 'credential-id-0', |
| 45 | + '7B685088D546B9E8905D26206F452BB2F44D9A33C9BD9BCF280F7BA39015A955', |
| 46 | + ) |
| 47 | + expectSimpleRowLabel(wrapper, 'credential-id-0', 'credential_ids') |
| 48 | + |
| 49 | + wrapper.unmount() |
| 50 | + }) |
28 | 51 | }) |
0 commit comments