Merge branch 'master' into bultinf

pull/1240/head
Liana Husikyan 4 years ago committed by GitHub
commit e144e82ee7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 53
      apps/remix-ide-e2e/src/tests/debugger.spec.ts
  2. 2
      apps/remix-ide/src/remixAppManager.js
  3. 8
      libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx

@ -207,6 +207,25 @@ module.exports = {
As we are only testing if debugger is active, this is ok to keep that for now.
*/
.waitForElementContainsText('*[data-id="stepdetail"]', 'vm trace step:\n154', 60000)
},
'Should start debugging using remix debug nodes (rinkeby)': function (browser: NightwatchBrowser) {
browser.addFile('useDebugNodes.sol', sources[5]['useDebugNodes.sol']) // compile contract
.clickLaunchIcon('udapp')
.click('*[data-id="settingsWeb3Mode"]') // select web3 provider with debug nodes URL
.clearValue('*[data-id="modalDialogCustomPromptText"]')
.setValue('*[data-id="modalDialogCustomPromptText"]', 'https://remix-rinkeby.ethdevops.io')
.modalFooterOKClick()
.waitForElementPresent('*[title="Deploy - transact (not payable)"]', 65000) // wait for the compilation to succeed
.clickLaunchIcon('debugger')
.clearValue('*[data-id="debuggerTransactionInput"]')
.setValue('*[data-id="debuggerTransactionInput"]', '0x156dbf7d0f9b435dd900cfc8f3264d523dd25733418ddbea1ce53e294f421013')
.click('*[data-id="debugGeneratedSourcesLabel"]') // unselect debug with generated sources
.click('*[data-id="debuggerTransactionStartButton"]')
.waitForElementVisible('*[data-id="solidityLocals"]', 60000)
.pause(10000)
.checkVariableDebug('soliditylocals', { num: { value: '2', type: 'uint256' } })
.checkVariableDebug('soliditystate', { number: { value: '0', type: 'uint256', constant: false } })
.end()
}
}
@ -297,6 +316,40 @@ const sources = [
}
`
}
},
{
'useDebugNodes.sol': {
content: `
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
/**
* @title Storage
* @dev Store & retrieve value in a variable
*/
contract Storage {
uint256 number;
/**
* @dev Store value in variable
* @param num value to store
*/
function store(uint256 num) public {
number = num;
}
/**
* @dev Return value
* @return value of 'number'
*/
function retrieve() public view returns (uint256){
return number;
}
}
`
}
}
]

@ -9,7 +9,7 @@ const _paq = window._paq = window._paq || []
const requiredModules = [ // services + layout views + system views
'manager', 'compilerArtefacts', 'compilerMetadata', 'contextualListener', 'editor', 'offsetToLineColumnConverter', 'network', 'theme',
'fileManager', 'contentImport', 'web3Provider', 'scriptRunner', 'fetchAndCompile', 'mainPanel', 'hiddenPanel', 'sidePanel', 'menuicons',
'filePanel', 'terminal', 'settings', 'pluginManager', 'tabs', 'udapp']
'filePanel', 'terminal', 'settings', 'pluginManager', 'tabs', 'udapp', 'dGitProvider']
const dependentModules = ['git', 'hardhat'] // module which shouldn't be manually activated (e.g git is activated by remixd)

@ -53,13 +53,13 @@ export const Workspace = (props: WorkspaceProps) => {
return setWorkspace(workspaceName)
}
props.request.createNewFile = () => {
if (!state.workspaces.length) createNewWorkspace('default_workspace')
props.request.createNewFile = async () => {
if (!state.workspaces.length) await createNewWorkspace('default_workspace')
props.plugin.resetNewFile()
}
props.request.uploadFile = (target) => {
if (!state.workspaces.length) createNewWorkspace('default_workspace')
props.request.uploadFile = async (target) => {
if (!state.workspaces.length) await createNewWorkspace('default_workspace')
setState(prevState => {
return { ...prevState, uploadFileEvent: target }

Loading…
Cancel
Save