mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-02 06:07:06 +01:00
8075a39567
* Add transaction activity log component * Remove duplicate tx activity log snapshot. * Convert tx breakdown row to tlr. * Convert tx status component to tlr. * Convert User Preferenced Currency Display test to tlr. * Consolidate and convert user-preferenced-currency-input.test.js to tlr. * Consolidate and convert user-preferenced-token-input test to tlr.
63 lines
1.5 KiB
JavaScript
63 lines
1.5 KiB
JavaScript
import React from 'react';
|
|
import { renderWithProvider } from '../../../../test/lib/render-helpers';
|
|
import TransactionStatus from '.';
|
|
|
|
describe('TransactionStatus Component', () => {
|
|
it('should render CONFIRMED properly', () => {
|
|
const confirmedProps = {
|
|
status: 'confirmed',
|
|
date: 'June 1',
|
|
};
|
|
|
|
const { container } = renderWithProvider(
|
|
<TransactionStatus {...confirmedProps} />,
|
|
);
|
|
|
|
expect(container).toMatchSnapshot();
|
|
});
|
|
|
|
it('should render PENDING properly when status is APPROVED', () => {
|
|
const props = {
|
|
status: 'approved',
|
|
isEarliestNonce: true,
|
|
error: { message: 'test-title' },
|
|
};
|
|
|
|
const { container } = renderWithProvider(<TransactionStatus {...props} />);
|
|
|
|
expect(container).toMatchSnapshot();
|
|
});
|
|
|
|
it('should render PENDING properly', () => {
|
|
const props = {
|
|
date: 'June 1',
|
|
status: 'submitted',
|
|
isEarliestNonce: true,
|
|
};
|
|
|
|
const { container } = renderWithProvider(<TransactionStatus {...props} />);
|
|
|
|
expect(container).toMatchSnapshot();
|
|
});
|
|
|
|
it('should render QUEUED properly', () => {
|
|
const props = {
|
|
status: 'queued',
|
|
};
|
|
|
|
const { container } = renderWithProvider(<TransactionStatus {...props} />);
|
|
|
|
expect(container).toMatchSnapshot();
|
|
});
|
|
|
|
it('should render UNAPPROVED properly', () => {
|
|
const props = {
|
|
status: 'unapproved',
|
|
};
|
|
|
|
const { container } = renderWithProvider(<TransactionStatus {...props} />);
|
|
|
|
expect(container).toMatchSnapshot();
|
|
});
|
|
});
|