mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-23 10:30:04 +01:00
3c01011ffe
* switched to use banner alert and added story * enabled dismiss functionality * remove close button * bump global branches coverage target * replace Typography with Text and (link) Button with ButtonLink * unit test for component rendering * left-align button links to match text * update copy to reflect figma mock ups * update unit test snapshot * bump coverage threshold * update snapshot to reflect button component changes * update snapshot to reflect box changes
29 lines
747 B
JavaScript
29 lines
747 B
JavaScript
import React from 'react';
|
|
import configureMockStore from 'redux-mock-store';
|
|
import { renderWithProvider } from '../../../../test/lib/render-helpers';
|
|
import LedgerInstructionField from '.';
|
|
|
|
describe('LedgerInstructionField Component', () => {
|
|
const mockStore = {
|
|
appState: {
|
|
ledgerWebHidConnectedStatus: 'notConnected',
|
|
},
|
|
metamask: {
|
|
ledgerTransportType: 'webhid',
|
|
},
|
|
};
|
|
|
|
describe('rendering', () => {
|
|
it('should render properly with data instruction', () => {
|
|
const store = configureMockStore()(mockStore);
|
|
|
|
const { container } = renderWithProvider(
|
|
<LedgerInstructionField showDataInstruction />,
|
|
store,
|
|
);
|
|
|
|
expect(container).toMatchSnapshot();
|
|
});
|
|
});
|
|
});
|