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.
|
|
|
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)
|
|
|
|
assert.equal(wrapper.text(), 'APPROVED')
|
|
|
|
assert.equal(wrapper.find(Tooltip).props().title, 'test-title')
|
|
|
|
})
|
|
|
|
|
|
|
|
it('should render SUBMITTED properly', () => {
|
|
|
|
const wrapper = mount(
|
|
|
|
<TransactionStatus
|
|
|
|
statusKey="submitted"
|
|
|
|
/>,
|
|
|
|
{ context: { t: str => str.toUpperCase() } }
|
|
|
|
)
|
|
|
|
|
|
|
|
assert.ok(wrapper)
|
|
|
|
assert.equal(wrapper.text(), 'PENDING')
|
|
|
|
})
|
|
|
|
})
|