Merge branch 'master' into refactoring-static-analyser

pull/5370/head
David Zagi 4 years ago committed by GitHub
commit 4619b0acb4
  1. 2
      apps/remix-ide-e2e/src/commands/addFile.ts
  2. 2
      apps/remix-ide-e2e/src/commands/openFile.ts
  3. 2
      apps/remix-ide-e2e/src/helpers/init.ts
  4. 2
      apps/remix-ide-e2e/src/tests/ballot.test.ts
  5. 2
      apps/remix-ide-e2e/src/tests/ballot_0_4_11.spec.ts
  6. 2
      apps/remix-ide-e2e/src/tests/debugger.spec.ts
  7. 6
      apps/remix-ide-e2e/src/tests/defaultLayout.test.ts
  8. 2
      apps/remix-ide-e2e/src/tests/editor.spec.ts
  9. 2
      apps/remix-ide-e2e/src/tests/fileExplorer.test.ts
  10. 2
      apps/remix-ide-e2e/src/tests/generalSettings.test.ts
  11. 8
      apps/remix-ide-e2e/src/tests/gist.spec.ts
  12. 4
      apps/remix-ide-e2e/src/tests/publishContract.test.ts
  13. 10
      apps/remix-ide-e2e/src/tests/remixd.test.ts
  14. 6
      apps/remix-ide-e2e/src/tests/runAndDeploy.ts
  15. 20
      apps/remix-ide-e2e/src/tests/solidityImport.spec.ts
  16. 36
      apps/remix-ide-e2e/src/tests/solidityUnittests.spec.ts
  17. 2
      apps/remix-ide-e2e/src/tests/usingWebWorker.test.ts
  18. 2
      apps/remix-ide-e2e/src/tests/workspace.test.ts
  19. 2
      apps/remix-ide/src/app.js
  20. 2
      apps/remix-ide/src/app/components/vertical-icons.js
  21. 2
      apps/remix-ide/src/app/panels/file-panel.js
  22. 8
      apps/remix-ide/src/app/ui/landing-page/landing-page.js
  23. 4
      apps/remix-ide/src/framingService.js
  24. 2
      apps/remix-ide/src/remixAppManager.js

@ -15,7 +15,7 @@ class AddFile extends EventEmitter {
function addFile (browser: NightwatchBrowser, name: string, content: NightwatchContractContent, done: VoidFunction) { function addFile (browser: NightwatchBrowser, name: string, content: NightwatchContractContent, done: VoidFunction) {
browser.clickLaunchIcon('udapp') browser.clickLaunchIcon('udapp')
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('filePanel')
.click('li[data-id="treeViewLitreeViewItemREADME.txt"]') // focus on root directory .click('li[data-id="treeViewLitreeViewItemREADME.txt"]') // focus on root directory
.click('.newFile') .click('.newFile')
.waitForElementContainsText('*[data-id="treeViewLitreeViewItem/blank"]', '', 60000) .waitForElementContainsText('*[data-id="treeViewLitreeViewItem/blank"]', '', 60000)

@ -15,7 +15,7 @@ class OpenFile extends EventEmitter {
// click on fileExplorer can toggle it. We go through settings to be sure FE is open // click on fileExplorer can toggle it. We go through settings to be sure FE is open
function openFile (browser: NightwatchBrowser, name: string, done: VoidFunction) { function openFile (browser: NightwatchBrowser, name: string, done: VoidFunction) {
browser.clickLaunchIcon('settings').clickLaunchIcon('fileExplorers') browser.clickLaunchIcon('settings').clickLaunchIcon('filePanel')
.waitForElementVisible('li[data-id="treeViewLitreeViewItem' + name + '"', 60000) .waitForElementVisible('li[data-id="treeViewLitreeViewItem' + name + '"', 60000)
.click('li[data-id="treeViewLitreeViewItem' + name + '"') .click('li[data-id="treeViewLitreeViewItem' + name + '"')
.pause(2000) .pause(2000)

@ -27,7 +27,7 @@ function initModules (browser: NightwatchBrowser, callback: VoidFunction) {
.click('[data-id="verticalIconsKindpluginManager"]') .click('[data-id="verticalIconsKindpluginManager"]')
.scrollAndClick('[data-id="pluginManagerComponentActivateButtonsolidityStaticAnalysis"]') .scrollAndClick('[data-id="pluginManagerComponentActivateButtonsolidityStaticAnalysis"]')
.scrollAndClick('[data-id="pluginManagerComponentActivateButtondebugger"]') .scrollAndClick('[data-id="pluginManagerComponentActivateButtondebugger"]')
.scrollAndClick('[data-id="verticalIconsKindfileExplorers"]') .scrollAndClick('[data-id="verticalIconsKindfilePanel"]')
.clickLaunchIcon('settings') .clickLaunchIcon('settings')
.click('*[data-id="settingsTabGenerateContractMetadataLabel"]') .click('*[data-id="settingsTabGenerateContractMetadataLabel"]')
.setValue('[data-id="settingsTabGistAccessToken"]', process.env.gist_token) .setValue('[data-id="settingsTabGistAccessToken"]', process.env.gist_token)

@ -51,7 +51,7 @@ module.exports = {
.click('*[data-id="universalDappUiUdappClose"]') .click('*[data-id="universalDappUiUdappClose"]')
.addFile('ballot.abi', { content: ballotABI }) .addFile('ballot.abi', { content: ballotABI })
.addAtAddressInstance('0x692a70D2e424a56D2C6C27aA97D1a86395877b3B', true, false) .addAtAddressInstance('0x692a70D2e424a56D2C6C27aA97D1a86395877b3B', true, false)
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('filePanel')
.addAtAddressInstance('0x692a70D2e424a56D2C6C27aA97D1a86395877b3A', true, true) .addAtAddressInstance('0x692a70D2e424a56D2C6C27aA97D1a86395877b3A', true, true)
.pause(500) .pause(500)
.waitForElementPresent('*[data-id="universalDappUiContractActionWrapper"]', 60000) .waitForElementPresent('*[data-id="universalDappUiContractActionWrapper"]', 60000)

@ -61,7 +61,7 @@ module.exports = {
.click('*[data-id="universalDappUiUdappClose"]') .click('*[data-id="universalDappUiUdappClose"]')
.addFile('ballot.abi', { content: ballotABI }) .addFile('ballot.abi', { content: ballotABI })
.addAtAddressInstance('0x692a70D2e424a56D2C6C27aA97D1a86395877b3B', true, false) .addAtAddressInstance('0x692a70D2e424a56D2C6C27aA97D1a86395877b3B', true, false)
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('filePanel')
.addAtAddressInstance('0x692a70D2e424a56D2C6C27aA97D1a86395877b3A', true, true) .addAtAddressInstance('0x692a70D2e424a56D2C6C27aA97D1a86395877b3A', true, true)
.pause(500) .pause(500)
.waitForElementPresent('*[data-id="universalDappUiContractActionWrapper"]', 60000) .waitForElementPresent('*[data-id="universalDappUiContractActionWrapper"]', 60000)

@ -106,7 +106,7 @@ module.exports = {
browser browser
.clickLaunchIcon('solidity') .clickLaunchIcon('solidity')
.setSolidityCompilerVersion('soljson-v0.6.12+commit.27d51765.js') .setSolidityCompilerVersion('soljson-v0.6.12+commit.27d51765.js')
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('filePanel')
.click('li[data-id="treeViewLitreeViewItemexternalImport.sol"') .click('li[data-id="treeViewLitreeViewItemexternalImport.sol"')
.testContracts('withABIEncoderV2.sol', sources[2]['withABIEncoderV2.sol'], ['test']) .testContracts('withABIEncoderV2.sol', sources[2]['withABIEncoderV2.sol'], ['test'])
.clickLaunchIcon('udapp') .clickLaunchIcon('udapp')

@ -10,7 +10,7 @@ module.exports = {
'Loads Icon\'s Panel': function (browser: NightwatchBrowser) { 'Loads Icon\'s Panel': function (browser: NightwatchBrowser) {
browser.waitForElementVisible('div[data-id="remixIdeIconPanel"]', 10000) browser.waitForElementVisible('div[data-id="remixIdeIconPanel"]', 10000)
.waitForElementVisible('div[data-id="verticalIconsHomeIcon"]') .waitForElementVisible('div[data-id="verticalIconsHomeIcon"]')
.waitForElementVisible('div[plugin="fileExplorers"]') .waitForElementVisible('div[plugin="filePanel"]')
.waitForElementVisible('div[plugin="pluginManager"]') .waitForElementVisible('div[plugin="pluginManager"]')
.waitForElementVisible('div[plugin="settings"]') .waitForElementVisible('div[plugin="settings"]')
}, },
@ -41,9 +41,9 @@ module.exports = {
'Toggles Side Panel': function (browser: NightwatchBrowser) { 'Toggles Side Panel': function (browser: NightwatchBrowser) {
browser.waitForElementVisible('div[data-id="remixIdeSidePanel"]') browser.waitForElementVisible('div[data-id="remixIdeSidePanel"]')
.assert.containsText('h6[data-id="sidePanelSwapitTitle"]', 'FILE EXPLORERS') .assert.containsText('h6[data-id="sidePanelSwapitTitle"]', 'FILE EXPLORERS')
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('filePanel')
.assert.hidden('div[data-id="remixIdeSidePanel"]') .assert.hidden('div[data-id="remixIdeSidePanel"]')
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('filePanel')
.assert.visible('div[data-id="remixIdeSidePanel"]') .assert.visible('div[data-id="remixIdeSidePanel"]')
.assert.containsText('h6[data-id="sidePanelSwapitTitle"]', 'FILE EXPLORERS') .assert.containsText('h6[data-id="sidePanelSwapitTitle"]', 'FILE EXPLORERS')
}, },

@ -11,7 +11,7 @@ module.exports = {
'Should zoom in editor': function (browser: NightwatchBrowser) { 'Should zoom in editor': function (browser: NightwatchBrowser) {
browser.waitForElementVisible('div[data-id="mainPanelPluginsContainer"]') browser.waitForElementVisible('div[data-id="mainPanelPluginsContainer"]')
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('filePanel')
.waitForElementVisible('div[data-id="filePanelFileExplorerTree"]') .waitForElementVisible('div[data-id="filePanelFileExplorerTree"]')
.openFile('contracts') .openFile('contracts')
.openFile('contracts/1_Storage.sol') .openFile('contracts/1_Storage.sol')

@ -17,7 +17,7 @@ module.exports = {
'Should create a new file `5_New_contract.sol` in file explorer': function (browser: NightwatchBrowser) { 'Should create a new file `5_New_contract.sol` in file explorer': function (browser: NightwatchBrowser) {
browser.waitForElementVisible('div[data-id="remixIdeSidePanel"]') browser.waitForElementVisible('div[data-id="remixIdeSidePanel"]')
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('filePanel')
.assert.containsText('h6[data-id="sidePanelSwapitTitle"]', 'FILE EXPLORERS') .assert.containsText('h6[data-id="sidePanelSwapitTitle"]', 'FILE EXPLORERS')
.click('li[data-id="treeViewLitreeViewItemREADME.txt"]') // focus on root directory .click('li[data-id="treeViewLitreeViewItemREADME.txt"]') // focus on root directory
.click('*[data-id="fileExplorerNewFilecreateNewFile"]') .click('*[data-id="fileExplorerNewFilecreateNewFile"]')

@ -25,7 +25,7 @@ module.exports = {
.pause(2000) .pause(2000)
.click('*[data-id="compilerContainerCompileBtn"]') .click('*[data-id="compilerContainerCompileBtn"]')
.pause(3000) .pause(3000)
.click('*[data-id="verticalIconsKindfileExplorers"]') .click('*[data-id="verticalIconsKindfilePanel"]')
.openFile('contracts/artifacts/Ballot.json') .openFile('contracts/artifacts/Ballot.json')
.openFile('contracts/artifacts/Ballot_metadata.json') .openFile('contracts/artifacts/Ballot_metadata.json')
.getEditorValue((content) => { .getEditorValue((content) => {

@ -64,7 +64,7 @@ module.exports = {
'Load Gist Modal': function (browser: NightwatchBrowser) { 'Load Gist Modal': function (browser: NightwatchBrowser) {
browser.clickLaunchIcon('home') browser.clickLaunchIcon('home')
.waitForElementVisible('*[data-id="remixIdeIconPanel"]', 10000) .waitForElementVisible('*[data-id="remixIdeIconPanel"]', 10000)
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('filePanel')
.scrollAndClick('*[data-id="landingPageImportFromGistButton"]') .scrollAndClick('*[data-id="landingPageImportFromGistButton"]')
.waitForElementVisible('*[data-id="modalDialogModalTitle"]') .waitForElementVisible('*[data-id="modalDialogModalTitle"]')
.assert.containsText('*[data-id="modalDialogModalTitle"]', 'Load a Gist') .assert.containsText('*[data-id="modalDialogModalTitle"]', 'Load a Gist')
@ -77,7 +77,7 @@ module.exports = {
'Display Error Message For Invalid Gist ID': function (browser: NightwatchBrowser) { 'Display Error Message For Invalid Gist ID': function (browser: NightwatchBrowser) {
browser browser
.waitForElementVisible('*[data-id="remixIdeIconPanel"]', 10000) .waitForElementVisible('*[data-id="remixIdeIconPanel"]', 10000)
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('filePanel')
.scrollAndClick('*[data-id="landingPageImportFromGistButton"]') .scrollAndClick('*[data-id="landingPageImportFromGistButton"]')
.waitForElementVisible('*[data-id="modalDialogCustomPromptText"]') .waitForElementVisible('*[data-id="modalDialogCustomPromptText"]')
.setValue('*[data-id="modalDialogCustomPromptText"]', testData.invalidGistId) .setValue('*[data-id="modalDialogCustomPromptText"]', testData.invalidGistId)
@ -93,7 +93,7 @@ module.exports = {
.clickLaunchIcon('settings') .clickLaunchIcon('settings')
.waitForElementVisible('[data-id="settingsTabRemoveGistToken"]') .waitForElementVisible('[data-id="settingsTabRemoveGistToken"]')
.click('[data-id="settingsTabRemoveGistToken"]') .click('[data-id="settingsTabRemoveGistToken"]')
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('filePanel')
.waitForElementVisible('*[data-id="fileExplorerNewFilepublishToGist"]') .waitForElementVisible('*[data-id="fileExplorerNewFilepublishToGist"]')
.click('*[data-id="fileExplorerNewFilepublishToGist"]') .click('*[data-id="fileExplorerNewFilepublishToGist"]')
.waitForElementVisible('*[data-id="default_workspaceModalDialogContainer-react"]') .waitForElementVisible('*[data-id="default_workspaceModalDialogContainer-react"]')
@ -113,7 +113,7 @@ module.exports = {
.click('*[data-id="settingsTabGenerateContractMetadataLabel"]') .click('*[data-id="settingsTabGenerateContractMetadataLabel"]')
.setValue('[data-id="settingsTabGistAccessToken"]', process.env.gist_token) .setValue('[data-id="settingsTabGistAccessToken"]', process.env.gist_token)
.click('[data-id="settingsTabSaveGistToken"]') .click('[data-id="settingsTabSaveGistToken"]')
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('filePanel')
.scrollAndClick('*[data-id="landingPageImportFromGistButton"]') .scrollAndClick('*[data-id="landingPageImportFromGistButton"]')
.waitForElementVisible('*[data-id="modalDialogCustomPromptText"]') .waitForElementVisible('*[data-id="modalDialogCustomPromptText"]')
.setValue('*[data-id="modalDialogCustomPromptText"]', testData.validGistId) .setValue('*[data-id="modalDialogCustomPromptText"]', testData.validGistId)

@ -14,7 +14,7 @@ module.exports = {
'Publish on IPFS': function (browser: NightwatchBrowser) { 'Publish on IPFS': function (browser: NightwatchBrowser) {
browser browser
.waitForElementVisible('#icon-panel', 10000) .waitForElementVisible('#icon-panel', 10000)
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('filePanel')
.click('[data-id="treeViewLitreeViewItemcontracts"]') .click('[data-id="treeViewLitreeViewItemcontracts"]')
.openFile('contracts/3_Ballot.sol') .openFile('contracts/3_Ballot.sol')
.verifyContracts(['Ballot']) .verifyContracts(['Ballot'])
@ -43,7 +43,7 @@ module.exports = {
'Should publish contract metadata to ipfs on deploy': function (browser: NightwatchBrowser) { 'Should publish contract metadata to ipfs on deploy': function (browser: NightwatchBrowser) {
browser browser
.waitForElementVisible('#icon-panel') .waitForElementVisible('#icon-panel')
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('filePanel')
.openFile('contracts/1_Storage.sol') .openFile('contracts/1_Storage.sol')
.clickLaunchIcon('udapp') .clickLaunchIcon('udapp')
.waitForElementPresent('*[data-id="contractDropdownIpfsCheckbox"]') .waitForElementPresent('*[data-id="contractDropdownIpfsCheckbox"]')

@ -56,7 +56,7 @@ module.exports = {
*/ */
browser.waitForElementVisible('#icon-panel', 2000) browser.waitForElementVisible('#icon-panel', 2000)
// .clickLaunchIcon('fileExplorers') // .clickLaunchIcon('filePanel')
.click('[data-path="ballot.sol"]') .click('[data-path="ballot.sol"]')
.addFile('test_import_node_modules.sol', sources[3]['test_import_node_modules.sol']) .addFile('test_import_node_modules.sol', sources[3]['test_import_node_modules.sol'])
.clickLaunchIcon('solidity') .clickLaunchIcon('solidity')
@ -65,7 +65,7 @@ module.exports = {
}, },
'Import from node_modules and reference a github import': function (browser) { 'Import from node_modules and reference a github import': function (browser) {
browser.waitForElementVisible('#icon-panel', 2000) browser.waitForElementVisible('#icon-panel', 2000)
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('filePanel')
.addFile('test_import_node_modules_with_github_import.sol', sources[4]['test_import_node_modules_with_github_import.sol']) .addFile('test_import_node_modules_with_github_import.sol', sources[4]['test_import_node_modules_with_github_import.sol'])
.clickLaunchIcon('solidity') .clickLaunchIcon('solidity')
.setSolidityCompilerVersion('soljson-v0.8.0+commit.c7dfd78e.js') // open-zeppelin moved to pragma ^0.8.0 .setSolidityCompilerVersion('soljson-v0.8.0+commit.c7dfd78e.js') // open-zeppelin moved to pragma ^0.8.0
@ -97,13 +97,13 @@ function runTests (browser: NightwatchBrowser) {
browser browser
.waitForElementVisible('#icon-panel', 2000) .waitForElementVisible('#icon-panel', 2000)
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('filePanel')
.clickLaunchIcon('pluginManager') .clickLaunchIcon('pluginManager')
.scrollAndClick('#pluginManager article[id="remixPluginManagerListItem_remixd"] button') .scrollAndClick('#pluginManager article[id="remixPluginManagerListItem_remixd"] button')
.waitForElementVisible('#modal-footer-ok', 2000) .waitForElementVisible('#modal-footer-ok', 2000)
.pause(2000) .pause(2000)
.click('#modal-footer-ok') .click('#modal-footer-ok')
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('filePanel')
.waitForElementVisible('[data-path="folder1"]') .waitForElementVisible('[data-path="folder1"]')
.click('[data-path="folder1"]') .click('[data-path="folder1"]')
.waitForElementVisible('[data-path="contract1.sol"]') .waitForElementVisible('[data-path="contract1.sol"]')
@ -127,7 +127,7 @@ function runTests (browser: NightwatchBrowser) {
.perform(function (done) { .perform(function (done) {
testImportFromRemixd(browser, () => { done() }) testImportFromRemixd(browser, () => { done() })
}) })
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('filePanel')
.waitForElementVisible('[data-path="folder1"]') .waitForElementVisible('[data-path="folder1"]')
.click('[data-path="folder1"]') .click('[data-path="folder1"]')
.click('[data-path="folder1"]') // click twice because remixd does not return nested folder details after update .click('[data-path="folder1"]') // click twice because remixd does not return nested folder details after update

@ -47,7 +47,7 @@ module.exports = {
'Should deploy contract on JavascriptVM': function (browser: NightwatchBrowser) { 'Should deploy contract on JavascriptVM': function (browser: NightwatchBrowser) {
browser.waitForElementPresent('*[data-id="remixIdeSidePanel"]') browser.waitForElementPresent('*[data-id="remixIdeSidePanel"]')
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('filePanel')
.addFile('Greet.sol', sources[0]['Greet.sol']) .addFile('Greet.sol', sources[0]['Greet.sol'])
.clickLaunchIcon('udapp') .clickLaunchIcon('udapp')
.selectAccount('0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c') .selectAccount('0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c')
@ -95,7 +95,7 @@ module.exports = {
'Should deploy contract on Goerli Test Network using MetaMask': '' + function (browser: NightwatchBrowser) { 'Should deploy contract on Goerli Test Network using MetaMask': '' + function (browser: NightwatchBrowser) {
browser.waitForElementPresent('*[data-id="runTabSelectAccount"] option') browser.waitForElementPresent('*[data-id="runTabSelectAccount"] option')
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('filePanel')
.openFile('Greet.sol') .openFile('Greet.sol')
.clickLaunchIcon('udapp') .clickLaunchIcon('udapp')
.waitForElementPresent('*[data-id="Deploy - transact (not payable)"]') .waitForElementPresent('*[data-id="Deploy - transact (not payable)"]')
@ -147,7 +147,7 @@ module.exports = {
'Should deploy contract on Ethereum Main Network using MetaMask': '' + function (browser: NightwatchBrowser) { 'Should deploy contract on Ethereum Main Network using MetaMask': '' + function (browser: NightwatchBrowser) {
browser.waitForElementPresent('*[data-id="runTabSelectAccount"] option') browser.waitForElementPresent('*[data-id="runTabSelectAccount"] option')
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('filePanel')
.openFile('Greet.sol') .openFile('Greet.sol')
.clickLaunchIcon('udapp') .clickLaunchIcon('udapp')
.waitForElementPresent('*[data-id="Deploy - transact (not payable)"]') .waitForElementPresent('*[data-id="Deploy - transact (not payable)"]')

@ -33,7 +33,7 @@ module.exports = {
browser browser
.setSolidityCompilerVersion('soljson-v0.8.0+commit.c7dfd78e.js') // open-zeppelin moved to pragma ^0.8.0 (master branch) .setSolidityCompilerVersion('soljson-v0.8.0+commit.c7dfd78e.js') // open-zeppelin moved to pragma ^0.8.0 (master branch)
.addFile('Untitled4.sol', sources[3]['Untitled4.sol']) .addFile('Untitled4.sol', sources[3]['Untitled4.sol'])
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('filePanel')
.verifyContracts(['test7', 'ERC20'], { wait: 10000 }) .verifyContracts(['test7', 'ERC20'], { wait: 10000 })
}, },
@ -41,36 +41,36 @@ module.exports = {
browser browser
.setSolidityCompilerVersion('soljson-v0.5.0+commit.1d4f565a.js') // switch back to 0.5.0 : release-v2.3.0 branch is not solidity 0.6 compliant .setSolidityCompilerVersion('soljson-v0.5.0+commit.1d4f565a.js') // switch back to 0.5.0 : release-v2.3.0 branch is not solidity 0.6 compliant
.addFile('Untitled5.sol', sources[4]['Untitled5.sol']) .addFile('Untitled5.sol', sources[4]['Untitled5.sol'])
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('filePanel')
.verifyContracts(['test8', 'ERC20', 'SafeMath'], { wait: 10000 }) .verifyContracts(['test8', 'ERC20', 'SafeMath'], { wait: 10000 })
}, },
'Test Github Import - no branch specified': function (browser: NightwatchBrowser) { 'Test Github Import - no branch specified': function (browser: NightwatchBrowser) {
browser browser
.setSolidityCompilerVersion('soljson-v0.8.0+commit.c7dfd78e.js') // open-zeppelin moved to pragma ^0.8.0 (master branch) .setSolidityCompilerVersion('soljson-v0.8.0+commit.c7dfd78e.js') // open-zeppelin moved to pragma ^0.8.0 (master branch)
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('filePanel')
.click('li[data-id="treeViewLitreeViewItemREADME.txt"') .click('li[data-id="treeViewLitreeViewItemREADME.txt"')
.addFile('Untitled6.sol', sources[5]['Untitled6.sol']) .addFile('Untitled6.sol', sources[5]['Untitled6.sol'])
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('filePanel')
.verifyContracts(['test10', 'ERC20'], { wait: 10000 }) .verifyContracts(['test10', 'ERC20'], { wait: 10000 })
}, },
'Test Github Import - raw URL': function (browser: NightwatchBrowser) { 'Test Github Import - raw URL': function (browser: NightwatchBrowser) {
browser browser
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('filePanel')
.click('li[data-id="treeViewLitreeViewItemREADME.txt"') .click('li[data-id="treeViewLitreeViewItemREADME.txt"')
.addFile('Untitled7.sol', sources[6]['Untitled7.sol']) .addFile('Untitled7.sol', sources[6]['Untitled7.sol'])
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('filePanel')
.verifyContracts(['test11', 'ERC20'], { wait: 10000 }) .verifyContracts(['test11', 'ERC20'], { wait: 10000 })
}, },
'Test switch to a github import from a solidity warning': function (browser: NightwatchBrowser) { 'Test switch to a github import from a solidity warning': function (browser: NightwatchBrowser) {
browser browser
.setSolidityCompilerVersion('soljson-v0.7.4+commit.3f05b770.js') .setSolidityCompilerVersion('soljson-v0.7.4+commit.3f05b770.js')
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('filePanel')
.click('li[data-id="treeViewLitreeViewItemREADME.txt"') .click('li[data-id="treeViewLitreeViewItemREADME.txt"')
.addFile('Untitled8.sol', sources[7]['Untitled8.sol']) .addFile('Untitled8.sol', sources[7]['Untitled8.sol'])
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('filePanel')
.clickLaunchIcon('solidity') .clickLaunchIcon('solidity')
.waitForElementVisible('[data-id="https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-contracts/master/contracts/token/ERC20/ERC20.sol"]', 120000) .waitForElementVisible('[data-id="https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-contracts/master/contracts/token/ERC20/ERC20.sol"]', 120000)
.scrollAndClick('[data-id="https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-contracts/master/contracts/token/ERC20/ERC20.sol"]') // click on error which point to ERC20 code .scrollAndClick('[data-id="https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-contracts/master/contracts/token/ERC20/ERC20.sol"]') // click on error which point to ERC20 code
@ -81,10 +81,10 @@ module.exports = {
'Test NPM Import (with unpkg.com)': function (browser: NightwatchBrowser) { 'Test NPM Import (with unpkg.com)': function (browser: NightwatchBrowser) {
browser browser
.setSolidityCompilerVersion('soljson-v0.8.1+commit.df193b15.js') .setSolidityCompilerVersion('soljson-v0.8.1+commit.df193b15.js')
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('filePanel')
.click('li[data-id="treeViewLitreeViewItemREADME.txt"') .click('li[data-id="treeViewLitreeViewItemREADME.txt"')
.addFile('Untitled9.sol', sources[8]['Untitled9.sol']) .addFile('Untitled9.sol', sources[8]['Untitled9.sol'])
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('filePanel')
.verifyContracts(['test13', 'ERC20'], { wait: 30000 }) .verifyContracts(['test13', 'ERC20'], { wait: 30000 })
.end() .end()
} }

@ -14,8 +14,8 @@ module.exports = {
}, },
'Should launch solidity unit test plugin': function (browser: NightwatchBrowser) { 'Should launch solidity unit test plugin': function (browser: NightwatchBrowser) {
browser.waitForElementPresent('*[data-id="verticalIconsKindfileExplorers"]') browser.waitForElementPresent('*[data-id="verticalIconsKindfilePanel"]')
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('filePanel')
.addFile('simple_storage.sol', sources[0]['simple_storage.sol']) .addFile('simple_storage.sol', sources[0]['simple_storage.sol'])
.addFile('ks2a.sol', sources[0]['ks2a.sol']) .addFile('ks2a.sol', sources[0]['ks2a.sol'])
.clickLaunchIcon('pluginManager') .clickLaunchIcon('pluginManager')
@ -26,21 +26,21 @@ module.exports = {
}, },
'Should generate test file': function (browser: NightwatchBrowser) { 'Should generate test file': function (browser: NightwatchBrowser) {
browser.waitForElementPresent('*[data-id="verticalIconsKindfileExplorers"]') browser.waitForElementPresent('*[data-id="verticalIconsKindfilePanel"]')
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('filePanel')
.openFile('simple_storage.sol') .openFile('simple_storage.sol')
.click('*[data-id="verticalIconsKindsolidityUnitTesting"]') .click('*[data-id="verticalIconsKindsolidityUnitTesting"]')
.waitForElementPresent('*[data-id="testTabGenerateTestFile"]') .waitForElementPresent('*[data-id="testTabGenerateTestFile"]')
.click('*[data-id="testTabGenerateTestFile"]') .click('*[data-id="testTabGenerateTestFile"]')
.waitForElementPresent('*[title="tests/simple_storage_test.sol"]') .waitForElementPresent('*[title="tests/simple_storage_test.sol"]')
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('filePanel')
.pause(10000) .pause(10000)
.openFile('tests/simple_storage_test.sol') .openFile('tests/simple_storage_test.sol')
.removeFile('tests/simple_storage_test.sol', 'default_workspace') .removeFile('tests/simple_storage_test.sol', 'default_workspace')
}, },
'Should run simple unit test `simple_storage_test.sol` ': function (browser: NightwatchBrowser) { 'Should run simple unit test `simple_storage_test.sol` ': function (browser: NightwatchBrowser) {
browser.waitForElementPresent('*[data-id="verticalIconsKindfileExplorers"]') browser.waitForElementPresent('*[data-id="verticalIconsKindfilePanel"]')
.addFile('tests/simple_storage_test.sol', sources[0]['tests/simple_storage_test.sol']) .addFile('tests/simple_storage_test.sol', sources[0]['tests/simple_storage_test.sol'])
.click('*[data-id="verticalIconsKindsolidityUnitTesting"]') .click('*[data-id="verticalIconsKindsolidityUnitTesting"]')
.waitForElementPresent('*[data-id="testTabCheckAllTests"]') .waitForElementPresent('*[data-id="testTabCheckAllTests"]')
@ -57,8 +57,8 @@ module.exports = {
}, },
'Should run advance unit test using natspec and experimental ABIEncoderV2 `ks2b_test.sol` ': function (browser: NightwatchBrowser) { 'Should run advance unit test using natspec and experimental ABIEncoderV2 `ks2b_test.sol` ': function (browser: NightwatchBrowser) {
browser.waitForElementPresent('*[data-id="verticalIconsKindfileExplorers"]') browser.waitForElementPresent('*[data-id="verticalIconsKindfilePanel"]')
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('filePanel')
.addFile('tests/ks2b_test.sol', sources[0]['tests/ks2b_test.sol']) .addFile('tests/ks2b_test.sol', sources[0]['tests/ks2b_test.sol'])
.click('*[data-id="verticalIconsKindsolidityUnitTesting"]') .click('*[data-id="verticalIconsKindsolidityUnitTesting"]')
.waitForElementPresent('*[data-id="testTabCheckAllTests"]') .waitForElementPresent('*[data-id="testTabCheckAllTests"]')
@ -77,7 +77,7 @@ module.exports = {
}, },
'Should stop unit tests during test execution` ': function (browser: NightwatchBrowser) { 'Should stop unit tests during test execution` ': function (browser: NightwatchBrowser) {
browser.waitForElementPresent('*[data-id="verticalIconsKindfileExplorers"]') browser.waitForElementPresent('*[data-id="verticalIconsKindfilePanel"]')
.waitForElementPresent('*[data-id="testTabRunTestsTabRunAction"]') .waitForElementPresent('*[data-id="testTabRunTestsTabRunAction"]')
.clickElementAtPosition('.singleTestLabel', 0) .clickElementAtPosition('.singleTestLabel', 0)
.clickElementAtPosition('.singleTestLabel', 1) .clickElementAtPosition('.singleTestLabel', 1)
@ -92,9 +92,9 @@ module.exports = {
}, },
'Should fail on compilation': function (browser: NightwatchBrowser) { 'Should fail on compilation': function (browser: NightwatchBrowser) {
browser.waitForElementPresent('*[data-id="verticalIconsKindfileExplorers"]') browser.waitForElementPresent('*[data-id="verticalIconsKindfilePanel"]')
.addFile('tests/compilationError_test.sol', sources[0]['compilationError_test.sol']) .addFile('tests/compilationError_test.sol', sources[0]['compilationError_test.sol'])
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('filePanel')
.openFile('tests/compilationError_test.sol') .openFile('tests/compilationError_test.sol')
.clickLaunchIcon('solidityUnitTesting') .clickLaunchIcon('solidityUnitTesting')
.click('*[data-id="testTabCheckAllTests"]') .click('*[data-id="testTabCheckAllTests"]')
@ -105,9 +105,9 @@ module.exports = {
}, },
'Should fail on deploy': function (browser: NightwatchBrowser) { 'Should fail on deploy': function (browser: NightwatchBrowser) {
browser.waitForElementPresent('*[data-id="verticalIconsKindfileExplorers"]') browser.waitForElementPresent('*[data-id="verticalIconsKindfilePanel"]')
.addFile('tests/deployError_test.sol', sources[0]['tests/deployError_test.sol']) .addFile('tests/deployError_test.sol', sources[0]['tests/deployError_test.sol'])
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('filePanel')
.openFile('tests/deployError_test.sol') .openFile('tests/deployError_test.sol')
.clickLaunchIcon('solidityUnitTesting') .clickLaunchIcon('solidityUnitTesting')
.click('*[data-id="testTabCheckAllTests"]') .click('*[data-id="testTabCheckAllTests"]')
@ -117,9 +117,9 @@ module.exports = {
}, },
'Should fail when parameters are to method in test contract': function (browser: NightwatchBrowser) { 'Should fail when parameters are to method in test contract': function (browser: NightwatchBrowser) {
browser.waitForElementPresent('*[data-id="verticalIconsKindfileExplorers"]') browser.waitForElementPresent('*[data-id="verticalIconsKindfilePanel"]')
.addFile('tests/methodFailure_test.sol', sources[0]['tests/methodFailure_test.sol']) .addFile('tests/methodFailure_test.sol', sources[0]['tests/methodFailure_test.sol'])
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('filePanel')
.openFile('tests/methodFailure_test.sol') .openFile('tests/methodFailure_test.sol')
.clickLaunchIcon('solidityUnitTesting') .clickLaunchIcon('solidityUnitTesting')
.click('*[data-id="testTabCheckAllTests"]') .click('*[data-id="testTabCheckAllTests"]')
@ -130,7 +130,7 @@ module.exports = {
'Changing current path': function (browser: NightwatchBrowser) { 'Changing current path': function (browser: NightwatchBrowser) {
browser browser
.waitForElementPresent('*[data-id="verticalIconsKindfileExplorers"]') .waitForElementPresent('*[data-id="verticalIconsKindfilePanel"]')
.addFile('myTests/simple_storage_test.sol', sources[0]['tests/simple_storage_test.sol']) .addFile('myTests/simple_storage_test.sol', sources[0]['tests/simple_storage_test.sol'])
.clickLaunchIcon('solidityUnitTesting') .clickLaunchIcon('solidityUnitTesting')
.setValue('*[data-id="uiPathInput"]', 'myTests') .setValue('*[data-id="uiPathInput"]', 'myTests')
@ -151,8 +151,8 @@ module.exports = {
function runTests (browser: NightwatchBrowser) { function runTests (browser: NightwatchBrowser) {
browser browser
.waitForElementPresent('*[data-id="verticalIconsKindfileExplorers"]') .waitForElementPresent('*[data-id="verticalIconsKindfilePanel"]')
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('filePanel')
.click('*[data-id="treeViewLitreeViewItemcontracts"]') .click('*[data-id="treeViewLitreeViewItemcontracts"]')
.openFile('contracts/3_Ballot.sol') .openFile('contracts/3_Ballot.sol')
.clickLaunchIcon('solidityUnitTesting') .clickLaunchIcon('solidityUnitTesting')

@ -29,7 +29,7 @@ module.exports = {
'Using Web Worker': function (browser: NightwatchBrowser) { 'Using Web Worker': function (browser: NightwatchBrowser) {
browser browser
.waitForElementVisible('*[data-id="remixIdeIconPanel"]', 10000) .waitForElementVisible('*[data-id="remixIdeIconPanel"]', 10000)
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('filePanel')
.addFile('basic.sol', sources[0]['basic.sol']) .addFile('basic.sol', sources[0]['basic.sol'])
.clickLaunchIcon('solidity') .clickLaunchIcon('solidity')
.execute(function () { .execute(function () {

@ -32,7 +32,7 @@ module.exports = {
'Should create two workspace and switch to the first one': function (browser: NightwatchBrowser) { 'Should create two workspace and switch to the first one': function (browser: NightwatchBrowser) {
browser browser
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('filePanel')
.click('*[data-id="workspaceCreate"]') // create workspace_name .click('*[data-id="workspaceCreate"]') // create workspace_name
.waitForElementVisible('*[data-id="modalDialogCustomPromptTextCreate"]') .waitForElementVisible('*[data-id="modalDialogCustomPromptTextCreate"]')
// eslint-disable-next-line dot-notation // eslint-disable-next-line dot-notation

@ -453,7 +453,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
await appManager.activatePlugin(['mainPanel', 'menuicons', 'tabs']) await appManager.activatePlugin(['mainPanel', 'menuicons', 'tabs'])
await appManager.activatePlugin(['sidePanel']) // activating host plugin separately await appManager.activatePlugin(['sidePanel']) // activating host plugin separately
await appManager.activatePlugin(['home']) await appManager.activatePlugin(['home'])
await appManager.activatePlugin(['hiddenPanel', 'pluginManager', 'fileExplorers', 'settings', 'contextualListener', 'terminal', 'fetchAndCompile']) await appManager.activatePlugin(['hiddenPanel', 'pluginManager', 'filePanel', 'settings', 'contextualListener', 'terminal', 'fetchAndCompile'])
const queryParams = new QueryParams() const queryParams = new QueryParams()
const params = queryParams.get() const params = queryParams.get()

@ -230,7 +230,7 @@ export class VerticalIcons extends Plugin {
// this.call('manager', 'deactivatePlugin', name) // this.call('manager', 'deactivatePlugin', name)
this.appManager.deactivatePlugin(name) this.appManager.deactivatePlugin(name)
if (e.target.parentElement.classList.contains('active')) { if (e.target.parentElement.classList.contains('active')) {
this.select('fileExplorers') this.select('filePanel')
} }
} }
} }

@ -32,7 +32,7 @@ const modalDialogCustom = require('../ui/modal-dialog-custom')
*/ */
const profile = { const profile = {
name: 'fileExplorers', name: 'filePanel',
displayName: 'File explorers', displayName: 'File explorers',
methods: ['createNewFile', 'uploadFile', 'getCurrentWorkspace', 'getWorkspaces', 'createWorkspace'], methods: ['createNewFile', 'uploadFile', 'getCurrentWorkspace', 'getWorkspaces', 'createWorkspace'],
events: ['setWorkspace', 'renameWorkspace', 'deleteWorkspace'], events: ['setWorkspace', 'renameWorkspace', 'deleteWorkspace'],

@ -261,7 +261,7 @@ export class LandingPage extends ViewPlugin {
} else { } else {
try { try {
fileProviders.workspace.addExternal(type + '/' + cleanUrl, content, url) fileProviders.workspace.addExternal(type + '/' + cleanUrl, content, url)
this.verticalIcons.select('fileExplorers') this.verticalIcons.select('filePanel')
} catch (e) { } catch (e) {
modalDialogCustom.alert(title, e.message) modalDialogCustom.alert(title, e.message)
} }
@ -308,7 +308,7 @@ export class LandingPage extends ViewPlugin {
} }
const createNewFile = () => { const createNewFile = () => {
this.call('fileExplorers', 'createNewFile') this.call('filePanel', 'createNewFile')
} }
const saveAs = (blob, name) => { const saveAs = (blob, name) => {
@ -348,7 +348,7 @@ export class LandingPage extends ViewPlugin {
} }
const uploadFile = (target) => { const uploadFile = (target) => {
this.call('fileExplorers', 'uploadFile', target) this.call('filePanel', 'uploadFile', target)
} }
const connectToLocalhost = () => { const connectToLocalhost = () => {
@ -356,7 +356,7 @@ export class LandingPage extends ViewPlugin {
} }
const importFromGist = () => { const importFromGist = () => {
this.gistHandler.loadFromGist({ gist: '' }, globalRegistry.get('filemanager').api) this.gistHandler.loadFromGist({ gist: '' }, globalRegistry.get('filemanager').api)
this.verticalIcons.select('fileExplorers') this.verticalIcons.select('filePanel')
} }
globalRegistry.get('themeModule').api.events.on('themeChanged', (theme) => { globalRegistry.get('themeModule').api.events.on('themeChanged', (theme) => {

@ -18,12 +18,12 @@ export class FramingService {
this.resizeFeature.showPanel() this.resizeFeature.showPanel()
}) })
this.verticalIcon.select('fileExplorers') this.verticalIcon.select('filePanel')
document.addEventListener('keypress', (e) => { document.addEventListener('keypress', (e) => {
if (e.shiftKey && e.ctrlKey) { if (e.shiftKey && e.ctrlKey) {
if (e.code === 'KeyF') { // Ctrl+Shift+F if (e.code === 'KeyF') { // Ctrl+Shift+F
this.verticalIcon.select('fileExplorers') this.verticalIcon.select('filePanel')
} else if (e.code === 'KeyA') { // Ctrl+Shift+A } else if (e.code === 'KeyA') { // Ctrl+Shift+A
this.verticalIcon.select('pluginManager') this.verticalIcon.select('pluginManager')
} else if (e.code === 'KeyS') { // Ctrl+Shift+S } else if (e.code === 'KeyS') { // Ctrl+Shift+S

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

Loading…
Cancel
Save