From 14de99cf640d08c64e3e5a9147b991c13756ce37 Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 22 May 2017 12:24:49 +0200 Subject: [PATCH] fix test --- src/lib/eventManager.js | 64 -------------------------------- test-browser/tests/smoke-test.js | 1 + 2 files changed, 1 insertion(+), 64 deletions(-) delete mode 100644 src/lib/eventManager.js diff --git a/src/lib/eventManager.js b/src/lib/eventManager.js deleted file mode 100644 index 9a61393e58..0000000000 --- a/src/lib/eventManager.js +++ /dev/null @@ -1,64 +0,0 @@ -'use strict' - -function eventManager () { - this.registered = {} -} - -/* - * Unregister a listenner. - * Note that if obj is a function. the unregistration will be applied to the dummy obj {}. - * - * @param {String} eventName - the event name - * @param {Object or Func} obj - object that will listen on this event - * @param {Func} func - function of the listenners that will be executed -*/ -eventManager.prototype.unregister = function (eventName, obj, func) { - if (obj instanceof Function) { - func = obj - obj = {} - } - for (var reg in this.registered[eventName]) { - if (this.registered[eventName][reg] && (!func || this.registered[eventName][reg].func === func)) { - this.registered[eventName].splice(reg, 1) - return - } - } -} - -/* - * Register a new listenner. - * Note that if obj is a function, the function registration will be associated with the dummy object {} - * - * @param {String} eventName - the event name - * @param {Object or Func} obj - object that will listen on this event - * @param {Func} func - function of the listenners that will be executed -*/ -eventManager.prototype.register = function (eventName, obj, func) { - if (!this.registered[eventName]) { - this.registered[eventName] = [] - } - if (obj instanceof Function) { - func = obj - obj = {} - } - this.registered[eventName].push({ - obj: obj, - func: func - }) -} - -/* - * trigger event. - * Every listenner have their associated function executed - * - * @param {String} eventName - the event name - * @param {Array}j - argument that will be passed to the exectued function. -*/ -eventManager.prototype.trigger = function (eventName, args) { - for (var listener in this.registered[eventName]) { - var l = this.registered[eventName][listener] - l.func.apply(l.obj, args) - } -} - -module.exports = eventManager diff --git a/test-browser/tests/smoke-test.js b/test-browser/tests/smoke-test.js index 83041e4cdc..e311b3f395 100644 --- a/test-browser/tests/smoke-test.js +++ b/test-browser/tests/smoke-test.js @@ -10,6 +10,7 @@ module.exports = { 'Smoke test': function (browser) { browser .waitForElementVisible('#righthand-panel', 10000) + .click('.settingsView') .assert.containsText('#righthand-panel', 'Solidity version') .end() },