add callback to testFunction

pull/3094/head
yann300 7 years ago
parent 4e081c5edd
commit 58d4c381d7
  1. 3
      test-browser/helpers/contracts.js

@ -102,7 +102,7 @@ function verifyCallReturnValue (browser, address, checks, done) {
}) })
} }
function testFunction (fnFullName, txHash, log, expectedInput, expectedReturn, expectedEvent) { function testFunction (fnFullName, txHash, log, expectedInput, expectedReturn, expectedEvent, callback) {
// this => browser // this => browser
this.waitForElementPresent('.instance button[title="' + fnFullName + '"]') this.waitForElementPresent('.instance button[title="' + fnFullName + '"]')
.perform(function (client, done) { .perform(function (client, done) {
@ -131,6 +131,7 @@ function testFunction (fnFullName, txHash, log, expectedInput, expectedReturn, e
client.assert.containsText('#editor-container div[class^="terminal"] span[id="tx' + txHash + '"] table[class^="txTable"] #logs', expectedEvent) client.assert.containsText('#editor-container div[class^="terminal"] span[id="tx' + txHash + '"] table[class^="txTable"] #logs', expectedEvent)
} }
done() done()
if (callback) callback()
}) })
return this return this
} }

Loading…
Cancel
Save