From eb17151ff4c668ff1a99bad696cd379ffc3d8f24 Mon Sep 17 00:00:00 2001 From: Alexander Tseung Date: Thu, 16 Aug 2018 12:46:40 -0700 Subject: [PATCH] Change "Outgoing" to "Sent Ether" or "Sent Token" --- app/_locales/en/messages.json | 6 ++++++ test/e2e/beta/metamask-beta-ui.spec.js | 8 ++++---- .../tests/transaction-action.component.test.js | 4 ++-- ui/app/constants/transactions.js | 4 ++-- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index a16d41bad..b5b87213e 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -903,6 +903,12 @@ "sendTokens": { "message": "Send Tokens" }, + "sentEther": { + "message": "sent ether" + }, + "sentTokens": { + "message": "sent tokens" + }, "separateEachWord": { "message": "Separate each word with a single space" }, diff --git a/test/e2e/beta/metamask-beta-ui.spec.js b/test/e2e/beta/metamask-beta-ui.spec.js index 60ab115a0..eede90ecd 100644 --- a/test/e2e/beta/metamask-beta-ui.spec.js +++ b/test/e2e/beta/metamask-beta-ui.spec.js @@ -560,7 +560,7 @@ describe('MetaMask', function () { driver.wait(async () => { const confirmedTxes = await findElements(driver, By.css('.transaction-list__completed-transactions .transaction-list-item')) return confirmedTxes.length === 4 - }, 10000) + }, 15000) const txValues = await findElements(driver, By.css('.transaction-list-item__amount--secondary')) await driver.wait(until.elementTextMatches(txValues[0], /-4\sETH/), 10000) @@ -761,8 +761,8 @@ describe('MetaMask', function () { return confirmedTxes.length === 1 }, 10000) const txStatuses = await findElements(driver, By.css('.transaction-list-item__action')) - const tx = await driver.wait(until.elementTextMatches(txStatuses[0], /Outgoing|Failed/), 10000) - assert.equal(await tx.getText(), 'Outgoing') + const tx = await driver.wait(until.elementTextMatches(txStatuses[0], /Sent\sToken|Failed/), 10000) + assert.equal(await tx.getText(), 'Sent Tokens') }) }) @@ -842,7 +842,7 @@ describe('MetaMask', function () { const txValues = await findElements(driver, By.css('.transaction-list-item__amount--primary')) await driver.wait(until.elementTextMatches(txValues[0], /-7\sTST/)) const txStatuses = await findElements(driver, By.css('.transaction-list-item__action')) - await driver.wait(until.elementTextMatches(txStatuses[0], /Outgoing/)) + await driver.wait(until.elementTextMatches(txStatuses[0], /Sent\sToken/)) const walletBalance = await findElement(driver, By.css('.wallet-balance')) await walletBalance.click() diff --git a/ui/app/components/transaction-action/tests/transaction-action.component.test.js b/ui/app/components/transaction-action/tests/transaction-action.component.test.js index bba997c20..158bc8dc4 100644 --- a/ui/app/components/transaction-action/tests/transaction-action.component.test.js +++ b/ui/app/components/transaction-action/tests/transaction-action.component.test.js @@ -34,7 +34,7 @@ describe('TransactionAction Component', () => { assert.equal(wrapper.text(), '--') }) - it('should render Outgoing', () => { + it('should render Sent Ether', () => { const methodData = { data: {}, done: true, error: null } const transaction = { id: 1, @@ -58,7 +58,7 @@ describe('TransactionAction Component', () => { />, { context: { tOrDefault }}) assert.equal(wrapper.find('.transaction-action').length, 1) - assert.equal(wrapper.text(), 'outgoing') + assert.equal(wrapper.text(), 'sentEther') }) it('should render Approved', () => { diff --git a/ui/app/constants/transactions.js b/ui/app/constants/transactions.js index da1d2e590..df6c4c8a4 100644 --- a/ui/app/constants/transactions.js +++ b/ui/app/constants/transactions.js @@ -11,10 +11,10 @@ export const TOKEN_METHOD_TRANSFER = 'transfer' export const TOKEN_METHOD_APPROVE = 'approve' export const TOKEN_METHOD_TRANSFER_FROM = 'transferfrom' -export const SEND_ETHER_ACTION_KEY = 'outgoing' +export const SEND_ETHER_ACTION_KEY = 'sentEther' export const DEPLOY_CONTRACT_ACTION_KEY = 'contractDeployment' export const APPROVE_ACTION_KEY = 'approve' -export const SEND_TOKEN_ACTION_KEY = 'outgoing' +export const SEND_TOKEN_ACTION_KEY = 'sentTokens' export const TRANSFER_FROM_ACTION_KEY = 'transferFrom' export const SIGNATURE_REQUEST_KEY = 'signatureRequest' export const UNKNOWN_FUNCTION_KEY = 'unknownFunction'