From ff7242349172bc3bedabdb4da3f1fae97c8edadf Mon Sep 17 00:00:00 2001 From: Dan Miller Date: Tue, 14 Aug 2018 17:30:43 -0230 Subject: [PATCH] Add explicit waits for submitted status for some txs initiated from test dapp. --- test/e2e/beta/metamask-beta-ui.spec.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/e2e/beta/metamask-beta-ui.spec.js b/test/e2e/beta/metamask-beta-ui.spec.js index 20040505a..43300bda6 100644 --- a/test/e2e/beta/metamask-beta-ui.spec.js +++ b/test/e2e/beta/metamask-beta-ui.spec.js @@ -460,6 +460,11 @@ describe('MetaMask', function () { const transactions = await findElements(driver, By.css('.tx-list-item')) assert.equal(transactions.length, 2) + await findElement(driver, By.xpath(`//span[contains(text(), 'Submitted')]`)) + + const txStatuses = await findElements(driver, By.css('.tx-list-status')) + await driver.wait(until.elementTextMatches(txStatuses[0], /Confirmed/)) + const txValues = await findElement(driver, By.css('.tx-list-value')) await driver.wait(until.elementTextMatches(txValues, /3\sETH/), 10000) }) @@ -510,6 +515,8 @@ describe('MetaMask', function () { await confirmButton.click() await delay(regularDelayMs) + await findElement(driver, By.xpath(`//span[contains(text(), 'Submitted')]`)) + const txStatuses = await findElements(driver, By.css('.tx-list-status')) await driver.wait(until.elementTextMatches(txStatuses[0], /Confirmed/))