add callback to testFunction

pull/1/head
yann300 7 years ago
parent 5f4fe75c56
commit d6f39d3e73
  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