diff options
author | brunobar79 <brunobar79@gmail.com> | 2018-11-15 04:42:45 +0800 |
---|---|---|
committer | brunobar79 <brunobar79@gmail.com> | 2018-11-15 04:42:45 +0800 |
commit | 18f39ef69e117a3560456a30f0e8506ed7b0e044 (patch) | |
tree | ee784e647b16f343b7efbe298a5f9c5f462d04e3 | |
parent | 484aa6801ea50fb08253fd08559710c53e0c189d (diff) | |
parent | f6e042b7b12fec755b0a91ff24a1e812f65b638d (diff) | |
download | tangerine-wallet-browser-18f39ef69e117a3560456a30f0e8506ed7b0e044.tar.gz tangerine-wallet-browser-18f39ef69e117a3560456a30f0e8506ed7b0e044.tar.zst tangerine-wallet-browser-18f39ef69e117a3560456a30f0e8506ed7b0e044.zip |
Merge branch 'develop' of github.com:MetaMask/metamask-extension into trezor-v5
3 files changed, 40 insertions, 1 deletions
diff --git a/app/scripts/contentscript.js b/app/scripts/contentscript.js index ee38ee3ab..92e382ea5 100644 --- a/app/scripts/contentscript.js +++ b/app/scripts/contentscript.js @@ -302,6 +302,11 @@ function getSiteName (window) { return siteName.content } + const metaTitle = document.querySelector('head > meta[name="title"]') + if (metaTitle) { + return metaTitle.content + } + return document.title } 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', } |