aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAlexander Tseung <alextsg@users.noreply.github.com>2018-12-10 04:48:06 +0800
committerGitHub <noreply@github.com>2018-12-10 04:48:06 +0800
commitd8ab9cc002c10757b7382a174dafff7a0247e307 (patch)
treed0a46ac3ca2334ddec2ee240214d67a8122e81b7 /test
parent575fb607c3b8deea831aa28293303991b3f6be29 (diff)
downloadtangerine-wallet-browser-d8ab9cc002c10757b7382a174dafff7a0247e307.tar.gz
tangerine-wallet-browser-d8ab9cc002c10757b7382a174dafff7a0247e307.tar.zst
tangerine-wallet-browser-d8ab9cc002c10757b7382a174dafff7a0247e307.zip
Group transactions by nonce (#5886)
Diffstat (limited to 'test')
-rw-r--r--test/integration/lib/confirm-sig-requests.js4
-rw-r--r--test/integration/lib/tx-list-items.js26
2 files changed, 10 insertions, 20 deletions
diff --git a/test/integration/lib/confirm-sig-requests.js b/test/integration/lib/confirm-sig-requests.js
index 9c2ad7cf4..041a1af34 100644
--- a/test/integration/lib/confirm-sig-requests.js
+++ b/test/integration/lib/confirm-sig-requests.js
@@ -21,8 +21,8 @@ async function runConfirmSigRequestsTest (assert, done) {
const pendingRequestItem = $.find('.transaction-list-item .transaction-list-item__grid')
- if (pendingRequestItem[0]) {
- pendingRequestItem[0].click()
+ if (pendingRequestItem[2]) {
+ pendingRequestItem[2].click()
}
await timeout(1000)
diff --git a/test/integration/lib/tx-list-items.js b/test/integration/lib/tx-list-items.js
index ed4f82074..ff196fac8 100644
--- a/test/integration/lib/tx-list-items.js
+++ b/test/integration/lib/tx-list-items.js
@@ -30,35 +30,25 @@ async function runTxListItemsTest (assert, done) {
metamaskLogo[0].click()
const txListItems = await queryAsync($, '.transaction-list-item')
- assert.equal(txListItems.length, 8, 'all tx list items are rendered')
+ assert.equal(txListItems.length, 7, 'all tx list items are rendered')
- const retryTxGrid = await findAsync($(txListItems[2]), '.transaction-list-item__grid')
- retryTxGrid[0].click()
- const retryTxDetails = await findAsync($, '.transaction-list-item-details')
- const headerButtons = await findAsync($(retryTxDetails[0]), '.transaction-list-item-details__header-button')
- assert.equal(headerButtons[0].textContent, 'speed up')
-
- const approvedTx = txListItems[2]
+ 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[0]
+ const unapprovedMsg = txListItems[1]
const unapprovedMsgDescription = await findAsync($(unapprovedMsg), '.transaction-list-item__action')
assert.equal(unapprovedMsgDescription[0].textContent, 'Signature Request', 'unapprovedMsg has correct description')
- const failedTx = txListItems[4]
- const failedTxRenderedStatus = await findAsync($(failedTx), '.transaction-list-item__status')
- assert.equal(failedTxRenderedStatus[0].textContent, 'Failed', 'failedTx has correct label')
-
- const shapeShiftTx = txListItems[5]
+ 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 confirmedTokenTxAddress = await findAsync($(confirmedTokenTx), '.transaction-list-item__status')
assert.equal(confirmedTokenTxAddress[0].textContent, 'Confirmed', 'confirmedTokenTx has correct address')
-
- const rejectedTx = txListItems[7]
- const rejectedTxRenderedStatus = await findAsync($(rejectedTx), '.transaction-list-item__status')
- assert.equal(rejectedTxRenderedStatus[0].textContent, 'Rejected', 'rejectedTx has correct label')
}