mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-24 11:01:41 +01:00
5d1c9313db
* Various component tests and some conditional statements Conditional in account-menu in removeAccount when keyring sometimes is not initially provideed Conditional on unlock-page when there is no target.getBoundingClientRect on the element. * Update helpers * Remove component debugging * Add default params for render helpers * Remove stubComponent for old Mascot Changes in https://github.com/MetaMask/metamask-extension/pull/7893 has prevented the need to stub it out. Change logout to lock in account-menu test
32 lines
636 B
JavaScript
32 lines
636 B
JavaScript
import React from 'react'
|
|
import assert from 'assert'
|
|
import sinon from 'sinon'
|
|
import { mount } from 'enzyme'
|
|
import RevealSeedPage from '../reveal-seed'
|
|
|
|
describe('Reveal Seed Page', () => {
|
|
let wrapper
|
|
|
|
const props = {
|
|
history: {
|
|
push: sinon.spy(),
|
|
},
|
|
requestRevealSeedWords: sinon.stub().resolves(),
|
|
}
|
|
|
|
beforeEach(() => {
|
|
wrapper = mount(
|
|
<RevealSeedPage.WrappedComponent {...props} />, {
|
|
context: {
|
|
t: str => str,
|
|
},
|
|
}
|
|
)
|
|
})
|
|
|
|
it('form submit', () => {
|
|
wrapper.find('form').simulate('submit')
|
|
assert(props.requestRevealSeedWords.calledOnce)
|
|
})
|
|
})
|