You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
1.0 KiB
26 lines
1.0 KiB
4 years ago
|
import React from 'react';
|
||
|
import { shallow } from 'enzyme';
|
||
4 years ago
|
import UserPreferencedCurrencyDisplay from '../../../user-preferenced-currency-display';
|
||
|
import CancelTransactionGasFee from './cancel-transaction-gas-fee.component';
|
||
6 years ago
|
|
||
4 years ago
|
describe('CancelTransactionGasFee Component', () => {
|
||
|
it('should render', () => {
|
||
4 years ago
|
const wrapper = shallow(<CancelTransactionGasFee value="0x3b9aca00" />);
|
||
6 years ago
|
|
||
4 years ago
|
expect(wrapper.find('.cancel-transaction-gas-fee')).toHaveLength(1);
|
||
|
expect(wrapper.find(UserPreferencedCurrencyDisplay)).toHaveLength(2);
|
||
4 years ago
|
const ethDisplay = wrapper.find(UserPreferencedCurrencyDisplay).at(0);
|
||
|
const fiatDisplay = wrapper.find(UserPreferencedCurrencyDisplay).at(1);
|
||
6 years ago
|
|
||
4 years ago
|
expect(ethDisplay.props().value).toStrictEqual('0x3b9aca00');
|
||
|
expect(ethDisplay.props().className).toStrictEqual(
|
||
4 years ago
|
'cancel-transaction-gas-fee__eth',
|
||
4 years ago
|
);
|
||
6 years ago
|
|
||
4 years ago
|
expect(fiatDisplay.props().value).toStrictEqual('0x3b9aca00');
|
||
|
expect(fiatDisplay.props().className).toStrictEqual(
|
||
4 years ago
|
'cancel-transaction-gas-fee__fiat',
|
||
4 years ago
|
);
|
||
|
});
|
||
|
});
|