adding usingWebWorker test

pull/262/head
LianaHus 5 years ago
parent 687b2b8297
commit 874cc2c6ee
  1. 5
      package-lock.json
  2. 2
      package.json
  3. 13
      src/app/editor/example-contracts.js
  4. 2
      src/app/tabs/compile-tab.js
  5. 29
      test-browser/tests/usingWebWorker.test.js

5
package-lock.json generated

@ -16145,6 +16145,11 @@
}
}
},
"selenium": {
"version": "2.20.0",
"resolved": "https://registry.npmjs.org/selenium/-/selenium-2.20.0.tgz",
"integrity": "sha1-9RWxoWLek8LM7y/AyjPztVQ+OMg="
},
"selenium-standalone": {
"version": "6.17.0",
"resolved": "https://registry.npmjs.org/selenium-standalone/-/selenium-standalone-6.17.0.tgz",

@ -81,6 +81,7 @@
"dependencies": {
"@remixproject/engine": "^0.2.3",
"http-server": "^0.11.1",
"selenium": "^2.20.0",
"standard": "^8.5.0"
},
"repository": {
@ -165,6 +166,7 @@
"nightwatch_local_firefox": "nightwatch --config nightwatch.js --env firefox",
"nightwatch_local_chrome": "nightwatch --config nightwatch.js --env chrome",
"nightwatch_local_ballot": "nightwatch ./test-browser/tests/ballot.test.js --config nightwatch.js --env chrome ",
"nightwatch_local_usingWorker": "nightwatch ./test-browser/tests/usingWebWorker.test.js --config nightwatch.js --env chrome ",
"nightwatch_local_libraryDeployment": "nightwatch ./test-browser/tests/libraryDeployment.test.js --config nightwatch.js --env chrome ",
"nightwatch_local_solidityImport": "nightwatch ./test-browser/tests/solidityImport.test.js --config nightwatch.js --env chrome ",
"nightwatch_local_recorder": "nightwatch ./test-browser/tests/recorder.test.js --config nightwatch.js --env chrome ",

@ -1,5 +1,15 @@
'use strict'
const basic = `pragma solidity >=0.2.0 <0.7.0;
/**
* @title Basic contract
*/
contract Basic {
uint someVar;
constructor() public {}
}`
const storage = `pragma solidity >=0.4.22 <0.7.0;
/**
@ -245,5 +255,6 @@ module.exports = {
storage: { name: '1_Storage.sol', content: storage },
owner: { name: '2_Owner.sol', content: owner },
ballot: { name: '3_Ballot.sol', content: ballot },
ballot_test: { name: '4_Ballot_test.sol', content: ballotTest }
ballot_test: { name: '4_Ballot_test.sol', content: ballotTest },
basic: { name: 'basic.sol', content: basic }
}

@ -411,7 +411,7 @@ class CompileTab extends ViewPlugin {
render () {
if (this._view.el) return this._view.el
this.onActivationInternal()
this._view.errorContainer = yo`<div class="${css.errorBlobs} p-4"></div>`
this._view.errorContainer = yo`<div class="${css.errorBlobs} p-4" data-id="compiledErrors" ></div>`
this._view.contractSelection = this.contractSelection()
this._view.compilerContainer = this.compilerContainer.render()
this.compilerContainer.activate()

@ -0,0 +1,29 @@
'use strict'
var examples = require('../../src/app/editor/example-contracts')
var init = require('../helpers/init')
var sauce = require('./sauce')
var sources = [
{'browser/basic.sol': {content: examples.basic.content}}
]
module.exports = {
before: function (browser, done) {
init(browser, done)
},
'@sources': function () {
return sources
},
'Using Web Worker': function (browser) {
browser
.waitForElementVisible('*[data-id="remixIdeIconPanel"]', 10000)
.addFile('basic.sol', sources[0]['browser/basic.sol'])
.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')
},
tearDown: sauce
}
Loading…
Cancel
Save