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.
41 lines
1011 B
41 lines
1011 B
import React from 'react'
|
|
import { configure } from 'enzyme'
|
|
import Adapter from 'enzyme-adapter-react-16'
|
|
import { ThemeProvider } from 'styled-components'
|
|
import Request from 'components/Form/Request'
|
|
import { dark } from 'themes'
|
|
import { mountWithIntl } from '../../__helpers__/intl-enzyme-test-helper'
|
|
|
|
configure({ adapter: new Adapter() })
|
|
|
|
const defaultProps = {
|
|
requestform: {},
|
|
ticker: {
|
|
currency: 'btc',
|
|
fiatTicker: 'USD'
|
|
},
|
|
|
|
currencyFilters: [],
|
|
currencyName: '',
|
|
requestFiatAmount: '',
|
|
|
|
setRequestAmount: () => {},
|
|
setRequestMemo: () => {},
|
|
setCurrency: () => {},
|
|
|
|
onRequestSubmit: () => {}
|
|
}
|
|
|
|
describe('Form', () => {
|
|
describe('should show request form when formType is REQUEST_FORM', () => {
|
|
const props = { ...defaultProps }
|
|
const el = mountWithIntl(
|
|
<ThemeProvider theme={dark}>
|
|
<Request {...props} />
|
|
</ThemeProvider>
|
|
)
|
|
it('should contain Request', () => {
|
|
expect(el.contains('Request Payment')).toBe(true)
|
|
})
|
|
})
|
|
})
|
|
|