feature/default_network_editable
Alexander Tseung 7 years ago
parent 254cf975a6
commit fa8500e09a
  1. 2
      test/base.conf.js
  2. 18
      test/integration/lib/confirm-sig-requests.js
  3. 2
      test/integration/lib/send-new-ui.js
  4. 3
      ui/app/components/pending-tx/confirm-send-ether.js

@ -10,6 +10,8 @@ module.exports = function(config) {
terminal: false, terminal: false,
}, },
browserNoActivityTimeout: 100000000,
// frameworks to use // frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['qunit'], frameworks: ['qunit'],

@ -21,14 +21,22 @@ async function runConfirmSigRequestsTest(assert, done) {
selectState.val('confirm sig requests') selectState.val('confirm sig requests')
reactTriggerChange(selectState[0]) reactTriggerChange(selectState[0])
const pendingRequestItem = await queryAsync($, '.tx-list-item.tx-list-pending-item-container.tx-list-clickable') // await timeout(1000000)
pendingRequestItem[0].click()
const pendingRequestItem = $.find('.tx-list-item.tx-list-pending-item-container.tx-list-clickable')
if (pendingRequestItem[0]) {
pendingRequestItem[0].click()
}
let confirmSigHeadline = await queryAsync($, '.request-signature__headline') let confirmSigHeadline = await queryAsync($, '.request-signature__headline')
assert.equal(confirmSigHeadline[0].textContent, 'Your signature is being requested') assert.equal(confirmSigHeadline[0].textContent, 'Your signature is being requested')
let confirmSigMessage = await queryAsync($, '.request-signature__notice')
assert.ok(confirmSigMessage[0].textContent.match(/^Signing\sthis\smessage/))
let confirmSigRowValue = await queryAsync($, '.request-signature__row-value') let confirmSigRowValue = await queryAsync($, '.request-signature__row-value')
assert.ok(confirmSigRowValue[0].textContent.match(/^\#\sTerms\sof\sUse/)) assert.equal(confirmSigRowValue[0].textContent, '0x879a053d4800c6354e76c7985a865d2922c82fb5b3f4577b2fe08b998954f2e0')
let confirmSigSignButton = await queryAsync($, 'button.btn-primary--lg') let confirmSigSignButton = await queryAsync($, 'button.btn-primary--lg')
confirmSigSignButton[0].click() confirmSigSignButton[0].click()
@ -36,8 +44,8 @@ async function runConfirmSigRequestsTest(assert, done) {
confirmSigHeadline = await queryAsync($, '.request-signature__headline') confirmSigHeadline = await queryAsync($, '.request-signature__headline')
assert.equal(confirmSigHeadline[0].textContent, 'Your signature is being requested') assert.equal(confirmSigHeadline[0].textContent, 'Your signature is being requested')
let confirmSigMessage = await queryAsync($, '.request-signature__notice') confirmSigRowValue = await queryAsync($, '.request-signature__row-value')
assert.ok(confirmSigMessage[0].textContent.match(/^Signing\sthis\smessage/)) assert.ok(confirmSigRowValue[0].textContent.match(/^\#\sTerms\sof\sUse/))
confirmSigSignButton = await queryAsync($, 'button.btn-primary--lg') confirmSigSignButton = await queryAsync($, 'button.btn-primary--lg')
confirmSigSignButton[0].click() confirmSigSignButton[0].click()

@ -173,6 +173,8 @@ async function runSendFlowTest(assert, done) {
console.log(`+++++++++++++++++++++++++++++++= confirmScreenConfirmButton[0]`, confirmScreenConfirmButton[0]); console.log(`+++++++++++++++++++++++++++++++= confirmScreenConfirmButton[0]`, confirmScreenConfirmButton[0]);
confirmScreenConfirmButton[0].click() confirmScreenConfirmButton[0].click()
await timeout(10000000)
const txView = await queryAsync($, '.tx-view') const txView = await queryAsync($, '.tx-view')
console.log(`++++++++++++++++++++++++++++++++ txView[0]`, txView[0]); console.log(`++++++++++++++++++++++++++++++++ txView[0]`, txView[0]);

@ -283,7 +283,6 @@ ConfirmSendEther.prototype.editTransaction = function (txMeta) {
ConfirmSendEther.prototype.render = function () { ConfirmSendEther.prototype.render = function () {
const { const {
editTransaction,
currentCurrency, currentCurrency,
clearSend, clearSend,
conversionRate, conversionRate,
@ -339,7 +338,7 @@ ConfirmSendEther.prototype.render = function () {
h('.page-container__header', [ h('.page-container__header', [
h('.page-container__header-row', [ h('.page-container__header-row', [
h('span.page-container__back-button', { h('span.page-container__back-button', {
onClick: () => editTransaction(txMeta), onClick: () => this.editTransaction(txMeta),
style: { style: {
visibility: !txMeta.lastGasPrice ? 'initial' : 'hidden', visibility: !txMeta.lastGasPrice ? 'initial' : 'hidden',
}, },

Loading…
Cancel
Save