A Metamask fork with Infura removed and default networks editable
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.
ciphermask/ui/components/app/transaction-status/transaction-status.componen...

63 lines
1.5 KiB

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();
});
});