diff options
author | Thomas Huang <tmashuang@users.noreply.github.com> | 2019-06-05 05:55:56 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-05 05:55:56 +0800 |
commit | be911711942914e7f6df535afff1a3ee87e23b6f (patch) | |
tree | bbd890e0a6a1bd72d2560e734ce66ed42a294722 /test/integration/lib/send-new-ui.js | |
parent | 3d7bdd6ecb5e8e17cb8ccf83f56ad389971332c1 (diff) | |
parent | 28e030a11d75df81e16f3ebf726bfc59fcee679e (diff) | |
download | tangerine-wallet-browser-be911711942914e7f6df535afff1a3ee87e23b6f.tar tangerine-wallet-browser-be911711942914e7f6df535afff1a3ee87e23b6f.tar.gz tangerine-wallet-browser-be911711942914e7f6df535afff1a3ee87e23b6f.tar.bz2 tangerine-wallet-browser-be911711942914e7f6df535afff1a3ee87e23b6f.tar.lz tangerine-wallet-browser-be911711942914e7f6df535afff1a3ee87e23b6f.tar.xz tangerine-wallet-browser-be911711942914e7f6df535afff1a3ee87e23b6f.tar.zst tangerine-wallet-browser-be911711942914e7f6df535afff1a3ee87e23b6f.zip |
Merge pull request #6683 from MetaMask/develop
Merge dev to master
Diffstat (limited to 'test/integration/lib/send-new-ui.js')
-rw-r--r-- | test/integration/lib/send-new-ui.js | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/test/integration/lib/send-new-ui.js b/test/integration/lib/send-new-ui.js index 78014feef..0cca9e959 100644 --- a/test/integration/lib/send-new-ui.js +++ b/test/integration/lib/send-new-ui.js @@ -71,11 +71,29 @@ async function runSendFlowTest (assert) { assert.equal(sendToAccountAddress, '0x2f8D4a878cFA04A6E60D46362f5644DeAb66572D', 'send to dropdown selects the correct address') const sendAmountField = await queryAsync($, '.send-v2__form-row:eq(3)') - sendAmountField.find('.unit-input')[0].click() - const sendAmountFieldInput = await findAsync(sendAmountField, '.unit-input__input') + + const amountMaxButton = await queryAsync($, '.send-v2__amount-max') + amountMaxButton.click() + reactTriggerChange(sendAmountField.find('input')[1]) + assert.equal(sendAmountFieldInput.is(':disabled'), true, 'disabled the send amount input when max mode is on') + + const gasPriceButtonGroup = await queryAsync($, '.gas-price-button-group--small') + const gasPriceButton = await gasPriceButtonGroup.find('button')[0] + const valueBeforeGasPriceChange = sendAmountFieldInput.prop('value') + gasPriceButton.click() + reactTriggerChange(sendAmountField.find('input')[1]) + + await timeout(1000) + + assert.notEqual(valueBeforeGasPriceChange, sendAmountFieldInput.prop('value'), 'send amount value changes when gas price changes') + + amountMaxButton.click() + reactTriggerChange(sendAmountField.find('input')[1]) + + sendAmountField.find('.unit-input').click() sendAmountFieldInput.val('5.1') - reactTriggerChange(sendAmountField.find('input')[0]) + reactTriggerChange(sendAmountField.find('input')[1]) let errorMessage = await queryAsync($, '.send-v2__error') assert.equal(errorMessage[0].textContent, 'Insufficient funds.', 'send should render an insufficient fund error message') |