|
|
@ -3,7 +3,7 @@ import { NightwatchBrowser } from 'nightwatch' |
|
|
|
import init from '../helpers/init' |
|
|
|
import init from '../helpers/init' |
|
|
|
|
|
|
|
|
|
|
|
module.exports = { |
|
|
|
module.exports = { |
|
|
|
|
|
|
|
'@disabled': true, |
|
|
|
before: function (browser: NightwatchBrowser, done: VoidFunction) { |
|
|
|
before: function (browser: NightwatchBrowser, done: VoidFunction) { |
|
|
|
init(browser, done) |
|
|
|
init(browser, done) |
|
|
|
}, |
|
|
|
}, |
|
|
@ -12,7 +12,7 @@ module.exports = { |
|
|
|
return sources |
|
|
|
return sources |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
'Should launch debugger': function (browser: NightwatchBrowser) { |
|
|
|
'Should launch debugger #group1': function (browser: NightwatchBrowser) { |
|
|
|
browser.addFile('blah.sol', sources[0]['blah.sol']) |
|
|
|
browser.addFile('blah.sol', sources[0]['blah.sol']) |
|
|
|
.clickLaunchIcon('udapp') |
|
|
|
.clickLaunchIcon('udapp') |
|
|
|
.waitForElementPresent('*[title="Deploy - transact (not payable)"]', 65000) |
|
|
|
.waitForElementPresent('*[title="Deploy - transact (not payable)"]', 65000) |
|
|
@ -21,7 +21,7 @@ module.exports = { |
|
|
|
.waitForElementContainsText('*[data-id="sidePanelSwapitTitle"]', 'DEBUGGER', 60000) |
|
|
|
.waitForElementContainsText('*[data-id="sidePanelSwapitTitle"]', 'DEBUGGER', 60000) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
'Should debug failing transaction': function (browser: NightwatchBrowser) { |
|
|
|
'Should debug failing transaction #group1': function (browser: NightwatchBrowser) { |
|
|
|
browser.waitForElementVisible('*[data-id="verticalIconsKindudapp"]') |
|
|
|
browser.waitForElementVisible('*[data-id="verticalIconsKindudapp"]') |
|
|
|
.clickLaunchIcon('udapp') |
|
|
|
.clickLaunchIcon('udapp') |
|
|
|
.waitForElementPresent('*[data-id="universalDappUiTitleExpander"]') |
|
|
|
.waitForElementPresent('*[data-id="universalDappUiTitleExpander"]') |
|
|
@ -36,7 +36,7 @@ module.exports = { |
|
|
|
.waitForElementContainsText('*[data-id="solidityLocals"]', '999', 60000) |
|
|
|
.waitForElementContainsText('*[data-id="solidityLocals"]', '999', 60000) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
'Should debug transaction using slider': function (browser: NightwatchBrowser) { |
|
|
|
'Should debug transaction using slider #group1': function (browser: NightwatchBrowser) { |
|
|
|
browser.waitForElementVisible('*[data-id="verticalIconsKindudapp"]') |
|
|
|
browser.waitForElementVisible('*[data-id="verticalIconsKindudapp"]') |
|
|
|
.waitForElementVisible('*[data-id="slider"]') |
|
|
|
.waitForElementVisible('*[data-id="slider"]') |
|
|
|
// eslint-disable-next-line dot-notation
|
|
|
|
// eslint-disable-next-line dot-notation
|
|
|
@ -48,7 +48,7 @@ module.exports = { |
|
|
|
.waitForElementContainsText('*[data-id="stepdetail"]', 'vm trace step:\n51', 60000) |
|
|
|
.waitForElementContainsText('*[data-id="stepdetail"]', 'vm trace step:\n51', 60000) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
'Should step back and forward transaction': function (browser: NightwatchBrowser) { |
|
|
|
'Should step back and forward transaction #group1': function (browser: NightwatchBrowser) { |
|
|
|
browser.waitForElementVisible('*[data-id="verticalIconsKindudapp"]') |
|
|
|
browser.waitForElementVisible('*[data-id="verticalIconsKindudapp"]') |
|
|
|
.waitForElementPresent('*[data-id="buttonNavigatorIntoBack"]') |
|
|
|
.waitForElementPresent('*[data-id="buttonNavigatorIntoBack"]') |
|
|
|
.scrollAndClick('*[data-id="buttonNavigatorIntoBack"]') |
|
|
|
.scrollAndClick('*[data-id="buttonNavigatorIntoBack"]') |
|
|
@ -61,7 +61,7 @@ module.exports = { |
|
|
|
.waitForElementContainsText('*[data-id="stepdetail"]', 'execution step:\n51', 60000) |
|
|
|
.waitForElementContainsText('*[data-id="stepdetail"]', 'execution step:\n51', 60000) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
'Should jump through breakpoints': function (browser: NightwatchBrowser) { |
|
|
|
'Should jump through breakpoints #group1': function (browser: NightwatchBrowser) { |
|
|
|
browser.waitForElementVisible('#editorView') |
|
|
|
browser.waitForElementVisible('#editorView') |
|
|
|
.execute(() => { |
|
|
|
.execute(() => { |
|
|
|
(window as any).addRemixBreakpoint(11) |
|
|
|
(window as any).addRemixBreakpoint(11) |
|
|
@ -80,7 +80,7 @@ module.exports = { |
|
|
|
.waitForElementContainsText('*[data-id="stepdetail"]', 'execution step:\n352', 60000) |
|
|
|
.waitForElementContainsText('*[data-id="stepdetail"]', 'execution step:\n352', 60000) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
'Should display solidity imported code while debugging github import': function (browser: NightwatchBrowser) { |
|
|
|
'Should display solidity imported code while debugging github import #group1': function (browser: NightwatchBrowser) { |
|
|
|
browser |
|
|
|
browser |
|
|
|
.clickLaunchIcon('solidity') |
|
|
|
.clickLaunchIcon('solidity') |
|
|
|
.testContracts('externalImport.sol', sources[1]['externalImport.sol'], ['ERC20']) |
|
|
|
.testContracts('externalImport.sol', sources[1]['externalImport.sol'], ['ERC20']) |
|
|
@ -101,7 +101,7 @@ module.exports = { |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
'Should display correct source highlighting while debugging a contract which has ABIEncoderV2': function (browser: NightwatchBrowser) { |
|
|
|
'Should display correct source highlighting while debugging a contract which has ABIEncoderV2 #group2': function (browser: NightwatchBrowser) { |
|
|
|
/* |
|
|
|
/* |
|
|
|
localVariable_step266_ABIEncoder and localVariable_step717_ABIEncoder |
|
|
|
localVariable_step266_ABIEncoder and localVariable_step717_ABIEncoder |
|
|
|
still contains unwanted values (related to decoding calldata types) |
|
|
|
still contains unwanted values (related to decoding calldata types) |
|
|
@ -142,7 +142,7 @@ module.exports = { |
|
|
|
.clickInstance(2) |
|
|
|
.clickInstance(2) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
'Should load more solidity locals array': function (browser: NightwatchBrowser) { |
|
|
|
'Should load more solidity locals array #group2': function (browser: NightwatchBrowser) { |
|
|
|
browser |
|
|
|
browser |
|
|
|
.clickLaunchIcon('solidity') |
|
|
|
.clickLaunchIcon('solidity') |
|
|
|
.testContracts('locals.sol', sources[3]['locals.sol'], ['testLocals']) |
|
|
|
.testContracts('locals.sol', sources[3]['locals.sol'], ['testLocals']) |
|
|
@ -166,7 +166,7 @@ module.exports = { |
|
|
|
.notContainsText('*[data-id="solidityLocals"]', '10: 10 uint256') |
|
|
|
.notContainsText('*[data-id="solidityLocals"]', '10: 10 uint256') |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
'Should debug using generated sources': function (browser: NightwatchBrowser) { |
|
|
|
'Should debug using generated sources #group2': function (browser: NightwatchBrowser) { |
|
|
|
browser |
|
|
|
browser |
|
|
|
.clickLaunchIcon('solidity') |
|
|
|
.clickLaunchIcon('solidity') |
|
|
|
.pause(2000) |
|
|
|
.pause(2000) |
|
|
@ -187,7 +187,7 @@ module.exports = { |
|
|
|
.click('*[data-id="debuggerTransactionStartButton"]') |
|
|
|
.click('*[data-id="debuggerTransactionStartButton"]') |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
'Should call the debugger api: getTrace': function (browser: NightwatchBrowser) { |
|
|
|
'Should call the debugger api: getTrace #group2': function (browser: NightwatchBrowser) { |
|
|
|
browser |
|
|
|
browser |
|
|
|
.addFile('test_jsGetTrace.js', { content: jsGetTrace }) |
|
|
|
.addFile('test_jsGetTrace.js', { content: jsGetTrace }) |
|
|
|
.executeScript('remix.exeCurrent()') |
|
|
|
.executeScript('remix.exeCurrent()') |
|
|
@ -195,7 +195,7 @@ module.exports = { |
|
|
|
.waitForElementContainsText('*[data-id="terminalJournal"]', '{"gas":"0x575f","return":"0x0000000000000000000000000000000000000000000000000000000000000000","structLogs":', 60000) |
|
|
|
.waitForElementContainsText('*[data-id="terminalJournal"]', '{"gas":"0x575f","return":"0x0000000000000000000000000000000000000000000000000000000000000000","structLogs":', 60000) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
'Should call the debugger api: debug': function (browser: NightwatchBrowser) { |
|
|
|
'Should call the debugger api: debug #group2': function (browser: NightwatchBrowser) { |
|
|
|
browser |
|
|
|
browser |
|
|
|
.addFile('test_jsDebug.js', { content: jsDebug }) |
|
|
|
.addFile('test_jsDebug.js', { content: jsDebug }) |
|
|
|
.executeScript('remix.exeCurrent()') |
|
|
|
.executeScript('remix.exeCurrent()') |
|
|
|