fix and activate e2e test - source verification

pull/5370/head
yann300 5 years ago
parent 03f51b5cad
commit 98548b9d03
  1. 4
      src/app/compiler/compiler-sourceVerifier-fetchAndCompile.js
  2. 8
      test-browser/tests/runAndDeploy.js

@ -73,9 +73,9 @@ export default class FetchAndCompile extends Plugin {
name === 'main' ? 'mainnet' : name // source-verifier api expect "mainnet" and not "main" name === 'main' ? 'mainnet' : name // source-verifier api expect "mainnet" and not "main"
let data let data
try { try {
data = await this.call('source-verification', 'fetch', contractAddress, name.toLowerCase()) data = await this.call('source-verification', 'fetchByNetwork', contractAddress, name.toLowerCase())
} catch (e) { } catch (e) {
setTimeout(_ => this.emit('sourceVerificationNotAvailable'), 0) setTimeout(_ => this.emit('notFound', contractAddress), 0) // plugin framework returns a time out error although it actually didn't find the source...
this.unresolvedAddresses.push(contractAddress) this.unresolvedAddresses.push(contractAddress)
return localCompilation() return localCompilation()
} }

@ -149,7 +149,6 @@ module.exports = {
.waitForElementPresent('*[data-id="modalDialogContainer"]') .waitForElementPresent('*[data-id="modalDialogContainer"]')
.assert.containsText('*[data-id="modalDialogModalBody"]', 'You are creating a transaction on the main network. Click confirm if you are sure to continue.') .assert.containsText('*[data-id="modalDialogModalBody"]', 'You are creating a transaction on the main network. Click confirm if you are sure to continue.')
.modalFooterCancelClick() .modalFooterCancelClick()
.end()
}, },
/* /*
@ -159,7 +158,6 @@ module.exports = {
* - Ropsten node for retrieving the trace and storage * - Ropsten node for retrieving the trace and storage
* *
*/ */
/* to readd when the source verify is stable
'Should debug Ropsten transaction with source highlighting using the source verifier service and MetaMask': function (browser) { 'Should debug Ropsten transaction with source highlighting using the source verifier service and MetaMask': function (browser) {
browser.waitForElementPresent('*[data-id="remixIdeSidePanel"]') browser.waitForElementPresent('*[data-id="remixIdeSidePanel"]')
.waitForElementVisible('*[data-id="remixIdeIconPanel"]', 10000) .waitForElementVisible('*[data-id="remixIdeIconPanel"]', 10000)
@ -178,15 +176,13 @@ module.exports = {
.waitForElementPresent('*[data-id="settingsNetworkEnv"]') .waitForElementPresent('*[data-id="settingsNetworkEnv"]')
.assert.containsText('*[data-id="settingsNetworkEnv"]', 'Ropsten (3) network') .assert.containsText('*[data-id="settingsNetworkEnv"]', 'Ropsten (3) network')
.clickLaunchIcon('debugger') .clickLaunchIcon('debugger')
.setValue('*[data-id="debuggerTransactionInput"]', '0x5db1b4212e4f83e36bf5bc306888df50f01a73708a71322bdc6f39a76a7ebdaa') // debug tx .setValue('*[data-id="debuggerTransactionInput"]', '0x959371506b8f6223d71c709ac2eb2d0158104dca2d76ca949f1662712cf0e6db') // debug tx
.click('*[data-id="debuggerTransactionStartButton"]') .click('*[data-id="debuggerTransactionStartButton"]')
.waitForElementVisible('*[data-id="treeViewDivto"]', 30000) .waitForElementVisible('*[data-id="treeViewDivto"]', 30000)
.assert.containsText('*[data-id="stepdetail"]', 'loaded address: 0x96d87AB604AEC7FB26C2E046CA5e6eBBB9D8b74D') .assert.containsText('*[data-id="stepdetail"]', 'loaded address: 0x3c943Fb816694d7D1f4C738e3e7823818a88DD6C')
.assert.containsText('*[data-id="solidityLocals"]', 'to: 0x6C3CCC7FBA111707D5A1AAF2758E9D4F4AC5E7B1') .assert.containsText('*[data-id="solidityLocals"]', 'to: 0x6C3CCC7FBA111707D5A1AAF2758E9D4F4AC5E7B1')
.end() .end()
}, },
*/
tearDown: sauce tearDown: sauce
} }

Loading…
Cancel
Save