added command

pull/5370/head
LianaHus 5 years ago
parent c9819cd3b5
commit 8bc23b167d
  1. 1
      package.json
  2. 28
      test-browser/commands/noWorkerErrorFor.js

@ -81,7 +81,6 @@
"dependencies": { "dependencies": {
"@remixproject/engine": "^0.2.3", "@remixproject/engine": "^0.2.3",
"http-server": "^0.11.1", "http-server": "^0.11.1",
"selenium": "^2.20.0",
"standard": "^8.5.0" "standard": "^8.5.0"
}, },
"repository": { "repository": {

@ -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
Loading…
Cancel
Save