diff options
author | Dan Finlay <542863+danfinlay@users.noreply.github.com> | 2018-08-08 02:31:42 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-08 02:31:42 +0800 |
commit | 0601df9dae488d997277bb6b52c28df27546e27c (patch) | |
tree | ae33a0c4610b9a9e865c797258232542a72f57b6 /test/integration/lib/send-new-ui.js | |
parent | 4598554fea7b9435e5cbecc4735c479ffbadf37e (diff) | |
parent | f6490a2a6eda943a374c01df5884acb07ba28869 (diff) | |
download | tangerine-wallet-browser-0601df9dae488d997277bb6b52c28df27546e27c.tar tangerine-wallet-browser-0601df9dae488d997277bb6b52c28df27546e27c.tar.gz tangerine-wallet-browser-0601df9dae488d997277bb6b52c28df27546e27c.tar.bz2 tangerine-wallet-browser-0601df9dae488d997277bb6b52c28df27546e27c.tar.lz tangerine-wallet-browser-0601df9dae488d997277bb6b52c28df27546e27c.tar.xz tangerine-wallet-browser-0601df9dae488d997277bb6b52c28df27546e27c.tar.zst tangerine-wallet-browser-0601df9dae488d997277bb6b52c28df27546e27c.zip |
Merge pull request #4954 from MetaMask/v4.9.0
V4.9.0
Diffstat (limited to 'test/integration/lib/send-new-ui.js')
-rw-r--r-- | test/integration/lib/send-new-ui.js | 33 |
1 files changed, 10 insertions, 23 deletions
diff --git a/test/integration/lib/send-new-ui.js b/test/integration/lib/send-new-ui.js index 72e4a8cb1..406863ca6 100644 --- a/test/integration/lib/send-new-ui.js +++ b/test/integration/lib/send-new-ui.js @@ -5,8 +5,6 @@ const { findAsync, } = require('../../lib/util') -const PASSWORD = 'password123' - QUnit.module('new ui send flow') QUnit.test('successful send flow', (assert) => { @@ -54,7 +52,7 @@ async function customizeGas (assert, price, limit, ethFee, usdFee) { ) } -async function runSendFlowTest(assert, done) { +async function runSendFlowTest (assert, done) { console.log('*** start runSendFlowTest') const selectState = await queryAsync($, 'select') selectState.val('send new ui') @@ -87,7 +85,7 @@ async function runSendFlowTest(assert, done) { sendFromFieldItemAddress = await queryAsync($, '.account-list-item__account-name') assert.equal(sendFromFieldItemAddress[0].textContent, 'Send Account 2', 'send from field dropdown changes account name') - let sendToFieldInput = await queryAsync($, '.send-v2__to-autocomplete__input') + const sendToFieldInput = await queryAsync($, '.send-v2__to-autocomplete__input') sendToFieldInput[0].focus() const sendToDropdownList = await queryAsync($, '.send-v2__from-dropdown__list') @@ -114,19 +112,8 @@ async function runSendFlowTest(assert, done) { errorMessage = $('.send-v2__error') assert.equal(errorMessage.length, 0, 'send should stop rendering amount error message after amount is corrected') - const sendGasField = await queryAsync($, '.send-v2__gas-fee-display') - assert.equal( - sendGasField.find('.currency-display__input-wrapper > input').val(), - '0.000021', - 'send gas field should show estimated gas total' - ) - assert.equal( - sendGasField.find('.currency-display__converted-value')[0].textContent, - '$0.03 USD', - 'send gas field should show estimated gas total converted to USD' - ) - await customizeGas(assert, 0, 21000, '0', '$0.00 USD') + await customizeGas(assert, 1, 21000, '0.000021', '$0.03 USD') await customizeGas(assert, 500, 60000, '0.03', '$36.03 USD') const sendButton = await queryAsync($, 'button.btn-primary.btn--large.page-container__footer-button') @@ -138,18 +125,18 @@ async function runSendFlowTest(assert, done) { reactTriggerChange(selectState[0]) const confirmFromName = (await queryAsync($, '.sender-to-recipient__sender-name')).first() - assert.equal(confirmFromName[0].textContent, 'Send Account 2', 'confirm screen should show correct from name') + assert.equal(confirmFromName[0].textContent, 'Send Account 4', 'confirm screen should show correct from name') const confirmToName = (await queryAsync($, '.sender-to-recipient__recipient-name')).last() assert.equal(confirmToName[0].textContent, 'Send Account 3', 'confirm screen should show correct to name') - const confirmScreenRows = await queryAsync($, '.confirm-screen-rows') - const confirmScreenGas = confirmScreenRows.find('.currency-display__converted-value')[0] - assert.equal(confirmScreenGas.textContent, '$3.60 USD', 'confirm screen should show correct gas') - const confirmScreenTotal = confirmScreenRows.find('.confirm-screen-row-info')[2] - assert.equal(confirmScreenTotal.textContent, '$2,405.36 USD', 'confirm screen should show correct total') + const confirmScreenRowFiats = await queryAsync($, '.confirm-detail-row__fiat') + const confirmScreenGas = confirmScreenRowFiats[0] + assert.equal(confirmScreenGas.textContent, '$3.60', 'confirm screen should show correct gas') + const confirmScreenTotal = confirmScreenRowFiats[1] + assert.equal(confirmScreenTotal.textContent, '$2,405.36', 'confirm screen should show correct total') - const confirmScreenBackButton = await queryAsync($, '.page-container__back-button') + const confirmScreenBackButton = await queryAsync($, '.confirm-page-container-header__back-button') confirmScreenBackButton[0].click() const sendFromFieldItemInEdit = await queryAsync($, '.account-list-item') |