|
|
|
@ -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') |
|
|
|
|