diff --git a/ui/app/components/app/transaction-action/tests/transaction-action.component.test.js b/ui/app/components/app/transaction-action/tests/transaction-action.component.test.js index 2168fe1f7..2f99ca0cb 100644 --- a/ui/app/components/app/transaction-action/tests/transaction-action.component.test.js +++ b/ui/app/components/app/transaction-action/tests/transaction-action.component.test.js @@ -46,6 +46,7 @@ describe('TransactionAction Component', function () { assert.equal(wrapper.find('.transaction-action').length, 1) wrapper.setState({ transactionAction: 'sentEther' }) assert.equal(wrapper.text(), 'sentEther') + assert.equal(wrapper.find('.transaction-action').props().title.trim(), 'sentEther') }) it('should render Approved', async function () { @@ -81,6 +82,7 @@ describe('TransactionAction Component', function () { assert.ok(wrapper) assert.equal(wrapper.find('.transaction-action').length, 1) 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 () { @@ -114,6 +116,7 @@ describe('TransactionAction Component', function () { assert.ok(wrapper) assert.equal(wrapper.find('.transaction-action').length, 1) assert.equal(wrapper.find('.transaction-action').text().trim(), 'contractInteraction') + assert.equal(wrapper.find('.transaction-action').props().title.trim(), 'contractInteraction') }) }) }) diff --git a/ui/app/components/app/transaction-action/transaction-action.component.js b/ui/app/components/app/transaction-action/transaction-action.component.js index 26012ff7f..e1617fcbc 100644 --- a/ui/app/components/app/transaction-action/transaction-action.component.js +++ b/ui/app/components/app/transaction-action/transaction-action.component.js @@ -29,9 +29,11 @@ export default class TransactionAction extends PureComponent { render () { const { className } = this.props + const action = this.getTransactionAction() + return ( -