feature/default_network_editable
parent
0549782595
commit
46b29a50f0
@ -0,0 +1,35 @@ |
||||
import React from 'react' |
||||
import assert from 'assert' |
||||
import { mount } from 'enzyme' |
||||
import TransactionStatus from '../transaction-status.component' |
||||
import Tooltip from '../../tooltip-v2' |
||||
|
||||
describe('TransactionStatus Component', () => { |
||||
it('should render APPROVED properly', () => { |
||||
const wrapper = mount( |
||||
<TransactionStatus |
||||
statusKey="approved" |
||||
title="test-title" |
||||
/>, |
||||
{ context: { t: str => str.toUpperCase() } } |
||||
) |
||||
|
||||
assert.ok(wrapper) |
||||
const tooltipProps = wrapper.find(Tooltip).props() |
||||
assert.equal(tooltipProps.children, 'APPROVED') |
||||
assert.equal(tooltipProps.title, 'test-title') |
||||
}) |
||||
|
||||
it('should render SUBMITTED properly', () => { |
||||
const wrapper = mount( |
||||
<TransactionStatus |
||||
statusKey="submitted" |
||||
/>, |
||||
{ context: { t: str => str.toUpperCase() } } |
||||
) |
||||
|
||||
assert.ok(wrapper) |
||||
const tooltipProps = wrapper.find(Tooltip).props() |
||||
assert.equal(tooltipProps.children, 'PENDING') |
||||
}) |
||||
}) |
Loading…
Reference in new issue