From a6cb13422de26e7d6bcecda03fb4756d3bf6ed67 Mon Sep 17 00:00:00 2001 From: Dan Date: Fri, 22 Jun 2018 13:30:27 -0230 Subject: Wait for element text match in metamask-beta-ui e2e send token test --- test/e2e/beta/metamask-beta-ui.spec.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'test') diff --git a/test/e2e/beta/metamask-beta-ui.spec.js b/test/e2e/beta/metamask-beta-ui.spec.js index d5f41a6ef..efd391003 100644 --- a/test/e2e/beta/metamask-beta-ui.spec.js +++ b/test/e2e/beta/metamask-beta-ui.spec.js @@ -661,8 +661,7 @@ describe('MetaMask', function () { const txValues = await findElements(driver, By.css('.tx-list-value')) assert.equal(txValues.length, 1) - await delay(regularDelayMs) - assert.equal(await txValues[0].getText(), '50 TST') + await driver.wait(until.elementTextMatches(txValues[0], /50\sTST/)) const txStatuses = await findElements(driver, By.css('.tx-list-status')) const tx = await driver.wait(until.elementTextMatches(txStatuses[0], /Confirmed|Failed/)) assert.equal(await tx.getText(), 'Confirmed') @@ -740,8 +739,7 @@ describe('MetaMask', function () { assert.equal(transactions.length, 8) const txValues = await findElements(driver, By.css('.tx-list-value')) - assert.equal(txValues.length, 8) - assert.equal(await txValues[0].getText(), '26 TST') + await driver.wait(until.elementTextMatches(txValues[0], /26\sTST/)) const txStatuses = await findElements(driver, By.css('.tx-list-status')) await driver.wait(until.elementTextMatches(txStatuses[0], /Confirmed/)) -- cgit v1.2.3