diff options
author | Alexander Tseung <alextsg@gmail.com> | 2019-01-15 09:37:42 +0800 |
---|---|---|
committer | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2019-01-25 07:01:30 +0800 |
commit | 7d18a47c22bc43053233c09e4d113a1bc17b1b71 (patch) | |
tree | 13328eae96e05e66e42c299b3efeb9c403c14991 /test | |
parent | 941a9a0fd95cb0d68d940e42a431f520d717921c (diff) | |
download | tangerine-wallet-browser-7d18a47c22bc43053233c09e4d113a1bc17b1b71.tar tangerine-wallet-browser-7d18a47c22bc43053233c09e4d113a1bc17b1b71.tar.gz tangerine-wallet-browser-7d18a47c22bc43053233c09e4d113a1bc17b1b71.tar.bz2 tangerine-wallet-browser-7d18a47c22bc43053233c09e4d113a1bc17b1b71.tar.lz tangerine-wallet-browser-7d18a47c22bc43053233c09e4d113a1bc17b1b71.tar.xz tangerine-wallet-browser-7d18a47c22bc43053233c09e4d113a1bc17b1b71.tar.zst tangerine-wallet-browser-7d18a47c22bc43053233c09e4d113a1bc17b1b71.zip |
Fix integration tests
Diffstat (limited to 'test')
-rw-r--r-- | test/integration/lib/tx-list-items.js | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/test/integration/lib/tx-list-items.js b/test/integration/lib/tx-list-items.js index ff196fac8..ac17a2a67 100644 --- a/test/integration/lib/tx-list-items.js +++ b/test/integration/lib/tx-list-items.js @@ -16,7 +16,7 @@ QUnit.test('renders list items successfully', (assert) => { global.ethQuery = global.ethQuery || {} global.ethQuery.getTransactionCount = (_, cb) => { - cb(null, '0x3') + cb(null, '0x4') } async function runTxListItemsTest (assert, done) { @@ -30,25 +30,21 @@ async function runTxListItemsTest (assert, done) { metamaskLogo[0].click() const txListItems = await queryAsync($, '.transaction-list-item') - assert.equal(txListItems.length, 7, 'all tx list items are rendered') + assert.equal(txListItems.length, 6, 'all tx list items are rendered') - const approvedTx = txListItems[0] - const approvedTxRenderedStatus = await findAsync($(approvedTx), '.transaction-list-item__status') - assert.equal(approvedTxRenderedStatus[0].textContent, 'pending', 'approvedTx has correct label') - - const unapprovedMsg = txListItems[1] + const unapprovedMsg = txListItems[0] const unapprovedMsgDescription = await findAsync($(unapprovedMsg), '.transaction-list-item__action') assert.equal(unapprovedMsgDescription[0].textContent, 'Signature Request', 'unapprovedMsg has correct description') + const approvedTx = txListItems[2] + const approvedTxRenderedStatus = await findAsync($(approvedTx), '.transaction-list-item__status') + assert.equal(approvedTxRenderedStatus[0].textContent, 'pending', 'approvedTx has correct label') + const shapeShiftTx = txListItems[4] const shapeShiftTxStatus = await findAsync($(shapeShiftTx), '.flex-column div:eq(1)') assert.equal(shapeShiftTxStatus[0].textContent, 'No deposits received', 'shapeShiftTx has correct status') - const rejectedTx = txListItems[5] - const rejectedTxRenderedStatus = await findAsync($(rejectedTx), '.transaction-list-item__status') - assert.equal(rejectedTxRenderedStatus[0].textContent, 'Rejected', 'rejectedTx has correct label') - - const confirmedTokenTx = txListItems[6] + const confirmedTokenTx = txListItems[5] const confirmedTokenTxAddress = await findAsync($(confirmedTokenTx), '.transaction-list-item__status') assert.equal(confirmedTokenTxAddress[0].textContent, 'Confirmed', 'confirmedTokenTx has correct address') } |