Fix send integration tests for compatability with confirm refactor.

feature/default_network_editable
Dan 6 years ago
parent a7a66171c2
commit 91eca558f0
  1. 18
      development/states/confirm-new-ui.json
  2. 18
      development/states/send-edit.json
  3. 18
      development/states/send-new-ui.json
  4. 14
      test/integration/lib/send-new-ui.js

@ -156,5 +156,23 @@
"fromDropdownOpen": false, "fromDropdownOpen": false,
"toDropdownOpen": false, "toDropdownOpen": false,
"errors": {} "errors": {}
},
"confirmTransaction": {
"txData": {},
"tokenData": {},
"methodData": {},
"tokenProps": {
"tokenDecimals": "",
"tokenSymbol": ""
},
"fiatTransactionAmount": "",
"fiatTransactionFee": "",
"fiatTransactionTotal": "",
"ethTransactionAmount": "",
"ethTransactionFee": "",
"ethTransactionTotal": "",
"hexGasTotal": "",
"nonce": "",
"fetchingMethodData": false
} }
} }

@ -156,5 +156,23 @@
"fromDropdownOpen": false, "fromDropdownOpen": false,
"toDropdownOpen": false, "toDropdownOpen": false,
"errors": {} "errors": {}
},
"confirmTransaction": {
"txData": {},
"tokenData": {},
"methodData": {},
"tokenProps": {
"tokenDecimals": "",
"tokenSymbol": ""
},
"fiatTransactionAmount": "",
"fiatTransactionFee": "",
"fiatTransactionTotal": "",
"ethTransactionAmount": "",
"ethTransactionFee": "",
"ethTransactionTotal": "",
"hexGasTotal": "",
"nonce": "",
"fetchingMethodData": false
} }
} }

@ -135,5 +135,23 @@
"fromDropdownOpen": false, "fromDropdownOpen": false,
"toDropdownOpen": false, "toDropdownOpen": false,
"errors": {} "errors": {}
},
"confirmTransaction": {
"txData": {},
"tokenData": {},
"methodData": {},
"tokenProps": {
"tokenDecimals": "",
"tokenSymbol": ""
},
"fiatTransactionAmount": "",
"fiatTransactionFee": "",
"fiatTransactionTotal": "",
"ethTransactionAmount": "",
"ethTransactionFee": "",
"ethTransactionTotal": "",
"hexGasTotal": "",
"nonce": "",
"fetchingMethodData": false
} }
} }

@ -125,18 +125,18 @@ async function runSendFlowTest (assert, done) {
reactTriggerChange(selectState[0]) reactTriggerChange(selectState[0])
const confirmFromName = (await queryAsync($, '.sender-to-recipient__sender-name')).first() 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() 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') assert.equal(confirmToName[0].textContent, 'Send Account 3', 'confirm screen should show correct to name')
const confirmScreenRows = await queryAsync($, '.confirm-screen-rows') const confirmScreenRowFiats = await queryAsync($, '.confirm-detail-row__fiat')
const confirmScreenGas = confirmScreenRows.find('.currency-display__converted-value')[0] const confirmScreenGas = confirmScreenRowFiats[0]
assert.equal(confirmScreenGas.textContent, '$3.60 USD', 'confirm screen should show correct gas') assert.equal(confirmScreenGas.textContent, '$3.60', 'confirm screen should show correct gas')
const confirmScreenTotal = confirmScreenRows.find('.confirm-screen-row-info')[2] const confirmScreenTotal = confirmScreenRowFiats[1]
assert.equal(confirmScreenTotal.textContent, '$2,405.36 USD', 'confirm screen should show correct total') 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() confirmScreenBackButton[0].click()
const sendFromFieldItemInEdit = await queryAsync($, '.account-list-item') const sendFromFieldItemInEdit = await queryAsync($, '.account-list-item')

Loading…
Cancel
Save