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:
commit
18f39ef69e
@ -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
|
||||
}
|
||||
|
||||
|
@ -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')
|
||||
})
|
||||
})
|
@ -25,7 +25,6 @@ const statusToClassNameHash = {
|
||||
}
|
||||
|
||||
const statusToTextHash = {
|
||||
[APPROVED_STATUS]: 'pending',
|
||||
[SUBMITTED_STATUS]: 'pending',
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user