test improved

uiCheck
LianaHus 5 years ago
parent 689b91d3cd
commit eb585cc096
  1. 12
      test-browser/commands/noWorkerErrorFor.js
  2. 10
      test-browser/tests/usingWebWorker.test.js

@ -1,9 +1,9 @@
const EventEmitter = require('events')
class NoWorkerErrorFor extends EventEmitter {
command (version, content) {
command (version) {
this.api.perform((done) => {
noWorkerErrorFor(this.api, version, content, () => {
noWorkerErrorFor(this.api, version, () => {
done()
this.emit('complete')
})
@ -12,16 +12,16 @@ class NoWorkerErrorFor extends EventEmitter {
}
}
function noWorkerErrorFor (browser, version, done) {
function noWorkerErrorFor (browser, version, callback) {
browser
.clickLaunchIcon('solidity')
.setSolidityCompilerVersion(version)
.pause(2000)
.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()
.perform(() => {
callback()
})
}

@ -17,12 +17,20 @@ module.exports = {
'Using Web Worker': function (browser) {
browser
.waitForElementVisible('*[data-id="remixIdeIconPanel"]', 10000)
.addFile('basic.sol', sources[0]['browser/basic.sol'])
.clickLaunchIcon('fileExplorers')
.openFile('browser/basic.sol')
.clickLaunchIcon('solidity')
.execute(() => {
document.getElementById('nightlies').checked = true
})
.noWorkerErrorFor('soljson-v0.3.4+commit.7dab890.js')
.noWorkerErrorFor('soljson-v0.6.5+commit.f956cc89.js')
.noWorkerErrorFor('soljson-v0.6.8-nightly.2020.5.14+commit.a6d0067b.js')
.noWorkerErrorFor('soljson-v0.6.0-nightly.2019.12.17+commit.d13438ee.js')
.noWorkerErrorFor('soljson-v0.4.26+commit.4563c3fc.js')
.execute(() => {
document.getElementById('nightlies').checked = false
})
},
tearDown: sauce

Loading…
Cancel
Save