From fbb1aca61bebef082a3365175c735633bdbce123 Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 28 Feb 2018 10:07:22 +0100 Subject: [PATCH] fix test --- test-browser/helpers/contracts.js | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/test-browser/helpers/contracts.js b/test-browser/helpers/contracts.js index e7e5427d11..9cedc6e223 100644 --- a/test-browser/helpers/contracts.js +++ b/test-browser/helpers/contracts.js @@ -161,23 +161,19 @@ function setEditorValue (value, callback) { return this } -function addInstance (browser, address, isValidFormat, isValidChecksum, callback) { +function addInstance(browser, address, isValidFormat, isValidChecksum, callback) { browser.setValue('.ataddressinput', address, function () { browser.click('div[class^="atAddress"]') - .perform((client, done) => { - browser.execute(function () { - var ret = document.querySelector('div[class^="modalBody"] div').innerHTML - document.querySelector('#modal-footer-ok').click() - return ret - }, [], function (result) { - if (!isValidFormat) { - browser.assert.fail(result.value, 'Invalid address.', '') - } else if (!isValidChecksum) { - browser.assert.fail(result.value, 'Invalid checksum address.', '') - } - done() - }) - }).perform(() => { + .execute(function () { + var ret = document.querySelector('div[class^="modalBody"] div').innerHTML + document.querySelector('#modal-footer-ok').click() + return ret + }, [], function (result) { + if (!isValidFormat) { + browser.assert.equal(result.value, 'Invalid address.') + } else if (!isValidChecksum) { + browser.assert.equal(result.value, 'Invalid checksum address.') + } callback() }) })