Fixed linting error

pull/5370/head
ioedeveloper 5 years ago committed by yann300
parent 42460cc738
commit 35ab40bb54
  1. 2
      src/app/editor/editor.js
  2. 8
      src/app/tabs/debugger/debuggerUI/ButtonNavigator.js
  3. 37
      test-browser/tests/debugger.js

@ -91,7 +91,7 @@ class Editor extends Plugin {
}
// Editor Setup
const el = yo`<div id="input"></div>`
const el = yo`<div id="input" data-id="editorInput"></div>`
this.editor = ace.edit(el)
ace.acequire('ace/ext/language_tools')

@ -47,15 +47,15 @@ ButtonNavigator.prototype.render = function () {
var view = yo`<div class="${css.buttons}">
<div class="${css.stepButtons} btn-group p-1">
<button id='overback' class='btn btn-primary btn-sm ${css.navigator} ${css.stepButton} fas fa-reply' title='Step over back' onclick=${function () { self.event.trigger('stepOverBack') }} disabled=${this.overBackDisabled} ></button>
<button id='intoback' class='btn btn-primary btn-sm ${css.navigator} ${css.stepButton} fas fa-level-up-alt' title='Step back' onclick=${function () { self.event.trigger('stepIntoBack') }} disabled=${this.intoBackDisabled} ></button>
<button id='intoforward' class='btn btn-primary btn-sm ${css.navigator} ${css.stepButton} fas fa-level-down-alt' title='Step into' onclick=${function () { self.event.trigger('stepIntoForward') }} disabled=${this.intoForwardDisabled} ></button>
<button id='intoback' data-id="buttonNavigatorIntoBack" class='btn btn-primary btn-sm ${css.navigator} ${css.stepButton} fas fa-level-up-alt' title='Step back' onclick=${function () { self.event.trigger('stepIntoBack') }} disabled=${this.intoBackDisabled} ></button>
<button id='intoforward' data-id="buttonNavigatorIntoForward" class='btn btn-primary btn-sm ${css.navigator} ${css.stepButton} fas fa-level-down-alt' title='Step into' onclick=${function () { self.event.trigger('stepIntoForward') }} disabled=${this.intoForwardDisabled} ></button>
<button id='overforward' class='btn btn-primary btn-sm ${css.navigator} ${css.stepButton} fas fa-share' title='Step over forward'onclick=${function () { self.event.trigger('stepOverForward') }} disabled=${this.overForwardDisabled} ></button>
</div>
<div class="${css.jumpButtons} btn-group p-1">
<button class='btn btn-primary btn-sm ${css.navigator} ${css.jumpButton} fas fa-step-backward' id='jumppreviousbreakpoint' title='Jump to the previous breakpoint' onclick=${function () { self.event.trigger('jumpPreviousBreakpoint') }} disabled=${this.jumpPreviousBreakpointDisabled} ></button>
<button class='btn btn-primary btn-sm ${css.navigator} ${css.jumpButton} fas fa-step-backward' id='jumppreviousbreakpoint' data-id="buttonNavigatorJumpPreviousBreakpoint" title='Jump to the previous breakpoint' onclick=${function () { self.event.trigger('jumpPreviousBreakpoint') }} disabled=${this.jumpPreviousBreakpointDisabled} ></button>
<button class='btn btn-primary btn-sm ${css.navigator} ${css.jumpButton} fas fa-eject' id='jumpout' title='Jump out' onclick=${function () { self.event.trigger('jumpOut') }} disabled=${this.jumpOutDisabled} ></button>
<button class='btn btn-primary btn-sm ${css.navigator} ${css.jumpButton} fas fa-step-forward' id='jumpnextbreakpoint' title='Jump to the next breakpoint' onclick=${function () { self.event.trigger('jumpNextBreakpoint') }} disabled=${this.jumpNextBreakpointDisabled} ></button>
<button class='btn btn-primary btn-sm ${css.navigator} ${css.jumpButton} fas fa-step-forward' id='jumpnextbreakpoint' data-id="buttonNavigatorJumpNextBreakpoint" title='Jump to the next breakpoint' onclick=${function () { self.event.trigger('jumpNextBreakpoint') }} disabled=${this.jumpNextBreakpointDisabled} ></button>
</div>
<div id='reverted' style="display:none">
<button class='btn btn-danger btn-sm' id='jumptoexception' title='Jump to exception' class='${css.navigator} ${css.button} fas fa-exclamation-triangle' onclick=${function () { self.event.trigger('jumpToException') }} disabled=${this.jumpOutDisabled} >

@ -32,17 +32,46 @@ module.exports = {
.debugTransaction(1)
.pause(2000)
.scrollAndClick('*[data-id="solidityLocals"]')
.assert.containsText('*[data-id="solidityLocals"]', "toast")
.assert.containsText('*[data-id="solidityLocals"]', "999")
.assert.containsText('*[data-id="solidityLocals"]', 'toast')
.assert.containsText('*[data-id="solidityLocals"]', '999')
},
'Should debug transaction using slider': function (browser) {
browser.waitForElementVisible('*[data-id="verticalIconsKindudapp"]')
.waitForElementVisible('*[data-id="slider"]')
.click('*[data-id="slider"]')
.setValue('*[data-id="slider"]', 50)
.pause(2000)
.assert.containsText('*[data-id="solidityLocals"]', "no locals")
.assert.containsText('*[data-id="solidityLocals"]', 'no locals')
.assert.containsText('*[data-id="stepdetail"]', 'vm trace step: 92')
},
'Should step back and forward transaction': function (browser) {
browser.waitForElementVisible('*[data-id="verticalIconsKindudapp"]')
.waitForElementPresent('*[data-id="buttonNavigatorIntoBack"]')
.scrollAndClick('*[data-id="buttonNavigatorIntoBack"]')
.pause(2000)
.assert.containsText('*[data-id="stepdetail"]', 'vm trace step: 91')
.assert.containsText('*[data-id="stepdetail"]', 'execution step: 91')
.click('*[data-id="buttonNavigatorIntoForward"]')
.pause(2000)
.assert.containsText('*[data-id="stepdetail"]', 'vm trace step: 92')
.assert.containsText('*[data-id="stepdetail"]', 'execution step: 92')
},
'Should jump through breakpoints': function (browser) {
browser.waitForElementVisible('*[data-id="editorInput"]')
.click('.ace_gutter-cell:nth-of-type(10)')
.click('.ace_gutter-cell:nth-of-type(20)')
.waitForElementVisible('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]')
.click('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]')
.pause(2000)
.assert.containsText('*[data-id="stepdetail"]', 'vm trace step: 0')
.assert.containsText('*[data-id="stepdetail"]', 'execution step: 0')
.click('*[data-id="buttonNavigatorJumpNextBreakpoint"]')
.pause(2000)
.assert.containsText('*[data-id="stepdetail"]', 'vm trace step: 140')
.assert.containsText('*[data-id="stepdetail"]', 'execution step: 140')
.end()
},
@ -52,7 +81,7 @@ module.exports = {
var sources = [
{
'browser/blah.sol': {
content: `
content: `
pragma solidity >=0.4.22 <0.6.0;
contract Kickstarter {

Loading…
Cancel
Save