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/app/pages/unlock-page/unlock-page.component.test.js

29 lines
896 B

import React from 'react';
import sinon from 'sinon';
import configureMockStore from 'redux-mock-store';
import { fireEvent } from '@testing-library/react';
import { renderWithProvider } from '../../../../test/lib/render-helpers';
import UnlockPage from './unlock-page.component';
describe('Unlock Page Component', () => {
it('clicks imports seed button', () => {
const props = {
history: {
push: sinon.spy(),
},
isUnlocked: false,
onRestore: sinon.spy(),
onSubmit: sinon.spy(),
forceUpdateMetamaskState: sinon.spy(),
showOptInModal: sinon.spy(),
};
const { getByText } = renderWithProvider(
<UnlockPage {...props} />,
configureMockStore()({ metamask: { currentLocale: 'en' } }),
);
fireEvent.click(getByText('import using seed phrase'));
expect(props.onRestore.calledOnce).toStrictEqual(true);
});
});