fix e2e tests

pull/5370/head
yann300 4 years ago
parent 98f4cfaa25
commit 3d3008373f
  1. 2
      src/app/compiler/compiler-sourceVerifier-fetchAndCompile.js
  2. 2
      src/app/tabs/debugger-tab.js
  3. 4
      test-browser/tests/debugger.test.js
  4. 2
      test-browser/tests/runAndDeploy.js
  5. 2
      test-browser/tests/staticAnalysis.test.js

@ -72,7 +72,7 @@ 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', 'fetchByNetwork', contractAddress, name.toLowerCase()) data = await this.call('sourcify', 'fetchByNetwork', contractAddress, name.toLowerCase())
} catch (e) { } catch (e) {
setTimeout(_ => this.emit('notFound', contractAddress), 0) // plugin framework returns a time out error although it actually didn't find the source... 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)

@ -64,7 +64,7 @@ class DebuggerTab extends ViewPlugin {
} }
) )
this.call('manager', 'activatePlugin', 'source-verification') this.call('manager', 'activatePlugin', 'sourcify')
// this.call('manager', 'activatePlugin', 'udapp') // this.call('manager', 'activatePlugin', 'udapp')
return this.el return this.el

@ -70,8 +70,8 @@ module.exports = {
.assert.containsText('*[data-id="stepdetail"]', 'execution step: 0') .assert.containsText('*[data-id="stepdetail"]', 'execution step: 0')
.click('*[data-id="buttonNavigatorJumpNextBreakpoint"]') .click('*[data-id="buttonNavigatorJumpNextBreakpoint"]')
.pause(2000) .pause(2000)
.assert.containsText('*[data-id="stepdetail"]', 'vm trace step: 140') .assert.containsText('*[data-id="stepdetail"]', 'vm trace step: 184')
.assert.containsText('*[data-id="stepdetail"]', 'execution step: 140') .assert.containsText('*[data-id="stepdetail"]', 'execution step: 184')
.end() .end()
}, },

@ -156,7 +156,7 @@ module.exports = {
* - Source Verifier service for fetching the contract code * - Source Verifier service for fetching the contract code
* - Ropsten node for retrieving the trace and storage * - Ropsten node for retrieving the trace and storage
* *
*/ */
'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)

@ -41,7 +41,7 @@ function runTests (browser) {
.waitForElementPresent('#staticanalysisresult .warning', 2000, true, function () { .waitForElementPresent('#staticanalysisresult .warning', 2000, true, function () {
listSelectorContains(['Use of tx.origin', listSelectorContains(['Use of tx.origin',
'Fallback function of contract TooMuchGas requires too much gas', 'Fallback function of contract TooMuchGas requires too much gas',
'TooMuchGas.() : Variables have very similar names test and test1.'], 'TooMuchGas.() : Variables have very similar names "test" and "test1".'],
'#staticanalysisresult .warning', '#staticanalysisresult .warning',
browser, function () { browser, function () {
browser.end() browser.end()

Loading…
Cancel
Save