fixing test

pull/262/head
LianaHus 5 years ago
parent 6dd2b3e716
commit 2b72c6c958
  1. 5
      package-lock.json
  2. 13
      src/app/compiler/compiler-utils.js
  3. 7
      test-browser/tests/runAndDeploy.js

5
package-lock.json generated

@ -16145,11 +16145,6 @@
}
}
},
"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",

@ -7,8 +7,15 @@ export const baseURLWasm = 'https://solc-bin.ethereum.org/wasm'
export const pathToURL = {}
// retrieves the URL of the given compiler version
export function urlFromVersion (version) {
/**
* Retrieves the URL of the given compiler version
* @param version is the version of compiler with or without 'soljson-v' prefix and .js postfix
*/
export function urlFromVersion (version) { // 0x959371506b8f6223d71c709ac2eb2d0158104dca2d76ca949f1662712cf0e6db
console.log("1. orig_________= " + version + " path =", pathToURL, " version =", version, " and url is = ", pathToURL[version])
if (version.substr(0, 9) !== 'soljson-v') version = 'soljson-v' + version
if (version.substr(version.length - 3, version.length) !== '.js') version = version + '.js;'
console.log("2. orig_________= " + version + " path =", pathToURL, " version =", version, " and url is = ", pathToURL[version])
return `${pathToURL[version]}/${version}`
}
@ -29,7 +36,7 @@ function browserSupportWorker () {
return document.location.protocol !== 'file:' && Worker !== undefined
}
// returns a promice for minixhr
// returns a promise for minixhr
export function promisedMiniXhr (url) {
return new Promise((resolve, reject) => {
minixhr(url, (json, event) => {

@ -31,8 +31,7 @@ module.exports = {
.assert.elementNotPresent('*[data-id="settingsRemixRunSignMsgHash"]')
.assert.elementNotPresent('*[data-id="settingsRemixRunSignMsgSignature"]')
.modalFooterOKClick()
.pause(2000)
.waitForElementPresent('*[data-id="modalDialogContainer"]')
.waitForElementPresent('*[data-id="modalDialogContainer"]', 12000)
.assert.elementPresent('*[data-id="settingsRemixRunSignMsgHash"]')
.assert.elementPresent('*[data-id="settingsRemixRunSignMsgSignature"]')
.modalFooterOKClick()
@ -145,8 +144,8 @@ module.exports = {
.clickLaunchIcon('udapp')
.waitForElementPresent('*[data-id="Deploy - transact (not payable)"]')
.click('*[data-id="Deploy - transact (not payable)"]')
.pause(2000)
.waitForElementPresent('*[data-id="modalDialogContainer"]')
.waitForElementPresent('*[data-id="modalDialogContainer"]', 15000)
.pause(10000)
.assert.containsText('*[data-id="modalDialogModalBody"]', 'You are creating a transaction on the main network. Click confirm if you are sure to continue.')
.modalFooterCancelClick()
},

Loading…
Cancel
Save