From 74425a024453af399307efbc7c397006dd060d41 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Tue, 16 Feb 2021 16:22:37 +0530 Subject: [PATCH 01/25] default solidity compiler version set to 0.8.1 --- apps/remix-ide-e2e/src/tests/solidityImport.test.ts | 2 +- apps/remix-ide/ci/makeMockCompiler.js | 2 +- apps/remix-ide/src/app/tabs/compileTab/compilerContainer.js | 2 +- package.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/solidityImport.test.ts b/apps/remix-ide-e2e/src/tests/solidityImport.test.ts index f7c42851e1a..1c8543fdaa4 100644 --- a/apps/remix-ide-e2e/src/tests/solidityImport.test.ts +++ b/apps/remix-ide-e2e/src/tests/solidityImport.test.ts @@ -66,7 +66,7 @@ module.exports = { 'Test switch to a github import from a solidity warning': function (browser: NightwatchBrowser) { browser - .setSolidityCompilerVersion('soljson-v0.7.4+commit.3f05b770.js') + .setSolidityCompilerVersion('soljson-v0.8.1+commit.df193b15.js') .clickLaunchIcon('fileExplorers') .click('li[data-id="treeViewLitreeViewItembrowser/README.txt"') .addFile('Untitled8.sol', sources[7]['browser/Untitled8.sol']) diff --git a/apps/remix-ide/ci/makeMockCompiler.js b/apps/remix-ide/ci/makeMockCompiler.js index 45387a80d64..3cd5c9ab1ac 100644 --- a/apps/remix-ide/ci/makeMockCompiler.js +++ b/apps/remix-ide/ci/makeMockCompiler.js @@ -3,7 +3,7 @@ var fs = require('fs') var compiler = require('solc') var compilerInput = require('@remix-project/remix-solidity').CompilerInput -var defaultVersion = 'v0.7.4+commit.3f05b770' +var defaultVersion = 'soljson-v0.8.1+commit.df193b15.js' const path = require('path') compiler.loadRemoteVersion(defaultVersion, (error, solcSnapshot) => { diff --git a/apps/remix-ide/src/app/tabs/compileTab/compilerContainer.js b/apps/remix-ide/src/app/tabs/compileTab/compilerContainer.js index 9eb51e3e861..28a864a7c0e 100644 --- a/apps/remix-ide/src/app/tabs/compileTab/compilerContainer.js +++ b/apps/remix-ide/src/app/tabs/compileTab/compilerContainer.js @@ -23,7 +23,7 @@ class CompilerContainer { timeout: 300, allversions: null, selectedVersion: null, - defaultVersion: 'soljson-v0.7.4+commit.3f05b770.js' // this default version is defined: in makeMockCompiler (for browser test) + defaultVersion: 'soljson-v0.8.1+commit.df193b15.js' // this default version is defined: in makeMockCompiler (for browser test) } } diff --git a/package.json b/package.json index 24717dc5657..a02ce0b6e6b 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "bumpVersion:libs": "gulp & gulp syncLibVersions;", "browsertest": "sleep 5 && npm run nightwatch_local", "csslint": "csslint --ignore=order-alphabetical --errors='errors,duplicate-properties,empty-rules' --exclude-list='apps/remix-ide/src/assets/css/font-awesome.min.css' apps/remix-ide/src/assets/css/", - "downloadsolc_assets": "wget --no-check-certificate https://solc-bin.ethereum.org/bin/soljson-v0.7.4+commit.3f05b770.js -O ./apps/remix-ide/src/assets/js/soljson.js", + "downloadsolc_assets": "wget --no-check-certificate https://solc-bin.ethereum.org/bin/soljson-v0.8.1+commit.df193b15.js -O ./apps/remix-ide/src/assets/js/soljson.js", "make-mock-compiler": "node apps/remix-ide/ci/makeMockCompiler.js", "minify": "uglifyjs --in-source-map inline --source-map-inline -c warnings=false", "nightwatch_parallel": "npm run build:e2e & nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js --env=chrome,firefox", From 24b0798ea804297b3521363a7a594db74ef3193d Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Tue, 16 Feb 2021 19:28:16 +0530 Subject: [PATCH 02/25] example contracts updated for pragma --- apps/remix-ide/src/app/editor/examples.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/remix-ide/src/app/editor/examples.js b/apps/remix-ide/src/app/editor/examples.js index dc29a51d74e..5b63d1a4965 100644 --- a/apps/remix-ide/src/app/editor/examples.js +++ b/apps/remix-ide/src/app/editor/examples.js @@ -2,7 +2,7 @@ const storage = `// SPDX-License-Identifier: GPL-3.0 -pragma solidity >=0.7.0 <0.8.0; +pragma solidity >=0.7.0 <0.9.0; /** * @title Storage @@ -31,7 +31,7 @@ contract Storage { const owner = `// SPDX-License-Identifier: GPL-3.0 -pragma solidity >=0.7.0 <0.8.0; +pragma solidity >=0.7.0 <0.9.0; /** * @title Owner @@ -83,7 +83,7 @@ contract Owner { const ballot = `// SPDX-License-Identifier: GPL-3.0 -pragma solidity >=0.7.0 <0.8.0; +pragma solidity >=0.7.0 <0.9.0; /** * @title Ballot @@ -223,7 +223,7 @@ contract Ballot { const ballotTest = `// SPDX-License-Identifier: GPL-3.0 -pragma solidity >=0.7.0 <0.8.0; +pragma solidity >=0.7.0 <0.9.0; import "remix_tests.sol"; // this import is automatically injected by Remix. import "../contracts/3_Ballot.sol"; From 1b806c98faa2817b06fd7adeb67f1441b9f7381e Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Tue, 16 Feb 2021 19:29:02 +0530 Subject: [PATCH 03/25] example contracts updated for tests --- apps/remix-ide-e2e/src/examples/example-contracts.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/remix-ide-e2e/src/examples/example-contracts.ts b/apps/remix-ide-e2e/src/examples/example-contracts.ts index 467f35ca3dd..3ab12305e2c 100644 --- a/apps/remix-ide-e2e/src/examples/example-contracts.ts +++ b/apps/remix-ide-e2e/src/examples/example-contracts.ts @@ -1,6 +1,6 @@ 'use strict' -const storage = `pragma solidity >=0.7.0 <0.8.0; +const storage = `pragma solidity >=0.7.0 <0.9.0; /** * @title Storage @@ -27,7 +27,7 @@ contract Storage { } }` -const owner = `pragma solidity >=0.7.0 <0.8.0; +const owner = `pragma solidity >=0.7.0 <0.9.0; /** * @title Owner @@ -77,7 +77,7 @@ contract Owner { } }` -const ballot = `pragma solidity >=0.7.0 <0.8.0; +const ballot = `pragma solidity >=0.7.0 <0.9.0; /** * @title Ballot @@ -281,7 +281,7 @@ contract Ballot { } }` -const ballotTest = `pragma solidity >=0.4.22 <0.8.0; +const ballotTest = `pragma solidity >=0.4.22 <0.9.0; import "remix_tests.sol"; // this import is automatically injected by Remix. import "../3_Ballot.sol"; From 810859576e5e79d855e1c194fb2dd6a6261e0825 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Tue, 16 Feb 2021 19:51:10 +0530 Subject: [PATCH 04/25] pragma updated in e2e tests --- apps/remix-ide-e2e/src/tests/debugger.test.ts | 2 +- apps/remix-ide-e2e/src/tests/fileManager_api.test.ts | 2 +- apps/remix-ide-e2e/src/tests/signingMessage.test.ts | 2 +- apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts | 8 ++++---- apps/remix-ide/src/app/tabs/testTab/testTab.js | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/debugger.test.ts b/apps/remix-ide-e2e/src/tests/debugger.test.ts index e28b0fa7751..cf5cfd96053 100644 --- a/apps/remix-ide-e2e/src/tests/debugger.test.ts +++ b/apps/remix-ide-e2e/src/tests/debugger.test.ts @@ -219,7 +219,7 @@ const sources = [ { 'browser/blah.sol': { content: ` - pragma solidity >=0.7.0 <0.8.0; + pragma solidity >=0.7.0 <0.9.0; contract Kickstarter { 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 df7d0106a61..651bb2aeedf 100644 --- a/apps/remix-ide-e2e/src/tests/fileManager_api.test.ts +++ b/apps/remix-ide-e2e/src/tests/fileManager_api.test.ts @@ -55,7 +55,7 @@ module.exports = { .addFile('copyFile.js', { content: executeCopyFile }) .executeScript('remix.exeCurrent()') .pause(2000) - .journalLastChildIncludes('pragma solidity >=0.7.0 <0.8.0;') + .journalLastChildIncludes('pragma solidity >=0.7.0 <0.9.0;') }, 'Should execute `rename` api from file manager external api': function (browser: NightwatchBrowser) { diff --git a/apps/remix-ide-e2e/src/tests/signingMessage.test.ts b/apps/remix-ide-e2e/src/tests/signingMessage.test.ts index 41e834352ab..c25179ecb66 100644 --- a/apps/remix-ide-e2e/src/tests/signingMessage.test.ts +++ b/apps/remix-ide-e2e/src/tests/signingMessage.test.ts @@ -59,7 +59,7 @@ const sources = [ { 'browser/signMassage.sol': { content: ` - pragma solidity >=0.4.22 <0.8.0; + pragma solidity >=0.4.22 <0.9.0; contract SignMassageTest { function testRecovery(bytes32 h, uint8 v, bytes32 r, bytes32 s) public pure returns (address) { return ecrecover(h, v, r, s); diff --git a/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts b/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts index d75408dd032..c2f0daf2c52 100644 --- a/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts +++ b/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts @@ -185,7 +185,7 @@ const sources = [ { 'browser/simple_storage.sol': { content: ` - pragma solidity >=0.4.22 <0.8.0; + pragma solidity >=0.4.22 <0.9.0; contract SimpleStorage { uint public storedData; @@ -206,7 +206,7 @@ const sources = [ }, 'browser/tests/simple_storage_test.sol': { content: ` - pragma solidity >=0.4.22 <0.8.0; + pragma solidity >=0.4.22 <0.9.0; import "remix_tests.sol"; import "../simple_storage.sol"; @@ -235,7 +235,7 @@ const sources = [ }, 'browser/ks2a.sol': { content: ` - pragma solidity >=0.4.22 <0.8.0; + pragma solidity >=0.4.22 <0.9.0; contract Kickstarter { enum State { Started, Completed } @@ -289,7 +289,7 @@ const sources = [ }, 'browser/tests/ks2b_test.sol': { content: ` - pragma solidity >=0.4.22 <0.8.0; + pragma solidity >=0.4.22 <0.9.0; pragma experimental ABIEncoderV2; import "remix_tests.sol"; // this import is automatically injected by Remix. diff --git a/apps/remix-ide/src/app/tabs/testTab/testTab.js b/apps/remix-ide/src/app/tabs/testTab/testTab.js index 80dafb08f65..7d81108c4a7 100644 --- a/apps/remix-ide/src/app/tabs/testTab/testTab.js +++ b/apps/remix-ide/src/app/tabs/testTab/testTab.js @@ -64,7 +64,7 @@ class TestTabLogic { const comment = hasCurrent ? `import "${relative}/${remixPath.basename(fileToImport)}";` : '// Import here the file to test.' return `// SPDX-License-Identifier: GPL-3.0 -pragma solidity >=0.4.22 <0.8.0; +pragma solidity >=0.4.22 <0.9.0; import "remix_tests.sol"; // this import is automatically injected by Remix. import "remix_accounts.sol"; ${comment} From 216cf1a9bf907096cb22a0be9e5b2868adc855fb Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Tue, 16 Feb 2021 21:38:33 +0530 Subject: [PATCH 05/25] e2e tests fix --- apps/remix-ide-e2e/src/tests/debugger.test.ts | 12 ++++++------ apps/remix-ide-e2e/src/tests/runAndDeploy.ts | 2 +- apps/remix-ide-e2e/src/tests/solidityImport.test.ts | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/debugger.test.ts b/apps/remix-ide-e2e/src/tests/debugger.test.ts index cf5cfd96053..6b3950b6ff5 100644 --- a/apps/remix-ide-e2e/src/tests/debugger.test.ts +++ b/apps/remix-ide-e2e/src/tests/debugger.test.ts @@ -16,7 +16,7 @@ module.exports = { 'Should launch debugger': function (browser: NightwatchBrowser) { browser.addFile('blah.sol', sources[0]['browser/blah.sol']) .clickLaunchIcon('udapp') - .waitForElementPresent('*[title="Deploy - transact (not payable)"]', 45000) + .waitForElementPresent('*[title="Deploy - transact (not payable)"]', 65000) .click('*[title="Deploy - transact (not payable)"]') .debugTransaction(0) .assert.containsText('*[data-id="sidePanelSwapitTitle"]', 'DEBUGGER') @@ -45,7 +45,7 @@ module.exports = { .pause(2000) .click('*[data-id="dropdownPanelSolidityLocals"]') .assert.containsText('*[data-id="solidityLocals"]', 'no locals') - .assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n92') + .assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n173') }, 'Should step back and forward transaction': function (browser: NightwatchBrowser) { @@ -53,12 +53,12 @@ module.exports = { .waitForElementPresent('*[data-id="buttonNavigatorIntoBack"]') .scrollAndClick('*[data-id="buttonNavigatorIntoBack"]') .pause(2000) - .assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n91') - .assert.containsText('*[data-id="stepdetail"]', 'execution step:\n91') + .assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n172') + .assert.containsText('*[data-id="stepdetail"]', 'execution step:\n172') .click('*[data-id="buttonNavigatorIntoForward"]') .pause(2000) - .assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n92') - .assert.containsText('*[data-id="stepdetail"]', 'execution step:\n92') + .assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n173') + .assert.containsText('*[data-id="stepdetail"]', 'execution step:\n173') }, 'Should jump through breakpoints': function (browser: NightwatchBrowser) { diff --git a/apps/remix-ide-e2e/src/tests/runAndDeploy.ts b/apps/remix-ide-e2e/src/tests/runAndDeploy.ts index cf94e72a46c..784ea166041 100644 --- a/apps/remix-ide-e2e/src/tests/runAndDeploy.ts +++ b/apps/remix-ide-e2e/src/tests/runAndDeploy.ts @@ -208,7 +208,7 @@ const sources = [ 'browser/Greet.sol': { content: ` - pragma solidity ^0.7.0; + pragma solidity ^0.8.0; contract helloWorld { string public message; diff --git a/apps/remix-ide-e2e/src/tests/solidityImport.test.ts b/apps/remix-ide-e2e/src/tests/solidityImport.test.ts index 1c8543fdaa4..f7c42851e1a 100644 --- a/apps/remix-ide-e2e/src/tests/solidityImport.test.ts +++ b/apps/remix-ide-e2e/src/tests/solidityImport.test.ts @@ -66,7 +66,7 @@ module.exports = { 'Test switch to a github import from a solidity warning': function (browser: NightwatchBrowser) { browser - .setSolidityCompilerVersion('soljson-v0.8.1+commit.df193b15.js') + .setSolidityCompilerVersion('soljson-v0.7.4+commit.3f05b770.js') .clickLaunchIcon('fileExplorers') .click('li[data-id="treeViewLitreeViewItembrowser/README.txt"') .addFile('Untitled8.sol', sources[7]['browser/Untitled8.sol']) From 04f734ff242a16e9e729c432b066e8fd4853e86c Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Wed, 17 Feb 2021 16:18:52 +0530 Subject: [PATCH 06/25] deploy and run tests fixed --- apps/remix-ide-e2e/src/tests/runAndDeploy.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/runAndDeploy.ts b/apps/remix-ide-e2e/src/tests/runAndDeploy.ts index 784ea166041..8c24ae3bb84 100644 --- a/apps/remix-ide-e2e/src/tests/runAndDeploy.ts +++ b/apps/remix-ide-e2e/src/tests/runAndDeploy.ts @@ -55,9 +55,9 @@ module.exports = { .waitForElementPresent('*[data-id="Deploy - transact (not payable)"]', 45000) .click('*[data-id="Deploy - transact (not payable)"]') .pause(5000) - .testFunction('0x82f6c88a909b49d6cc003fb302a6e0184c3f08e942b62e1c95dec326d4c6020b', { + .testFunction('0xcc391e151ace69f4cfb51cda42fb6c2e1092f28c8c2757af20b1aae5ec076ead', { status: 'true Transaction mined and execution succeed', - 'transaction hash': '0x82f6c88a909b49d6cc003fb302a6e0184c3f08e942b62e1c95dec326d4c6020b' + 'transaction hash': '0xcc391e151ace69f4cfb51cda42fb6c2e1092f28c8c2757af20b1aae5ec076ead' }) }, From dbd4b5e43a1c210c6f9e74421968b2413c01f525 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Wed, 17 Feb 2021 23:51:33 +0530 Subject: [PATCH 07/25] transactionExecution e2e tests fixed --- apps/remix-ide-e2e/src/tests/transactionExecution.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide-e2e/src/tests/transactionExecution.test.ts b/apps/remix-ide-e2e/src/tests/transactionExecution.test.ts index 9e3cd64d8f4..6445ba38b3d 100644 --- a/apps/remix-ide-e2e/src/tests/transactionExecution.test.ts +++ b/apps/remix-ide-e2e/src/tests/transactionExecution.test.ts @@ -178,7 +178,7 @@ const sources = [ _a = msg.sender; } - function retunValues2 () public returns (byte _b, bytes2 _b2, bytes3 _b3, bytes memory _blit, bytes5 _b5, bytes6 _b6, string memory _str, bytes7 _b7, bytes22 _b22, bytes32 _b32) { + function retunValues2 () public returns (bytes1 _b, bytes2 _b2, bytes3 _b3, bytes memory _blit, bytes5 _b5, bytes6 _b6, string memory _str, bytes7 _b7, bytes22 _b22, bytes32 _b32) { _b = 0x12; _b2 = 0x1223; _b5 = hex"043245"; From 71df3697a587d96bc1e1340447c1d6d4ba6916a1 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Thu, 18 Feb 2021 14:53:56 +0530 Subject: [PATCH 08/25] ballot debug e2e tests --- apps/remix-ide-e2e/src/tests/ballot.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/ballot.test.ts b/apps/remix-ide-e2e/src/tests/ballot.test.ts index 47281970067..298e4d8c006 100644 --- a/apps/remix-ide-e2e/src/tests/ballot.test.ts +++ b/apps/remix-ide-e2e/src/tests/ballot.test.ts @@ -39,9 +39,9 @@ module.exports = { 'Debug Ballot / delegate': function (browser: NightwatchBrowser) { browser.pause(500) .click('*[data-id="txLoggerDebugButton0x41fab8ea5b1d9fba5e0a6545ca1a2d62fff518578802c033c2b9a031a01c31b3"]') - .waitForElementVisible('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]') + // .waitForElementVisible('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]') // .clickLaunchIcon('debugger') - .click('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]') + // .click('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]') .pause(2000) .waitForElementVisible('#stepdetail') .goToVMTraceStep(79) From b63fd11c180e9e2b435ab023e77be371d5ff4ae8 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Thu, 18 Feb 2021 20:26:36 +0530 Subject: [PATCH 09/25] ballot debug with state and locals --- apps/remix-ide-e2e/src/tests/ballot.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/ballot.test.ts b/apps/remix-ide-e2e/src/tests/ballot.test.ts index 298e4d8c006..df0cefecfe6 100644 --- a/apps/remix-ide-e2e/src/tests/ballot.test.ts +++ b/apps/remix-ide-e2e/src/tests/ballot.test.ts @@ -44,8 +44,8 @@ module.exports = { // .click('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]') .pause(2000) .waitForElementVisible('#stepdetail') - .goToVMTraceStep(79) - .pause(1000) + // .goToVMTraceStep(79) + // .pause(1000) .checkVariableDebug('soliditystate', stateCheck) .checkVariableDebug('soliditylocals', localsCheck) }, From bc6c7e85e0ef89929e74b77eb4776d9f57c299a7 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Thu, 18 Feb 2021 21:18:29 +0530 Subject: [PATCH 10/25] debugger breakpoint test fixed --- apps/remix-ide-e2e/src/tests/debugger.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/debugger.test.ts b/apps/remix-ide-e2e/src/tests/debugger.test.ts index 6b3950b6ff5..482d91c1bf0 100644 --- a/apps/remix-ide-e2e/src/tests/debugger.test.ts +++ b/apps/remix-ide-e2e/src/tests/debugger.test.ts @@ -72,8 +72,8 @@ module.exports = { .assert.containsText('*[data-id="stepdetail"]', 'execution step:\n0') .click('*[data-id="buttonNavigatorJumpNextBreakpoint"]') .pause(2000) - .assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n184') - .assert.containsText('*[data-id="stepdetail"]', 'execution step:\n184') + .assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n348') + .assert.containsText('*[data-id="stepdetail"]', 'execution step:\n348') }, 'Should display solidity imported code while debugging github import': function (browser: NightwatchBrowser) { From 3bccbd8073b92a163083fd9407b7ad5cef964482 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Fri, 19 Feb 2021 13:40:03 +0530 Subject: [PATCH 11/25] increased pause --- apps/remix-ide-e2e/src/tests/debugger.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide-e2e/src/tests/debugger.test.ts b/apps/remix-ide-e2e/src/tests/debugger.test.ts index 482d91c1bf0..8c0d3f3f945 100644 --- a/apps/remix-ide-e2e/src/tests/debugger.test.ts +++ b/apps/remix-ide-e2e/src/tests/debugger.test.ts @@ -71,7 +71,7 @@ module.exports = { .assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n0') .assert.containsText('*[data-id="stepdetail"]', 'execution step:\n0') .click('*[data-id="buttonNavigatorJumpNextBreakpoint"]') - .pause(2000) + .pause(10000) .assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n348') .assert.containsText('*[data-id="stepdetail"]', 'execution step:\n348') }, From 95aa1b7da4816fcf6f1b159cad90d8022e0d9463 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Fri, 19 Feb 2021 14:53:44 +0530 Subject: [PATCH 12/25] debugger tests fix --- apps/remix-ide-e2e/src/tests/debugger.test.ts | 108 +++++++++--------- 1 file changed, 54 insertions(+), 54 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/debugger.test.ts b/apps/remix-ide-e2e/src/tests/debugger.test.ts index 8c0d3f3f945..adf58cc08dc 100644 --- a/apps/remix-ide-e2e/src/tests/debugger.test.ts +++ b/apps/remix-ide-e2e/src/tests/debugger.test.ts @@ -22,59 +22,59 @@ module.exports = { .assert.containsText('*[data-id="sidePanelSwapitTitle"]', 'DEBUGGER') }, - 'Should debug failing transaction': function (browser: NightwatchBrowser) { - browser.waitForElementVisible('*[data-id="verticalIconsKindudapp"]') - .clickLaunchIcon('udapp') - .waitForElementPresent('*[data-id="universalDappUiTitleExpander"]') - .click('*[data-id="universalDappUiTitleExpander"]') - .scrollAndClick('*[title="string name, uint256 goal"]') - .setValue('*[title="string name, uint256 goal"]', '"toast", 999') - .click('*[data-id="createProject - transact (not payable)"]') - .debugTransaction(1) - .pause(2000) - .scrollAndClick('*[data-id="solidityLocals"]') - .assert.containsText('*[data-id="solidityLocals"]', 'toast') - .assert.containsText('*[data-id="solidityLocals"]', '999') - }, + // 'Should debug failing transaction': function (browser: NightwatchBrowser) { + // browser.waitForElementVisible('*[data-id="verticalIconsKindudapp"]') + // .clickLaunchIcon('udapp') + // .waitForElementPresent('*[data-id="universalDappUiTitleExpander"]') + // .click('*[data-id="universalDappUiTitleExpander"]') + // .scrollAndClick('*[title="string name, uint256 goal"]') + // .setValue('*[title="string name, uint256 goal"]', '"toast", 999') + // .click('*[data-id="createProject - transact (not payable)"]') + // .debugTransaction(1) + // .pause(2000) + // .scrollAndClick('*[data-id="solidityLocals"]') + // .assert.containsText('*[data-id="solidityLocals"]', 'toast') + // .assert.containsText('*[data-id="solidityLocals"]', '999') + // }, - 'Should debug transaction using slider': function (browser: NightwatchBrowser) { - browser.waitForElementVisible('*[data-id="verticalIconsKindudapp"]') - .waitForElementVisible('*[data-id="slider"]') - .click('*[data-id="slider"]') - .setValue('*[data-id="slider"]', '50') - .pause(2000) - .click('*[data-id="dropdownPanelSolidityLocals"]') - .assert.containsText('*[data-id="solidityLocals"]', 'no locals') - .assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n173') - }, + // 'Should debug transaction using slider': function (browser: NightwatchBrowser) { + // browser.waitForElementVisible('*[data-id="verticalIconsKindudapp"]') + // .waitForElementVisible('*[data-id="slider"]') + // .click('*[data-id="slider"]') + // .setValue('*[data-id="slider"]', '50') + // .pause(2000) + // .click('*[data-id="dropdownPanelSolidityLocals"]') + // .assert.containsText('*[data-id="solidityLocals"]', 'no locals') + // .assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n173') + // }, - 'Should step back and forward transaction': function (browser: NightwatchBrowser) { - browser.waitForElementVisible('*[data-id="verticalIconsKindudapp"]') - .waitForElementPresent('*[data-id="buttonNavigatorIntoBack"]') - .scrollAndClick('*[data-id="buttonNavigatorIntoBack"]') - .pause(2000) - .assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n172') - .assert.containsText('*[data-id="stepdetail"]', 'execution step:\n172') - .click('*[data-id="buttonNavigatorIntoForward"]') - .pause(2000) - .assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n173') - .assert.containsText('*[data-id="stepdetail"]', 'execution step:\n173') - }, + // 'Should step back and forward transaction': function (browser: NightwatchBrowser) { + // browser.waitForElementVisible('*[data-id="verticalIconsKindudapp"]') + // .waitForElementPresent('*[data-id="buttonNavigatorIntoBack"]') + // .scrollAndClick('*[data-id="buttonNavigatorIntoBack"]') + // .pause(2000) + // .assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n172') + // .assert.containsText('*[data-id="stepdetail"]', 'execution step:\n172') + // .click('*[data-id="buttonNavigatorIntoForward"]') + // .pause(2000) + // .assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n173') + // .assert.containsText('*[data-id="stepdetail"]', 'execution step:\n173') + // }, - 'Should jump through breakpoints': function (browser: NightwatchBrowser) { - browser.waitForElementVisible('*[data-id="editorInput"]') - .click('.ace_gutter-cell:nth-of-type(10)') - .click('.ace_gutter-cell:nth-of-type(20)') - .waitForElementVisible('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]') - .click('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]') - .pause(2000) - .assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n0') - .assert.containsText('*[data-id="stepdetail"]', 'execution step:\n0') - .click('*[data-id="buttonNavigatorJumpNextBreakpoint"]') - .pause(10000) - .assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n348') - .assert.containsText('*[data-id="stepdetail"]', 'execution step:\n348') - }, + // 'Should jump through breakpoints': function (browser: NightwatchBrowser) { + // browser.waitForElementVisible('*[data-id="editorInput"]') + // .click('.ace_gutter-cell:nth-of-type(10)') + // .click('.ace_gutter-cell:nth-of-type(20)') + // .waitForElementVisible('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]') + // .click('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]') + // .pause(2000) + // .assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n0') + // .assert.containsText('*[data-id="stepdetail"]', 'execution step:\n0') + // .click('*[data-id="buttonNavigatorJumpNextBreakpoint"]') + // .pause(10000) + // .assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n348') + // .assert.containsText('*[data-id="stepdetail"]', 'execution step:\n348') + // }, 'Should display solidity imported code while debugging github import': function (browser: NightwatchBrowser) { browser @@ -166,7 +166,7 @@ module.exports = { 'Should debug using generated sources': function (browser: NightwatchBrowser) { browser .clickLaunchIcon('solidity') - .setSolidityCompilerVersion('soljson-v0.7.2+commit.51b20bc0.js') + // .setSolidityCompilerVersion('soljson-v0.7.2+commit.51b20bc0.js') .pause(2000) .testContracts('withGeneratedSources.sol', sources[4]['browser/withGeneratedSources.sol'], ['A']) .clickLaunchIcon('udapp') @@ -279,7 +279,7 @@ const sources = [ { 'browser/locals.sol': { content: ` - pragma solidity ^0.7.0; + pragma solidity ^0.8.0; contract testLocals { function t () public { uint[] memory array = new uint[](150); @@ -369,9 +369,9 @@ const localVariable_step717_ABIEncoder = { // eslint-disable-line } } -const jsGetTrace = `(async () => { +const jsGetTrace = `(async () => { try { - const result = await remix.call('debugger', 'getTrace', '0xb175c3c9a9cd6bee3b6cc8be3369a945ac9611516005f8cba27a43486ff2bc50') + const result = await remix.call('debugger', 'getTrace', '0x84a147f7cb39628f7aa586c61ef6a899bcab71ed504b0229d5dd050dda5bd2ca') console.log('result ', result) } catch (e) { console.log(e.message) From f5abff562a8795ba41ed886e15fdd464218bea87 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Fri, 19 Feb 2021 16:15:42 +0530 Subject: [PATCH 13/25] uncomment tests --- apps/remix-ide-e2e/src/tests/debugger.test.ts | 100 +++++++++--------- 1 file changed, 50 insertions(+), 50 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/debugger.test.ts b/apps/remix-ide-e2e/src/tests/debugger.test.ts index adf58cc08dc..4b449ae30bf 100644 --- a/apps/remix-ide-e2e/src/tests/debugger.test.ts +++ b/apps/remix-ide-e2e/src/tests/debugger.test.ts @@ -22,59 +22,59 @@ module.exports = { .assert.containsText('*[data-id="sidePanelSwapitTitle"]', 'DEBUGGER') }, - // 'Should debug failing transaction': function (browser: NightwatchBrowser) { - // browser.waitForElementVisible('*[data-id="verticalIconsKindudapp"]') - // .clickLaunchIcon('udapp') - // .waitForElementPresent('*[data-id="universalDappUiTitleExpander"]') - // .click('*[data-id="universalDappUiTitleExpander"]') - // .scrollAndClick('*[title="string name, uint256 goal"]') - // .setValue('*[title="string name, uint256 goal"]', '"toast", 999') - // .click('*[data-id="createProject - transact (not payable)"]') - // .debugTransaction(1) - // .pause(2000) - // .scrollAndClick('*[data-id="solidityLocals"]') - // .assert.containsText('*[data-id="solidityLocals"]', 'toast') - // .assert.containsText('*[data-id="solidityLocals"]', '999') - // }, + 'Should debug failing transaction': function (browser: NightwatchBrowser) { + browser.waitForElementVisible('*[data-id="verticalIconsKindudapp"]') + .clickLaunchIcon('udapp') + .waitForElementPresent('*[data-id="universalDappUiTitleExpander"]') + .click('*[data-id="universalDappUiTitleExpander"]') + .scrollAndClick('*[title="string name, uint256 goal"]') + .setValue('*[title="string name, uint256 goal"]', '"toast", 999') + .click('*[data-id="createProject - transact (not payable)"]') + .debugTransaction(1) + .pause(2000) + .scrollAndClick('*[data-id="solidityLocals"]') + .assert.containsText('*[data-id="solidityLocals"]', 'toast') + .assert.containsText('*[data-id="solidityLocals"]', '999') + }, - // 'Should debug transaction using slider': function (browser: NightwatchBrowser) { - // browser.waitForElementVisible('*[data-id="verticalIconsKindudapp"]') - // .waitForElementVisible('*[data-id="slider"]') - // .click('*[data-id="slider"]') - // .setValue('*[data-id="slider"]', '50') - // .pause(2000) - // .click('*[data-id="dropdownPanelSolidityLocals"]') - // .assert.containsText('*[data-id="solidityLocals"]', 'no locals') - // .assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n173') - // }, + 'Should debug transaction using slider': function (browser: NightwatchBrowser) { + browser.waitForElementVisible('*[data-id="verticalIconsKindudapp"]') + .waitForElementVisible('*[data-id="slider"]') + .click('*[data-id="slider"]') + .setValue('*[data-id="slider"]', '50') + .pause(2000) + .click('*[data-id="dropdownPanelSolidityLocals"]') + .assert.containsText('*[data-id="solidityLocals"]', 'no locals') + .assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n173') + }, - // 'Should step back and forward transaction': function (browser: NightwatchBrowser) { - // browser.waitForElementVisible('*[data-id="verticalIconsKindudapp"]') - // .waitForElementPresent('*[data-id="buttonNavigatorIntoBack"]') - // .scrollAndClick('*[data-id="buttonNavigatorIntoBack"]') - // .pause(2000) - // .assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n172') - // .assert.containsText('*[data-id="stepdetail"]', 'execution step:\n172') - // .click('*[data-id="buttonNavigatorIntoForward"]') - // .pause(2000) - // .assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n173') - // .assert.containsText('*[data-id="stepdetail"]', 'execution step:\n173') - // }, + 'Should step back and forward transaction': function (browser: NightwatchBrowser) { + browser.waitForElementVisible('*[data-id="verticalIconsKindudapp"]') + .waitForElementPresent('*[data-id="buttonNavigatorIntoBack"]') + .scrollAndClick('*[data-id="buttonNavigatorIntoBack"]') + .pause(2000) + .assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n172') + .assert.containsText('*[data-id="stepdetail"]', 'execution step:\n172') + .click('*[data-id="buttonNavigatorIntoForward"]') + .pause(2000) + .assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n173') + .assert.containsText('*[data-id="stepdetail"]', 'execution step:\n173') + }, - // 'Should jump through breakpoints': function (browser: NightwatchBrowser) { - // browser.waitForElementVisible('*[data-id="editorInput"]') - // .click('.ace_gutter-cell:nth-of-type(10)') - // .click('.ace_gutter-cell:nth-of-type(20)') - // .waitForElementVisible('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]') - // .click('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]') - // .pause(2000) - // .assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n0') - // .assert.containsText('*[data-id="stepdetail"]', 'execution step:\n0') - // .click('*[data-id="buttonNavigatorJumpNextBreakpoint"]') - // .pause(10000) - // .assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n348') - // .assert.containsText('*[data-id="stepdetail"]', 'execution step:\n348') - // }, + 'Should jump through breakpoints': function (browser: NightwatchBrowser) { + browser.waitForElementVisible('*[data-id="editorInput"]') + .click('.ace_gutter-cell:nth-of-type(10)') + .click('.ace_gutter-cell:nth-of-type(20)') + .waitForElementVisible('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]') + .click('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]') + .pause(2000) + .assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n0') + .assert.containsText('*[data-id="stepdetail"]', 'execution step:\n0') + .click('*[data-id="buttonNavigatorJumpNextBreakpoint"]') + .pause(10000) + .assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n348') + .assert.containsText('*[data-id="stepdetail"]', 'execution step:\n348') + }, 'Should display solidity imported code while debugging github import': function (browser: NightwatchBrowser) { browser From 89ac4fe9b1a40c40eb91cb6d5422ed06452795a6 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Tue, 23 Feb 2021 01:23:57 +0530 Subject: [PATCH 14/25] debugger locals array e2e test fixed --- apps/remix-ide-e2e/src/tests/debugger.test.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/debugger.test.ts b/apps/remix-ide-e2e/src/tests/debugger.test.ts index 4b449ae30bf..bffc0e6ef0a 100644 --- a/apps/remix-ide-e2e/src/tests/debugger.test.ts +++ b/apps/remix-ide-e2e/src/tests/debugger.test.ts @@ -154,8 +154,9 @@ module.exports = { .pause(2000) .debugTransaction(6) .waitForElementVisible('*[data-id="slider"]') - .click('*[data-id="slider"]') - .setValue('*[data-id="slider"]', '5000') + // .setValue('*[data-id="slider"]', '5000') // Like this, setValue doesn't work properly for input type = range + .execute(function(){ document.getElementById('slider')['value'] = "7450";}) // It only moves slider to 7450 but vm traces are not updated + .setValue('*[data-id="slider"]', new Array(3).fill(browser.Keys.RIGHT_ARROW)) // This will press NEXT 3 times and will update the trace details .waitForElementPresent('*[data-id="treeViewDivtreeViewItemarray"]') .click('*[data-id="treeViewDivtreeViewItemarray"]') .waitForElementPresent('*[data-id="treeViewDivtreeViewLoadMore"]') From 510cccfff98bd06d7e82931f8f1471f251893b2d Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Tue, 23 Feb 2021 01:52:06 +0530 Subject: [PATCH 15/25] debugger tests fixed --- apps/remix-ide-e2e/src/tests/debugger.test.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/debugger.test.ts b/apps/remix-ide-e2e/src/tests/debugger.test.ts index bffc0e6ef0a..2114ac575bd 100644 --- a/apps/remix-ide-e2e/src/tests/debugger.test.ts +++ b/apps/remix-ide-e2e/src/tests/debugger.test.ts @@ -167,7 +167,6 @@ module.exports = { 'Should debug using generated sources': function (browser: NightwatchBrowser) { browser .clickLaunchIcon('solidity') - // .setSolidityCompilerVersion('soljson-v0.7.2+commit.51b20bc0.js') .pause(2000) .testContracts('withGeneratedSources.sol', sources[4]['browser/withGeneratedSources.sol'], ['A']) .clickLaunchIcon('udapp') @@ -190,8 +189,8 @@ module.exports = { browser .addFile('test_jsGetTrace.js', { content: jsGetTrace }) .executeScript('remix.exeCurrent()') - .pause(3000) - .journalChildIncludes('{ "gas": "0x2dc6c0", "return": "0x", "structLogs":') + .pause(5000) + .journalChildIncludes('result { "gas": "0x5863", "return": "0x0000000000000000000000000000000000000000000000000000000000000000", "structLogs":') }, 'Should call the debugger api: debug': function (browser: NightwatchBrowser) { @@ -209,7 +208,7 @@ module.exports = { => There is something going wrong with the nightwatch API here. As we are only testing if debugger is active, this is ok to keep that for now. */ - .assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n9') + .assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n154') .end() }, @@ -372,7 +371,7 @@ const localVariable_step717_ABIEncoder = { // eslint-disable-line const jsGetTrace = `(async () => { try { - const result = await remix.call('debugger', 'getTrace', '0x84a147f7cb39628f7aa586c61ef6a899bcab71ed504b0229d5dd050dda5bd2ca') + const result = await remix.call('debugger', 'getTrace', '0x4c490499df52a3b5f238535a21c28ad35d261e2d53b80343ce78f59f5a63ec9e') console.log('result ', result) } catch (e) { console.log(e.message) @@ -381,7 +380,7 @@ const jsGetTrace = `(async () => { const jsDebug = `(async () => { try { - const result = await remix.call('debugger', 'debug', '0xb175c3c9a9cd6bee3b6cc8be3369a945ac9611516005f8cba27a43486ff2bc50') + const result = await remix.call('debugger', 'debug', '0x4c490499df52a3b5f238535a21c28ad35d261e2d53b80343ce78f59f5a63ec9e') console.log('result ', result) } catch (e) { console.log(e.message) From b1f9fcf2ec3700c8aeb46368ff7cafc35249ec07 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Tue, 23 Feb 2021 01:55:09 +0530 Subject: [PATCH 16/25] linting fixed --- apps/remix-ide-e2e/src/tests/debugger.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide-e2e/src/tests/debugger.test.ts b/apps/remix-ide-e2e/src/tests/debugger.test.ts index 2114ac575bd..c75574401d4 100644 --- a/apps/remix-ide-e2e/src/tests/debugger.test.ts +++ b/apps/remix-ide-e2e/src/tests/debugger.test.ts @@ -155,7 +155,7 @@ module.exports = { .debugTransaction(6) .waitForElementVisible('*[data-id="slider"]') // .setValue('*[data-id="slider"]', '5000') // Like this, setValue doesn't work properly for input type = range - .execute(function(){ document.getElementById('slider')['value'] = "7450";}) // It only moves slider to 7450 but vm traces are not updated + .execute(function () { document.getElementById('slider').value = '7450' }) // It only moves slider to 7450 but vm traces are not updated .setValue('*[data-id="slider"]', new Array(3).fill(browser.Keys.RIGHT_ARROW)) // This will press NEXT 3 times and will update the trace details .waitForElementPresent('*[data-id="treeViewDivtreeViewItemarray"]') .click('*[data-id="treeViewDivtreeViewItemarray"]') From 2a0d250e3ef5ac2880755c026c63a0b3594f6224 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Tue, 23 Feb 2021 02:12:03 +0530 Subject: [PATCH 17/25] linting update --- apps/remix-ide-e2e/src/tests/debugger.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/remix-ide-e2e/src/tests/debugger.test.ts b/apps/remix-ide-e2e/src/tests/debugger.test.ts index c75574401d4..e1da9f057bb 100644 --- a/apps/remix-ide-e2e/src/tests/debugger.test.ts +++ b/apps/remix-ide-e2e/src/tests/debugger.test.ts @@ -155,7 +155,8 @@ module.exports = { .debugTransaction(6) .waitForElementVisible('*[data-id="slider"]') // .setValue('*[data-id="slider"]', '5000') // Like this, setValue doesn't work properly for input type = range - .execute(function () { document.getElementById('slider').value = '7450' }) // It only moves slider to 7450 but vm traces are not updated + // eslint-disable-next-line dot-notation + .execute(function () { document.getElementById('slider')['value'] = '7450' }) // It only moves slider to 7450 but vm traces are not updated .setValue('*[data-id="slider"]', new Array(3).fill(browser.Keys.RIGHT_ARROW)) // This will press NEXT 3 times and will update the trace details .waitForElementPresent('*[data-id="treeViewDivtreeViewItemarray"]') .click('*[data-id="treeViewDivtreeViewItemarray"]') From b3c5820ef5bdc6845eb6df5b7df6d4785328eeb0 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Tue, 23 Feb 2021 13:44:19 +0530 Subject: [PATCH 18/25] debugger tests updated --- apps/remix-ide-e2e/src/tests/debugger.test.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/debugger.test.ts b/apps/remix-ide-e2e/src/tests/debugger.test.ts index e1da9f057bb..8455a744e48 100644 --- a/apps/remix-ide-e2e/src/tests/debugger.test.ts +++ b/apps/remix-ide-e2e/src/tests/debugger.test.ts @@ -79,9 +79,6 @@ module.exports = { 'Should display solidity imported code while debugging github import': function (browser: NightwatchBrowser) { browser .clickLaunchIcon('solidity') - .setSolidityCompilerVersion('soljson-v0.8.0+commit.c7dfd78e.js') - .pause(2000) - .clickLaunchIcon('udapp') .testContracts('externalImport.sol', sources[1]['browser/externalImport.sol'], ['ERC20']) .clickLaunchIcon('udapp') .waitForElementPresent('*[title="Deploy - transact (not payable)"]', 35000) @@ -110,7 +107,7 @@ module.exports = { .clickLaunchIcon('solidity') .setSolidityCompilerVersion('soljson-v0.6.12+commit.27d51765.js') .clickLaunchIcon('fileExplorers') - .click('li[data-id="treeViewLitreeViewItembrowser/externalImport.sol"') + .click('li[data-id="treeViewLitreeViewItembrowser/withABIEncoderV2.sol"') .testContracts('withABIEncoderV2.sol', sources[2]['browser/withABIEncoderV2.sol'], ['test']) .clickLaunchIcon('udapp') .selectContract('test') @@ -372,7 +369,7 @@ const localVariable_step717_ABIEncoder = { // eslint-disable-line const jsGetTrace = `(async () => { try { - const result = await remix.call('debugger', 'getTrace', '0x4c490499df52a3b5f238535a21c28ad35d261e2d53b80343ce78f59f5a63ec9e') + const result = await remix.call('debugger', 'getTrace', '0xbf309c0d71579d595f04a42e89d66d1ec17523dd3edea710b03f46a9b82ee0af') console.log('result ', result) } catch (e) { console.log(e.message) @@ -381,7 +378,7 @@ const jsGetTrace = `(async () => { const jsDebug = `(async () => { try { - const result = await remix.call('debugger', 'debug', '0x4c490499df52a3b5f238535a21c28ad35d261e2d53b80343ce78f59f5a63ec9e') + const result = await remix.call('debugger', 'debug', '0xbf309c0d71579d595f04a42e89d66d1ec17523dd3edea710b03f46a9b82ee0af') console.log('result ', result) } catch (e) { console.log(e.message) From 06eabbb1683deabf5d057eee1a0819adfc0a0ced Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Tue, 23 Feb 2021 15:47:46 +0530 Subject: [PATCH 19/25] tests update --- apps/remix-ide-e2e/src/tests/debugger.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide-e2e/src/tests/debugger.test.ts b/apps/remix-ide-e2e/src/tests/debugger.test.ts index 8455a744e48..5a5c2bd9654 100644 --- a/apps/remix-ide-e2e/src/tests/debugger.test.ts +++ b/apps/remix-ide-e2e/src/tests/debugger.test.ts @@ -107,7 +107,7 @@ module.exports = { .clickLaunchIcon('solidity') .setSolidityCompilerVersion('soljson-v0.6.12+commit.27d51765.js') .clickLaunchIcon('fileExplorers') - .click('li[data-id="treeViewLitreeViewItembrowser/withABIEncoderV2.sol"') + .click('li[data-id="treeViewLitreeViewItembrowser/externalImport.sol"') .testContracts('withABIEncoderV2.sol', sources[2]['browser/withABIEncoderV2.sol'], ['test']) .clickLaunchIcon('udapp') .selectContract('test') From b4ab488c55a0e34535a3a4d2f4d0d8f5d73f3ead Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Tue, 23 Feb 2021 20:44:24 +0530 Subject: [PATCH 20/25] slider setting updated --- apps/remix-ide-e2e/src/tests/debugger.test.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/debugger.test.ts b/apps/remix-ide-e2e/src/tests/debugger.test.ts index 5a5c2bd9654..26d8bd9c308 100644 --- a/apps/remix-ide-e2e/src/tests/debugger.test.ts +++ b/apps/remix-ide-e2e/src/tests/debugger.test.ts @@ -41,11 +41,13 @@ module.exports = { browser.waitForElementVisible('*[data-id="verticalIconsKindudapp"]') .waitForElementVisible('*[data-id="slider"]') .click('*[data-id="slider"]') - .setValue('*[data-id="slider"]', '50') + // eslint-disable-next-line dot-notation + .execute(function () { document.getElementById('slider')['value'] = '50' }) // It only moves slider to 50 but vm traces are not updated + .setValue('*[data-id="slider"]', new Array(1).fill(browser.Keys.RIGHT_ARROW)) .pause(2000) .click('*[data-id="dropdownPanelSolidityLocals"]') .assert.containsText('*[data-id="solidityLocals"]', 'no locals') - .assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n173') + .assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n51') }, 'Should step back and forward transaction': function (browser: NightwatchBrowser) { @@ -53,12 +55,12 @@ module.exports = { .waitForElementPresent('*[data-id="buttonNavigatorIntoBack"]') .scrollAndClick('*[data-id="buttonNavigatorIntoBack"]') .pause(2000) - .assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n172') - .assert.containsText('*[data-id="stepdetail"]', 'execution step:\n172') + .assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n50') + .assert.containsText('*[data-id="stepdetail"]', 'execution step:\n50') .click('*[data-id="buttonNavigatorIntoForward"]') .pause(2000) - .assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n173') - .assert.containsText('*[data-id="stepdetail"]', 'execution step:\n173') + .assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n51') + .assert.containsText('*[data-id="stepdetail"]', 'execution step:\n51') }, 'Should jump through breakpoints': function (browser: NightwatchBrowser) { From e298528a67a00ce82a8e7e579a3a6985bdc3cb25 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Tue, 23 Feb 2021 21:04:24 +0530 Subject: [PATCH 21/25] ballot tests updated --- apps/remix-ide-e2e/src/tests/ballot.test.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/ballot.test.ts b/apps/remix-ide-e2e/src/tests/ballot.test.ts index df0cefecfe6..695936b340d 100644 --- a/apps/remix-ide-e2e/src/tests/ballot.test.ts +++ b/apps/remix-ide-e2e/src/tests/ballot.test.ts @@ -39,13 +39,13 @@ module.exports = { 'Debug Ballot / delegate': function (browser: NightwatchBrowser) { browser.pause(500) .click('*[data-id="txLoggerDebugButton0x41fab8ea5b1d9fba5e0a6545ca1a2d62fff518578802c033c2b9a031a01c31b3"]') - // .waitForElementVisible('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]') - // .clickLaunchIcon('debugger') - // .click('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]') + .waitForElementVisible('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]') + .clickLaunchIcon('debugger') + .click('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]') .pause(2000) .waitForElementVisible('#stepdetail') - // .goToVMTraceStep(79) - // .pause(1000) + .goToVMTraceStep(144) + .pause(1000) .checkVariableDebug('soliditystate', stateCheck) .checkVariableDebug('soliditylocals', localsCheck) }, From 67e6db24b87e45f13d7191d216437f2b60ac51d6 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Tue, 23 Feb 2021 21:12:53 +0530 Subject: [PATCH 22/25] slider updated for debugger test --- apps/remix-ide-e2e/src/tests/debugger.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/debugger.test.ts b/apps/remix-ide-e2e/src/tests/debugger.test.ts index 26d8bd9c308..6d7f3db4a86 100644 --- a/apps/remix-ide-e2e/src/tests/debugger.test.ts +++ b/apps/remix-ide-e2e/src/tests/debugger.test.ts @@ -40,7 +40,6 @@ module.exports = { 'Should debug transaction using slider': function (browser: NightwatchBrowser) { browser.waitForElementVisible('*[data-id="verticalIconsKindudapp"]') .waitForElementVisible('*[data-id="slider"]') - .click('*[data-id="slider"]') // eslint-disable-next-line dot-notation .execute(function () { document.getElementById('slider')['value'] = '50' }) // It only moves slider to 50 but vm traces are not updated .setValue('*[data-id="slider"]', new Array(1).fill(browser.Keys.RIGHT_ARROW)) @@ -200,8 +199,9 @@ module.exports = { .pause(3000) .clickLaunchIcon('debugger') .waitForElementVisible('*[data-id="slider"]') - .click('*[data-id="slider"]') - .setValue('*[data-id="slider"]', '5') + // eslint-disable-next-line dot-notation + .execute(function () { document.getElementById('slider')['value'] = '153' }) // It only moves slider to 153 but vm traces are not updated + .setValue('*[data-id="slider"]', new Array(1).fill(browser.Keys.RIGHT_ARROW)) .pause(1000) /* setting the slider to 5 leads to "vm trace step: 91" for chrome and "vm trace step: 92" for firefox From 0e37544d00cd1431d05633e4d8cd1f30e747ec9c Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Tue, 23 Feb 2021 21:35:58 +0530 Subject: [PATCH 23/25] comment clicking on debugger icon --- apps/remix-ide-e2e/src/tests/ballot.test.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/remix-ide-e2e/src/tests/ballot.test.ts b/apps/remix-ide-e2e/src/tests/ballot.test.ts index 695936b340d..6bd028ef863 100644 --- a/apps/remix-ide-e2e/src/tests/ballot.test.ts +++ b/apps/remix-ide-e2e/src/tests/ballot.test.ts @@ -20,6 +20,8 @@ module.exports = { browser .waitForElementVisible('*[data-id="remixIdeIconPanel"]', 10000) .clickLaunchIcon('solidity') + .clickLaunchIcon('udapp') + .waitForElementVisible('*[data-id="Deploy - transact (not payable)"]', 105000) .testContracts('Untitled.sol', sources[0]['browser/Untitled.sol'], ['Ballot']) .clickLaunchIcon('udapp') .selectAccount('0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c') @@ -40,7 +42,7 @@ module.exports = { browser.pause(500) .click('*[data-id="txLoggerDebugButton0x41fab8ea5b1d9fba5e0a6545ca1a2d62fff518578802c033c2b9a031a01c31b3"]') .waitForElementVisible('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]') - .clickLaunchIcon('debugger') + // .clickLaunchIcon('debugger') .click('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]') .pause(2000) .waitForElementVisible('#stepdetail') From 4c40b06a1e436ae084528e737b37dc780c5b62e5 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Wed, 24 Feb 2021 00:03:30 +0530 Subject: [PATCH 24/25] removed extra lines --- apps/remix-ide-e2e/src/tests/ballot.test.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/ballot.test.ts b/apps/remix-ide-e2e/src/tests/ballot.test.ts index 6bd028ef863..f41d5d2f154 100644 --- a/apps/remix-ide-e2e/src/tests/ballot.test.ts +++ b/apps/remix-ide-e2e/src/tests/ballot.test.ts @@ -20,8 +20,6 @@ module.exports = { browser .waitForElementVisible('*[data-id="remixIdeIconPanel"]', 10000) .clickLaunchIcon('solidity') - .clickLaunchIcon('udapp') - .waitForElementVisible('*[data-id="Deploy - transact (not payable)"]', 105000) .testContracts('Untitled.sol', sources[0]['browser/Untitled.sol'], ['Ballot']) .clickLaunchIcon('udapp') .selectAccount('0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c') From c1cf2a57f67523e1e95729cf8351837a082fe443 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Wed, 24 Feb 2021 14:52:16 +0530 Subject: [PATCH 25/25] removed pause --- apps/remix-ide-e2e/src/tests/ballot.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide-e2e/src/tests/ballot.test.ts b/apps/remix-ide-e2e/src/tests/ballot.test.ts index f41d5d2f154..b58b3f0bb43 100644 --- a/apps/remix-ide-e2e/src/tests/ballot.test.ts +++ b/apps/remix-ide-e2e/src/tests/ballot.test.ts @@ -45,7 +45,7 @@ module.exports = { .pause(2000) .waitForElementVisible('#stepdetail') .goToVMTraceStep(144) - .pause(1000) + // .pause(1000) .checkVariableDebug('soliditystate', stateCheck) .checkVariableDebug('soliditylocals', localsCheck) },