diff --git a/apps/remix-ide-e2e/src/tests/compiler_api.test.ts b/apps/remix-ide-e2e/src/tests/compiler_api.test.ts index 95c620ec3e..17d8a96815 100644 --- a/apps/remix-ide-e2e/src/tests/compiler_api.test.ts +++ b/apps/remix-ide-e2e/src/tests/compiler_api.test.ts @@ -21,7 +21,7 @@ module.exports = { 'Should compile using "compileWithParamaters" API #group1': function (browser: NightwatchBrowser) { browser .addFile('test_jsCompile.js', { content: jsCompile }) - .ExecuteScriptInTerminal('remix.exeCurrent()') + .executeScriptInTerminal('remix.exeCurrent()') .waitForElementContainsText('*[data-id="terminalJournal"]', '"languageversion":"0.6.8+commit.0bbfe453"', 60000) .click('*[data-id="terminalClearConsole"]') }, @@ -29,7 +29,7 @@ module.exports = { 'Should compile using "compileWithParamaters" API with optimization On #group2': function (browser: NightwatchBrowser) { browser .addFile('test_jsCompileWithOptimization.js', { content: jsCompileWithOptimization }) - .ExecuteScriptInTerminal('remix.exeCurrent()') + .executeScriptInTerminal('remix.exeCurrent()') .waitForElementContainsText('*[data-id="terminalJournal"]', '\\"optimizer\\":{\\"enabled\\":true,\\"runs\\":300}', 60000) .click('*[data-id="terminalClearConsole"]') }, @@ -37,7 +37,7 @@ module.exports = { 'Should compile using "compileWithParamaters" API with optimization off check default runs #group3': function (browser: NightwatchBrowser) { browser .addFile('test_jsCompileWithOptimizationDefault.js', { content: jsCompileWithOptimizationDefault }) - .ExecuteScriptInTerminal('remix.exeCurrent()') + .executeScriptInTerminal('remix.exeCurrent()') .waitForElementContainsText('*[data-id="terminalJournal"]', '\\"optimizer\\":{\\"enabled\\":false,\\"runs\\":200}', 60000) .click('*[data-id="terminalClearConsole"]') }, @@ -45,7 +45,7 @@ module.exports = { 'Should update the compiler configuration with "setCompilerConfig" API #group4': function (browser: NightwatchBrowser) { browser .addFile('test_updateConfiguration.js', { content: updateConfiguration }) - .ExecuteScriptInTerminal('remix.exeCurrent()') + .executeScriptInTerminal('remix.exeCurrent()') .pause(15000) .addFile('test_updateConfiguration.sol', { content: simpleContract }) .verifyContracts(['StorageTestUpdateConfiguration'], { wait: 5000, version: '0.6.8+commit.0bbfe453' }) diff --git a/apps/remix-ide-e2e/src/tests/debugger.test.ts b/apps/remix-ide-e2e/src/tests/debugger.test.ts index 09d378e5f2..19918de0c4 100644 --- a/apps/remix-ide-e2e/src/tests/debugger.test.ts +++ b/apps/remix-ide-e2e/src/tests/debugger.test.ts @@ -192,7 +192,7 @@ module.exports = { 'Should call the debugger api: getTrace #group4': function (browser: NightwatchBrowser) { browser .addFile('test_jsGetTrace.js', { content: jsGetTrace }) - .ExecuteScriptInTerminal('remix.exeCurrent()') + .executeScriptInTerminal('remix.exeCurrent()') .pause(3000) .waitForElementContainsText('*[data-id="terminalJournal"]', '{"gas":"0x575f","return":"0x0000000000000000000000000000000000000000000000000000000000000000","structLogs":', 60000) }, @@ -200,7 +200,7 @@ module.exports = { 'Should call the debugger api: debug #group4': function (browser: NightwatchBrowser) { browser .addFile('test_jsDebug.js', { content: jsDebug }) - .ExecuteScriptInTerminal('remix.exeCurrent()') + .executeScriptInTerminal('remix.exeCurrent()') .pause(3000) .clickLaunchIcon('debugger') .waitForElementVisible('*[data-id="slider"]') diff --git a/apps/remix-ide-e2e/src/tests/editor.test.ts b/apps/remix-ide-e2e/src/tests/editor.test.ts index d558c10247..771b59b93a 100644 --- a/apps/remix-ide-e2e/src/tests/editor.test.ts +++ b/apps/remix-ide-e2e/src/tests/editor.test.ts @@ -89,7 +89,7 @@ module.exports = { .addFile('sourcehighlight.js', sourcehighlightScript) .addFile('removeAllSourcehighlightScript.js', removeAllSourcehighlightScript) .openFile('sourcehighlight.js') - .ExecuteScriptInTerminal('remix.exeCurrent()') + .executeScriptInTerminal('remix.exeCurrent()') .scrollToLine(32) .waitForElementPresent('.highlightLine33', 60000) .checkElementStyle('.highlightLine33', 'background-color', 'rgb(52, 152, 219)') @@ -105,7 +105,7 @@ module.exports = { browser.waitForElementVisible('li[data-id="treeViewLitreeViewItemremoveSourcehighlightScript.js"]') .click('li[data-id="treeViewLitreeViewItemremoveSourcehighlightScript.js"]') .pause(2000) - .ExecuteScriptInTerminal('remix.exeCurrent()') + .executeScriptInTerminal('remix.exeCurrent()') .waitForElementVisible('li[data-id="treeViewLitreeViewItemcontracts"]') .click('li[data-id="treeViewLitreeViewItemcontracts"]') .waitForElementVisible('li[data-id="treeViewLitreeViewItemcontracts/3_Ballot.sol"]') @@ -119,7 +119,7 @@ module.exports = { browser.waitForElementVisible('li[data-id="treeViewLitreeViewItemremoveAllSourcehighlightScript.js"]') .click('li[data-id="treeViewLitreeViewItemremoveAllSourcehighlightScript.js"]') .pause(2000) - .ExecuteScriptInTerminal('remix.exeCurrent()') + .executeScriptInTerminal('remix.exeCurrent()') .waitForElementVisible('li[data-id="treeViewLitreeViewItemcontracts/3_Ballot.sol"]') .click('li[data-id="treeViewLitreeViewItemcontracts/3_Ballot.sol"]') .pause(2000) diff --git a/apps/remix-ide-e2e/src/tests/editorAutoComplete.test.ts b/apps/remix-ide-e2e/src/tests/editorAutoComplete.test.ts index 7aff6ce885..6f3f77f85c 100644 --- a/apps/remix-ide-e2e/src/tests/editorAutoComplete.test.ts +++ b/apps/remix-ide-e2e/src/tests/editorAutoComplete.test.ts @@ -6,21 +6,18 @@ module.exports = { before: function (browser: NightwatchBrowser, done: VoidFunction) { init(browser, done, 'http://127.0.0.1:8080', false) }, - 'Should show hover over contract in editor #group1': function (browser: NightwatchBrowser) { - browser.useCss().element('css selector', '[data-id="verticalIconsKindfilePanel"] img[data-id="selected"]', (result) => { - console.log(result) - }) - }, 'Should load the test file': function (browser: NightwatchBrowser) { - browser.openFile('README.txt') - // .openFile('contracts') - // .openFile('contracts/3_Ballot.sol') - // .waitForElementVisible('#editorView') - // .setEditorValue('bad') - // .pause(4000) // wait for the compiler to finish - // .openFile('contracts') - // .openFile('contracts/3_Ballot.sol') + browser + .openFile('contracts') + .openFile('contracts/3_Ballot.sol') + .waitForElementVisible('#editorView') + }, + 'Should open local filesystem explorer': function (browser: NightwatchBrowser) { + browser.waitForElementVisible('*[data-id="filePanelFileExplorerTree"]') + .click('[data-id="remixUIWorkspaceExplorer"]') + .setValue('*[data-id="fileExplorerFileUpload"]', 'burnt-coffee.sol') + } } // eslint-disable-next-line @typescript-eslint/no-unused-vars diff --git a/apps/remix-ide-e2e/src/tests/fileManager_api.test.ts b/apps/remix-ide-e2e/src/tests/fileManager_api.test.ts index 884090bc52..26a2e7cffd 100644 --- a/apps/remix-ide-e2e/src/tests/fileManager_api.test.ts +++ b/apps/remix-ide-e2e/src/tests/fileManager_api.test.ts @@ -11,7 +11,7 @@ module.exports = { 'Should execute `file` api from file manager external api #group1': function (browser: NightwatchBrowser) { browser .addFile('file.js', { content: executeFile }) - .ExecuteScriptInTerminal('remix.exeCurrent()') + .executeScriptInTerminal('remix.exeCurrent()') .pause(1000) .waitForElementContainsText('*[data-id="terminalJournal"]', 'file.js', 60000) }, @@ -19,7 +19,7 @@ module.exports = { 'Should execute `exists` api from file manager external api #group1': function (browser: NightwatchBrowser) { browser .addFile('exists.js', { content: executeExists }) - .ExecuteScriptInTerminal('remix.exeCurrent()') + .executeScriptInTerminal('remix.exeCurrent()') .waitForElementContainsText('*[data-id="terminalJournal"]', 'exists.js true', 60000) .waitForElementContainsText('*[data-id="terminalJournal"]', 'non-exists.js false', 60000) }, @@ -27,14 +27,14 @@ module.exports = { 'Should execute `open` api from file manager external api #group1': function (browser: NightwatchBrowser) { browser .addFile('open.js', { content: executeOpen }) - .ExecuteScriptInTerminal('remix.exeCurrent()') + .executeScriptInTerminal('remix.exeCurrent()') .waitForElementContainsText('*[data-id="terminalJournal"]', 'contracts/3_Ballot.sol', 60000) }, 'Should execute `writeFile` api from file manager external api #group1': function (browser: NightwatchBrowser) { browser .addFile('writeFile.js', { content: executeWriteFile }) - .ExecuteScriptInTerminal('remix.exeCurrent()') + .executeScriptInTerminal('remix.exeCurrent()') .pause(2000) .openFile('new_contract.sol') .getEditorValue((content) => { @@ -45,23 +45,23 @@ module.exports = { 'Should execute `readFile` api from file manager external api #group2': function (browser: NightwatchBrowser) { browser .addFile('writeFile.js', { content: executeWriteFile }) - .ExecuteScriptInTerminal('remix.exeCurrent()') + .executeScriptInTerminal('remix.exeCurrent()') .addFile('readFile.js', { content: executeReadFile }) - .ExecuteScriptInTerminal('remix.exeCurrent()') + .executeScriptInTerminal('remix.exeCurrent()') .waitForElementContainsText('*[data-id="terminalJournal"]', 'pragma solidity ^0.6.0', 60000) }, 'Should execute `copyFile` api from file manager external api #group2': function (browser: NightwatchBrowser) { browser .addFile('copyFile.js', { content: executeCopyFile }) - .ExecuteScriptInTerminal('remix.exeCurrent()') + .executeScriptInTerminal('remix.exeCurrent()') .waitForElementContainsText('*[data-id="terminalJournal"]', 'pragma solidity >=0.7.0 <0.9.0;', 60000) }, 'Should execute `rename` api from file manager external api #group2': function (browser: NightwatchBrowser) { browser .addFile('renameFile.js', { content: executeRename }) - .ExecuteScriptInTerminal('remix.exeCurrent()') + .executeScriptInTerminal('remix.exeCurrent()') .pause(2000) .waitForElementPresent('[data-id="treeViewLitreeViewItemold_contract.sol"]', 60000) }, @@ -69,7 +69,7 @@ module.exports = { 'Should execute `mkdir` api from file manager external api #group3': function (browser: NightwatchBrowser) { browser .addFile('mkdirFile.js', { content: executeMkdir }) - .ExecuteScriptInTerminal('remix.exeCurrent()') + .executeScriptInTerminal('remix.exeCurrent()') .pause(2000) .waitForElementPresent('[data-id="treeViewLitreeViewItemTest_Folder"]', 80000) }, @@ -77,7 +77,7 @@ module.exports = { 'Should execute `readdir` api from file manager external api #group3': function (browser: NightwatchBrowser) { browser .addFile('readdirFile.js', { content: executeReaddir }) - .ExecuteScriptInTerminal('remix.exeCurrent()') + .executeScriptInTerminal('remix.exeCurrent()') .waitForElementContainsText('*[data-id="terminalJournal"]', 'Test_Folder isDirectory', 60000) .waitForElementContainsText('*[data-id="terminalJournal"]', 'true', 5000) }, @@ -86,7 +86,7 @@ module.exports = { browser .addFile('old_contract.sol', { content: 'test' }) .addFile('removeFile.js', { content: executeRemove }) - .ExecuteScriptInTerminal('remix.exeCurrent()') + .executeScriptInTerminal('remix.exeCurrent()') .pause(2000) .waitForElementNotPresent('[data-id="treeViewLitreeViewItemold_contract.sol"]', 60000) }, @@ -95,7 +95,7 @@ module.exports = { 'Should execute `remove` api from file manager external api on a folder #group4': function (browser: NightwatchBrowser) { browser .addFile('test_jsRemoveFolder.js', { content: executeRemoveOnFolder }) - .ExecuteScriptInTerminal('remix.exeCurrent()') + .executeScriptInTerminal('remix.exeCurrent()') .pause(2000) .waitForElementNotPresent('[data-id="treeViewLitreeViewItemcontracts"]', 60000) .end() diff --git a/apps/remix-ide-e2e/src/tests/gist.test.ts b/apps/remix-ide-e2e/src/tests/gist.test.ts index 956b801727..5bf3b34d5d 100644 --- a/apps/remix-ide-e2e/src/tests/gist.test.ts +++ b/apps/remix-ide-e2e/src/tests/gist.test.ts @@ -34,7 +34,7 @@ module.exports = { .sendKeys('*[data-id$="/blank"] .remixui_items', browser.Keys.ENTER) .waitForElementVisible('*[data-id="treeViewLitreeViewItemBrowser_Tests"]') .addFile('File.sol', { content: '' }) - .ExecuteScriptInTerminal(`remix.loadgist('${gistid}')`) + .executeScriptInTerminal(`remix.loadgist('${gistid}')`) // .perform((done) => { if (runtimeBrowser === 'chrome') { browser.openFile('gists') } done() }) .waitForElementVisible(`[data-id="treeViewLitreeViewItemgist-${gistid}"]`) .click(`[data-id="treeViewLitreeViewItemgist-${gistid}"]`) @@ -58,7 +58,7 @@ module.exports = { const gistid = id[1] browser .click('[data-id="default_workspace-modal-footer-cancel-react"]') - .ExecuteScriptInTerminal(`remix.loadgist('${gistid}')`) + .executeScriptInTerminal(`remix.loadgist('${gistid}')`) // .perform((done) => { if (runtimeBrowser === 'chrome') { browser.openFile('gists') } done() }) .waitForElementVisible(`[data-id="treeViewLitreeViewItemgist-${gistid}"]`) .click(`[data-id="treeViewLitreeViewItemgist-${gistid}"]`) diff --git a/apps/remix-ide-e2e/src/tests/plugin_api.ts b/apps/remix-ide-e2e/src/tests/plugin_api.ts index 16439be438..8eb60ad276 100644 --- a/apps/remix-ide-e2e/src/tests/plugin_api.ts +++ b/apps/remix-ide-e2e/src/tests/plugin_api.ts @@ -417,7 +417,7 @@ module.exports = { .frameParent() .useCss() .addFile('test_modal.js', { content: testModalToasterApi }) - .ExecuteScriptInTerminal('remix.execute(\'test_modal.js\')') + .executeScriptInTerminal('remix.execute(\'test_modal.js\')') .useCss() .waitForElementVisible('*[data-id="test_id_1_ModalDialogModalBody-react"]', 60000) .assert.containsText('*[data-id="test_id_1_ModalDialogModalBody-react"]', 'message 1') diff --git a/apps/remix-ide-e2e/src/tests/remixd.test.ts b/apps/remix-ide-e2e/src/tests/remixd.test.ts index 667c00b0c5..6cf256e2cc 100644 --- a/apps/remix-ide-e2e/src/tests/remixd.test.ts +++ b/apps/remix-ide-e2e/src/tests/remixd.test.ts @@ -102,7 +102,7 @@ module.exports = { 'Run git status': '' + function (browser) { browser - .ExecuteScriptInTerminal('git status') + .executeScriptInTerminal('git status') .pause(3000) .journalLastChildIncludes('On branch ') }, diff --git a/apps/remix-ide-e2e/src/tests/runAndDeploy.test.ts b/apps/remix-ide-e2e/src/tests/runAndDeploy.test.ts index c313be5772..dceb54a420 100644 --- a/apps/remix-ide-e2e/src/tests/runAndDeploy.test.ts +++ b/apps/remix-ide-e2e/src/tests/runAndDeploy.test.ts @@ -200,7 +200,7 @@ module.exports = { 'Call web3.eth.getAccounts() using Injected Provider (Metamask)': '' + function (browser: NightwatchBrowser) { browser - .ExecuteScriptInTerminal('web3.eth.getAccounts()') + .executeScriptInTerminal('web3.eth.getAccounts()') .pause(2000) .journalLastChildIncludes('[ "0x76a3ABb5a12dcd603B52Ed22195dED17ee82708f" ]') .end() diff --git a/apps/remix-ide-e2e/src/tests/terminal.test.ts b/apps/remix-ide-e2e/src/tests/terminal.test.ts index 12a6b73657..50cd19e08f 100644 --- a/apps/remix-ide-e2e/src/tests/terminal.test.ts +++ b/apps/remix-ide-e2e/src/tests/terminal.test.ts @@ -11,7 +11,7 @@ module.exports = { 'Should execution a simple console command #group1 #group999': function (browser: NightwatchBrowser) { browser .waitForElementVisible('*[data-id="terminalCli"]', 10000) - .ExecuteScriptInTerminal('console.log(1 + 1)') + .executeScriptInTerminal('console.log(1 + 1)') .pause(2000) .waitForElementContainsText('*[data-id="terminalJournal"]', '2', 60000) }, @@ -27,7 +27,7 @@ module.exports = { 'Async/Await Script #group1': function (browser: NightwatchBrowser) { browser .addFile('asyncAwait.js', { content: asyncAwait }) - .ExecuteScriptInTerminal('remix.execute("asyncAwait.js")') + .executeScriptInTerminal('remix.execute("asyncAwait.js")') .waitForElementContainsText('*[data-id="terminalJournal"]', 'Waiting Promise', 60000) .waitForElementContainsText('*[data-id="terminalJournal"]', 'result - ', 60000) .waitForElementContainsText('*[data-id="terminalJournal"]', 'Promise Resolved', 60000) @@ -36,13 +36,13 @@ module.exports = { 'Call Remix File Manager from a script #group2': function (browser: NightwatchBrowser) { browser .addFile('asyncAwaitWithFileManagerAccess.js', { content: asyncAwaitWithFileManagerAccess }) - .ExecuteScriptInTerminal('remix.execute(\'asyncAwaitWithFileManagerAccess.js\')') + .executeScriptInTerminal('remix.execute(\'asyncAwaitWithFileManagerAccess.js\')') .waitForElementContainsText('*[data-id="terminalJournal"]', 'contract Ballot {', 60000) }, 'Call web3.eth.getAccounts() using Remix VM #group2': function (browser: NightwatchBrowser) { browser - .ExecuteScriptInTerminal('web3.eth.getAccounts()') + .executeScriptInTerminal('web3.eth.getAccounts()') .waitForElementContainsText('*[data-id="terminalJournal"]', '["0x5B38Da6a701c568545dCfcB03FcB875f56beddC4","0xAb8483F64d9C6d1EcF9b849Ae677dD3315835cb2","0x4B20993Bc481177ec7E8f571ceCaE8A9e22C02db","0x78731D3Ca6b7E34aC0F824c42a7cC18A495cabaB","0x617F2E2fD72FD9D5503197092aC168c91465E7f2","0x17F6AD8Ef982297579C203069C1DbfFE4348c372","0x5c6B0f7Bf3E7ce046039Bd8FABdfD3f9F5021678","0x03C6FcED478cBbC9a4FAB34eF9f40767739D1Ff7","0x1aE0EA34a72D944a8C7603FfB3eC30a6669E454C","0x0A098Eda01Ce92ff4A4CCb7A4fFFb5A43EBC70DC","0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c","0x14723A09ACff6D2A60DcdF7aA4AFf308FDDC160C","0x4B0897b0513fdC7C541B6d9D7E929C4e5364D2dB","0x583031D1113aD414F02576BD6afaBfb302140225","0xdD870fA1b7C4700F2BD7f44238821C26f7392148"]') }, @@ -52,7 +52,7 @@ module.exports = { .clickLaunchIcon('udapp') .switchEnvironment('External Http Provider') .modalFooterOKClick('basic-http-provider') - .ExecuteScriptInTerminal('web3.eth.getAccounts()') + .executeScriptInTerminal('web3.eth.getAccounts()') .waitForElementContainsText('*[data-id="terminalJournal"]', '["', 60000) // we check if an array is present, don't need to check for the content .waitForElementContainsText('*[data-id="terminalJournal"]', '"]', 60000) .waitForElementContainsText('*[data-id="terminalJournal"]', '","', 60000) @@ -64,7 +64,7 @@ module.exports = { .addFile('resolveExternalUrlAndSave.js', { content: resolveExternalUrlAndSave }) .openFile('resolveExternalUrlAndSave.js') .pause(1000) - .ExecuteScriptInTerminal('remix.execute(\'resolveExternalUrlAndSave.js\')') + .executeScriptInTerminal('remix.execute(\'resolveExternalUrlAndSave.js\')') .waitForElementContainsText('*[data-id="terminalJournal"]', 'Implementation of the {IERC20} interface.', 60000) .openFile('.deps/github/OpenZeppelin/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol') }, @@ -75,7 +75,7 @@ module.exports = { .addFile('resolveUrl.js', { content: resolveUrl }) .openFile('resolveUrl.js') .pause(1000) - .ExecuteScriptInTerminal('remix.execute(\'resolveUrl.js\')') + .executeScriptInTerminal('remix.execute(\'resolveUrl.js\')') .waitForElementContainsText('*[data-id="terminalJournal"]', 'contract Ballot {', 60000) }, @@ -85,7 +85,7 @@ module.exports = { .addFile('resolveExternalUrlAndSaveToaPath.js', { content: resolveExternalUrlAndSaveToaPath }) .openFile('resolveExternalUrlAndSaveToaPath.js') .pause(1000) - .ExecuteScriptInTerminal('remix.execute(\'resolveExternalUrlAndSaveToaPath.js\')') + .executeScriptInTerminal('remix.execute(\'resolveExternalUrlAndSaveToaPath.js\')') .waitForElementContainsText('*[data-id="terminalJournal"]', 'abstract contract ERC20Burnable', 60000) .openFile('.deps/github/newFile.sol') @@ -106,7 +106,7 @@ module.exports = { .openFile('contracts/2_Owner.sol') .clickLaunchIcon('solidity') .click('*[data-id="compilerContainerCompileBtn"]').pause(5000) // compile Owner - .ExecuteScriptInTerminal('remix.execute(\'deployWithEthersJs.js\')') + .executeScriptInTerminal('remix.execute(\'deployWithEthersJs.js\')') .waitForElementContainsText('*[data-id="terminalJournal"]', 'Contract Address:', 60000) .waitForElementContainsText('*[data-id="terminalJournal"]', '0xd9145CCE52D386f254917e481eB44e9943F39138', 60000) .waitForElementContainsText('*[data-id="terminalJournal"]', 'Deployment successful.', 60000) @@ -128,7 +128,7 @@ module.exports = { .clickLaunchIcon('solidity') .click('*[data-id="compilerContainerCompileBtn"]') .pause(1000) // compile Storage - .ExecuteScriptInTerminal('remix.execute(\'scripts/storage.test.js\')') + .executeScriptInTerminal('remix.execute(\'scripts/storage.test.js\')') .pause(1000) .waitForElementContainsText('*[data-id="terminalJournal"]', 'Running tests....') .waitForElementContainsText('*[data-id="terminalJournal"]', 'storage contract Address:') @@ -150,7 +150,7 @@ module.exports = { .clickLaunchIcon('solidity') .click('*[data-id="compilerContainerCompileBtn"]') .pause(1000) // compile StorageWithLib - .ExecuteScriptInTerminal('remix.execute(\'scripts/storageWithLib.test.js\')') + .executeScriptInTerminal('remix.execute(\'scripts/storageWithLib.test.js\')') .pause(1000) .waitForElementContainsText('*[data-id="terminalJournal"]', 'Running tests....') .waitForElementContainsText('*[data-id="terminalJournal"]', 'Storage with lib')