1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Merge branch 'develop' of github.com:MetaMask/metamask-extension into trezor-v5

This commit is contained in:
brunobar79 2018-11-14 15:42:45 -05:00
commit 18f39ef69e
3 changed files with 40 additions and 1 deletions

View File

@ -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
}

View File

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

View File

@ -25,7 +25,6 @@ const statusToClassNameHash = {
}
const statusToTextHash = {
[APPROVED_STATUS]: 'pending',
[SUBMITTED_STATUS]: 'pending',
}