From 02ea3967914b278d7fc6268dc4805af3bcf76dc3 Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 18 May 2020 10:52:07 +0200 Subject: [PATCH] fix and activate e2e test - source verification --- .../compiler/compiler-sourceVerifier-fetchAndCompile.js | 4 ++-- test-browser/tests/runAndDeploy.js | 8 ++------ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/app/compiler/compiler-sourceVerifier-fetchAndCompile.js b/src/app/compiler/compiler-sourceVerifier-fetchAndCompile.js index 6c2e4046f03..04956b5ac78 100644 --- a/src/app/compiler/compiler-sourceVerifier-fetchAndCompile.js +++ b/src/app/compiler/compiler-sourceVerifier-fetchAndCompile.js @@ -73,9 +73,9 @@ export default class FetchAndCompile extends Plugin { name === 'main' ? 'mainnet' : name // source-verifier api expect "mainnet" and not "main" let data try { - data = await this.call('source-verification', 'fetch', contractAddress, name.toLowerCase()) + data = await this.call('source-verification', 'fetchByNetwork', contractAddress, name.toLowerCase()) } 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) return localCompilation() } diff --git a/test-browser/tests/runAndDeploy.js b/test-browser/tests/runAndDeploy.js index b1b8240609d..da831eb71ea 100644 --- a/test-browser/tests/runAndDeploy.js +++ b/test-browser/tests/runAndDeploy.js @@ -149,7 +149,6 @@ module.exports = { .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.') .modalFooterCancelClick() - .end() }, /* @@ -159,7 +158,6 @@ module.exports = { * - 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) { browser.waitForElementPresent('*[data-id="remixIdeSidePanel"]') .waitForElementVisible('*[data-id="remixIdeIconPanel"]', 10000) @@ -178,15 +176,13 @@ module.exports = { .waitForElementPresent('*[data-id="settingsNetworkEnv"]') .assert.containsText('*[data-id="settingsNetworkEnv"]', 'Ropsten (3) network') .clickLaunchIcon('debugger') - .setValue('*[data-id="debuggerTransactionInput"]', '0x5db1b4212e4f83e36bf5bc306888df50f01a73708a71322bdc6f39a76a7ebdaa') // debug tx + .setValue('*[data-id="debuggerTransactionInput"]', '0x959371506b8f6223d71c709ac2eb2d0158104dca2d76ca949f1662712cf0e6db') // debug tx .click('*[data-id="debuggerTransactionStartButton"]') .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') .end() }, - */ - tearDown: sauce }