diff --git a/package.json b/package.json index 9d12f75283..5d36e605f7 100644 --- a/package.json +++ b/package.json @@ -139,7 +139,6 @@ "ethereumjs-tx": "^2.1.2", "ethereumjs-vm": "4.1.3", "http-server": "^0.11.1", - "npm-install-version": "^6.0.2", "time-stamp": "^2.2.0", "winston": "^3.3.3" }, @@ -221,6 +220,7 @@ "nanohtml": "^1.6.3", "nightwatch": "^1.3.5", "notify-error": "^1.2.0", + "npm-install-version": "^6.0.2", "npm-link-local": "^1.1.0", "npm-merge-driver": "^2.3.5", "npm-run-all": "^4.0.2", diff --git a/test-browser/commands/noWorkerErrorFor.js b/test-browser/commands/noWorkerErrorFor.js new file mode 100644 index 0000000000..c3c0f854d6 --- /dev/null +++ b/test-browser/commands/noWorkerErrorFor.js @@ -0,0 +1,28 @@ +const EventEmitter = require('events') + +class NoWorkerErrorFor extends EventEmitter { + command (version, content) { + this.api.perform((done) => { + noWorkerErrorFor(this.api, version, content, () => { + done() + this.emit('complete') + }) + }) + return this + } +} + +function noWorkerErrorFor (browser, version, done) { + browser + .clickLaunchIcon('solidity') + .setSolidityCompilerVersion(version) + .waitForElementPresent('*[data-id="compiledErrors"]') + .notContainsText('*[data-id="compiledErrors"]', 'worker error:undefined') + .notContainsText('*[data-id="compiledErrors"]', 'Uncaught RangeError: Maximum call stack size exceeded') + .notContainsText('*[data-id="compiledErrors"]', 'RangeError: Maximum call stack size exceeded') + .perform(function (done) { + done() + }) +} + +module.exports = NoWorkerErrorFor