From 0c2c021071039ae20f45e7a2ddea09d738f0674e Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Tue, 16 Jun 2020 10:27:35 +0100 Subject: [PATCH] done callback --- test-browser/commands/clickLaunchIcon.js | 2 +- test-browser/helpers/init.js | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/test-browser/commands/clickLaunchIcon.js b/test-browser/commands/clickLaunchIcon.js index 59db1e03842..850c0d01974 100644 --- a/test-browser/commands/clickLaunchIcon.js +++ b/test-browser/commands/clickLaunchIcon.js @@ -3,8 +3,8 @@ const EventEmitter = require('events') class ClickLaunchIcon extends EventEmitter { command (icon) { this.api.waitForElementVisible('#icon-panel div[plugin="' + icon + '"]').click('#icon-panel div[plugin="' + icon + '"]').perform((done) => { - this.emit('complete') done() + this.emit('complete') }) return this } diff --git a/test-browser/helpers/init.js b/test-browser/helpers/init.js index 9dbf198505f..23ae1d7bf90 100644 --- a/test-browser/helpers/init.js +++ b/test-browser/helpers/init.js @@ -10,16 +10,17 @@ module.exports = function (browser, callback, url, preloadPlugins = true) { if (preloadPlugins) { initModules(browser, () => { browser.clickLaunchIcon('solidity') - .pause(2000) + console.log('called init after') + browser.pause(2000) .execute(() => { document.getElementById('autoCompile').click() }) }) } }) - .perform(() => { - callback() - }) + }) + .perform(() => { + callback() }) }