mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-01-11 03:26:14 +00:00
ab5fa1a799
* Make UnlockHeader a PureComponent * MVP * actually disable wallet format if not determined to be valid format for wallet * default to correct derivation in mnemonic modal * cleanup * fix tslint * use enums for HD wallet getPath * Add stricter typing * Fix labels not updating on selector * Ban hardware wallet support for custom network unsupported chainIds * Fix type error * Fix custom node dPath not being saved * Fix mnemonic modal * default path bugfixes * add react-select * misc fixes; rabbit holing hard. * fix tslint * revert identicon changes * reload on network change :/ * actually reload on network change * really really reload on network change * tslint fixes * Update styles * set table width * fix package versioning * push broken sagas * Fix saga test * fix tslint * address round of review * move non-selectors out to utilty; adjust reload timer * cleanup network util comments * manage wallet disable at WalletDecrypt instead of in both WalletDecrypt and WalletButton * Separate WalletDecrypt props into ownProps / StateProps * disable payment requests on non-eth networks * specialize connect; separate props * remove unused state prop * remove bad import * create tests for networks * Clarify Lite-Send error on non-ethereum networkS * remove string option for network config name * Create concept of always-on 'EXTRA_PATHS'; include SINGULAR_DTV legacy dPath in 'EXTRA_PATHS' * fix multiple imports * address PR comments
51 lines
1.5 KiB
TypeScript
51 lines
1.5 KiB
TypeScript
import React from 'react';
|
|
import Enzyme from 'enzyme';
|
|
import Adapter from 'enzyme-adapter-react-16';
|
|
import SendTransaction from 'containers/Tabs/SendTransaction';
|
|
import shallowWithStore from '../utils/shallowWithStore';
|
|
import { createMockStore } from 'redux-test-utils';
|
|
import { NODES } from 'config';
|
|
import { RouteComponentProps } from 'react-router';
|
|
import { createMockRouteComponentProps } from '../utils/mockRouteComponentProps';
|
|
|
|
Enzyme.configure({ adapter: new Adapter() });
|
|
|
|
it('render snapshot', () => {
|
|
const testNode = 'rop_mew';
|
|
const testStateConfig = {
|
|
languageSelection: 'en',
|
|
nodeSelection: testNode,
|
|
node: NODES[testNode],
|
|
gasPriceGwei: 21,
|
|
offline: false
|
|
};
|
|
const testState = {
|
|
wallet: {},
|
|
balance: {},
|
|
tokenBalances: {},
|
|
node: {},
|
|
nodeLib: {},
|
|
network: {},
|
|
tokens: [],
|
|
gasPrice: {},
|
|
transactions: {},
|
|
offline: {},
|
|
config: testStateConfig,
|
|
customTokens: []
|
|
};
|
|
const routeProps: RouteComponentProps<any> = createMockRouteComponentProps({
|
|
match: { path: '/account', url: '/account', isExact: true, params: {} },
|
|
location: { pathname: '/account', search: '', hash: '', key: 'e08jz7' },
|
|
history: {
|
|
length: 2,
|
|
action: 'PUSH',
|
|
location: { pathname: '/account', search: '', hash: '', key: 'e08jz7', state: {} }
|
|
}
|
|
});
|
|
|
|
const store = createMockStore(testState);
|
|
const component = shallowWithStore(<SendTransaction {...routeProps} />, store);
|
|
|
|
expect(component).toMatchSnapshot();
|
|
});
|