-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Expand file tree
/
Copy pathContractBox.test.tsx
More file actions
40 lines (39 loc) · 1.12 KB
/
ContractBox.test.tsx
File metadata and controls
40 lines (39 loc) · 1.12 KB
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
30
31
32
33
34
35
36
37
38
39
40
import React from 'react';
import { screen } from '@testing-library/react-native';
import TEST_ADDRESS from '../../../../constants/address';
import ContractBox from './ContractBox';
import {
CONTRACT_BOX_TEST_ID,
CONTRACT_PET_NAME,
CONTRACT_LOCAL_IMAGE,
CONTRACT_COPY_ADDRESS,
CONTRACT_EXPORT_ADDRESS,
CONTRACT_ON_PRESS,
} from './ContractBox.constants';
import renderWithProvider from '../../../../util/test/renderWithProvider';
describe('ContractBox', () => {
it('should render ContractBox', () => {
renderWithProvider(
<ContractBox
contractAddress={TEST_ADDRESS}
contractPetName={CONTRACT_PET_NAME}
contractLocalImage={CONTRACT_LOCAL_IMAGE}
onCopyAddress={CONTRACT_COPY_ADDRESS}
onExportAddress={CONTRACT_EXPORT_ADDRESS}
onContractPress={CONTRACT_ON_PRESS}
/>,
{
state: {
engine: {
backgroundState: {
PreferencesController: { isIpfsGatewayEnabled: true },
},
},
},
},
);
expect(screen.getAllByTestId(CONTRACT_BOX_TEST_ID).length).toBeGreaterThan(
0,
);
});
});