From 46b29a50f095aa11eb9266b06dc86bcc9c92ce01 Mon Sep 17 00:00:00 2001 From: Alexander Tseung Date: Tue, 13 Nov 2018 16:51:46 -0800 Subject: Show APPROVED status for transactions that have been approved but not submitted --- .../tests/transaction-status.component.test.js | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 ui/app/components/transaction-status/tests/transaction-status.component.test.js (limited to 'ui/app/components/transaction-status/tests') diff --git a/ui/app/components/transaction-status/tests/transaction-status.component.test.js b/ui/app/components/transaction-status/tests/transaction-status.component.test.js new file mode 100644 index 000000000..9e3bffe4f --- /dev/null +++ b/ui/app/components/transaction-status/tests/transaction-status.component.test.js @@ -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( + , + { 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( + , + { context: { t: str => str.toUpperCase() } } + ) + + assert.ok(wrapper) + const tooltipProps = wrapper.find(Tooltip).props() + assert.equal(tooltipProps.children, 'PENDING') + }) +}) -- cgit