aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Tseung <alextsg@gmail.com>2018-11-14 08:51:46 +0800
committerDan Finlay <542863+danfinlay@users.noreply.github.com>2018-11-14 09:37:01 +0800
commit46b29a50f095aa11eb9266b06dc86bcc9c92ce01 (patch)
tree02231a094713aeb316dd43bf012b90c9c5a16e72
parent0549782595335e8257d1b4abf7d6220020e2c8db (diff)
downloadtangerine-wallet-browser-46b29a50f095aa11eb9266b06dc86bcc9c92ce01.tar
tangerine-wallet-browser-46b29a50f095aa11eb9266b06dc86bcc9c92ce01.tar.gz
tangerine-wallet-browser-46b29a50f095aa11eb9266b06dc86bcc9c92ce01.tar.bz2
tangerine-wallet-browser-46b29a50f095aa11eb9266b06dc86bcc9c92ce01.tar.lz
tangerine-wallet-browser-46b29a50f095aa11eb9266b06dc86bcc9c92ce01.tar.xz
tangerine-wallet-browser-46b29a50f095aa11eb9266b06dc86bcc9c92ce01.tar.zst
tangerine-wallet-browser-46b29a50f095aa11eb9266b06dc86bcc9c92ce01.zip
Show APPROVED status for transactions that have been approved but not submitted
-rw-r--r--ui/app/components/transaction-status/tests/transaction-status.component.test.js35
-rw-r--r--ui/app/components/transaction-status/transaction-status.component.js1
2 files changed, 35 insertions, 1 deletions
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(
+ <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')
+ })
+})
diff --git a/ui/app/components/transaction-status/transaction-status.component.js b/ui/app/components/transaction-status/transaction-status.component.js
index c22baf18a..0d47d7868 100644
--- a/ui/app/components/transaction-status/transaction-status.component.js
+++ b/ui/app/components/transaction-status/transaction-status.component.js
@@ -25,7 +25,6 @@ const statusToClassNameHash = {
}
const statusToTextHash = {
- [APPROVED_STATUS]: 'pending',
[SUBMITTED_STATUS]: 'pending',
}