Browse Source
enhance(form-tests): Test that Pay Form display respects isOnchain / isLn props
renovate/lint-staged-8.x
Ben Woosley
7 years ago
No known key found for this signature in database
GPG Key ID: 6EE5F3785F78B345
1 changed files with
22 additions and
0 deletions
-
test/components/Form/Payform.spec.js
|
|
@ -38,4 +38,26 @@ describe('Form', () => { |
|
|
|
expect(el.contains('on-chain')).toBe(false) |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
describe('should show lightning with a lightning input', () => { |
|
|
|
const props = { ...defaultProps, isLn: true } |
|
|
|
const el = shallow(<PayForm {...props} />) |
|
|
|
|
|
|
|
it('should contain PayForm', () => { |
|
|
|
expect(el.find('input#paymentRequest').props.value).toBe(undefined) |
|
|
|
expect(el.contains('lightning network')).toBe(true) |
|
|
|
expect(el.contains('on-chain')).toBe(false) |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
describe('should show on-chain with an on-chain input', () => { |
|
|
|
const props = { ...defaultProps, isOnchain: true } |
|
|
|
const el = shallow(<PayForm {...props} />) |
|
|
|
|
|
|
|
it('should contain PayForm', () => { |
|
|
|
expect(el.find('input#paymentRequest').props.value).toBe(undefined) |
|
|
|
expect(el.contains('lightning network')).toBe(false) |
|
|
|
expect(el.contains('on-chain')).toBe(true) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|