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.
25 lines
1.0 KiB
25 lines
1.0 KiB
import React from 'react';
|
|
import { shallow } from 'enzyme';
|
|
import UserPreferencedCurrencyDisplay from '../../../user-preferenced-currency-display';
|
|
import CancelTransactionGasFee from './cancel-transaction-gas-fee.component';
|
|
|
|
describe('CancelTransactionGasFee Component', () => {
|
|
it('should render', () => {
|
|
const wrapper = shallow(<CancelTransactionGasFee value="0x3b9aca00" />);
|
|
|
|
expect(wrapper.find('.cancel-transaction-gas-fee')).toHaveLength(1);
|
|
expect(wrapper.find(UserPreferencedCurrencyDisplay)).toHaveLength(2);
|
|
const ethDisplay = wrapper.find(UserPreferencedCurrencyDisplay).at(0);
|
|
const fiatDisplay = wrapper.find(UserPreferencedCurrencyDisplay).at(1);
|
|
|
|
expect(ethDisplay.props().value).toStrictEqual('0x3b9aca00');
|
|
expect(ethDisplay.props().className).toStrictEqual(
|
|
'cancel-transaction-gas-fee__eth',
|
|
);
|
|
|
|
expect(fiatDisplay.props().value).toStrictEqual('0x3b9aca00');
|
|
expect(fiatDisplay.props().className).toStrictEqual(
|
|
'cancel-transaction-gas-fee__fiat',
|
|
);
|
|
});
|
|
});
|
|
|