From d6f39d3e73222eb30d6bae0a1bacfa6f7221b8cc Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 11 Dec 2017 14:45:55 +0100 Subject: [PATCH] add callback to testFunction --- test-browser/helpers/contracts.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test-browser/helpers/contracts.js b/test-browser/helpers/contracts.js index afb8b1b472..2e8ef28c40 100644 --- a/test-browser/helpers/contracts.js +++ b/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.waitForElementPresent('.instance button[title="' + fnFullName + '"]') .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) } done() + if (callback) callback() }) return this }