diff --git a/package.json b/package.json index d06f4fe39d..afacc50006 100644 --- a/package.json +++ b/package.json @@ -81,7 +81,6 @@ "dependencies": { "@remixproject/engine": "^0.2.3", "http-server": "^0.11.1", - "selenium": "^2.20.0", "standard": "^8.5.0" }, "repository": { 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