1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-24 19:10:22 +01:00
metamask-extension/ui/app/components/transaction-status/tests/transaction-status.component.test.js
2018-12-09 12:48:06 -08:00

34 lines
877 B
JavaScript

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')
})
})