mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
add title to transaction action component (#8050)
This commit is contained in:
parent
dcc7d29511
commit
b63b848ed4
@ -46,6 +46,7 @@ describe('TransactionAction Component', function () {
|
|||||||
assert.equal(wrapper.find('.transaction-action').length, 1)
|
assert.equal(wrapper.find('.transaction-action').length, 1)
|
||||||
wrapper.setState({ transactionAction: 'sentEther' })
|
wrapper.setState({ transactionAction: 'sentEther' })
|
||||||
assert.equal(wrapper.text(), 'sentEther')
|
assert.equal(wrapper.text(), 'sentEther')
|
||||||
|
assert.equal(wrapper.find('.transaction-action').props().title.trim(), 'sentEther')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should render Approved', async function () {
|
it('should render Approved', async function () {
|
||||||
@ -81,6 +82,7 @@ describe('TransactionAction Component', function () {
|
|||||||
assert.ok(wrapper)
|
assert.ok(wrapper)
|
||||||
assert.equal(wrapper.find('.transaction-action').length, 1)
|
assert.equal(wrapper.find('.transaction-action').length, 1)
|
||||||
assert.equal(wrapper.find('.transaction-action').text().trim(), 'Approve')
|
assert.equal(wrapper.find('.transaction-action').text().trim(), 'Approve')
|
||||||
|
assert.equal(wrapper.find('.transaction-action').props().title.trim(), 'Approve')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should render contractInteraction', async function () {
|
it('should render contractInteraction', async function () {
|
||||||
@ -114,6 +116,7 @@ describe('TransactionAction Component', function () {
|
|||||||
assert.ok(wrapper)
|
assert.ok(wrapper)
|
||||||
assert.equal(wrapper.find('.transaction-action').length, 1)
|
assert.equal(wrapper.find('.transaction-action').length, 1)
|
||||||
assert.equal(wrapper.find('.transaction-action').text().trim(), 'contractInteraction')
|
assert.equal(wrapper.find('.transaction-action').text().trim(), 'contractInteraction')
|
||||||
|
assert.equal(wrapper.find('.transaction-action').props().title.trim(), 'contractInteraction')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -29,9 +29,11 @@ export default class TransactionAction extends PureComponent {
|
|||||||
render () {
|
render () {
|
||||||
const { className } = this.props
|
const { className } = this.props
|
||||||
|
|
||||||
|
const action = this.getTransactionAction()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={classnames('transaction-action', className)}>
|
<div className={classnames('transaction-action', className)} title={action}>
|
||||||
{ this.getTransactionAction() }
|
{ action }
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user