From c0af7c6447afcc9c708241ef87228f5746172d57 Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Thu, 19 Nov 2020 12:23:34 +0100 Subject: [PATCH 1/7] Added delay --- apps/remix-ide-e2e/src/tests/debugger.test.ts | 13 +++++++------ 1 file changed, 7 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 2cdef15587..3817717cad 100644 --- a/apps/remix-ide-e2e/src/tests/debugger.test.ts +++ b/apps/remix-ide-e2e/src/tests/debugger.test.ts @@ -44,8 +44,8 @@ module.exports = { .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:\n92') + // .assert.containsText('*[data-id="solidityLocals"]', 'no locals') + // .assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n92') }, '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:\n91') + // .assert.containsText('*[data-id="stepdetail"]', 'execution step:\n91') .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:\n92') + // .assert.containsText('*[data-id="stepdetail"]', 'execution step:\n92') }, 'Should jump through breakpoints': function (browser: NightwatchBrowser) { @@ -89,6 +89,7 @@ module.exports = { .debugTransaction(2) .pause(2000) .goToVMTraceStep(10) + .pause(10000) .getEditorValue((content) => { browser.assert.ok(content.indexOf(`constructor (string memory name, string memory symbol) public { _name = name; From abd12c498451eefa64f6c3fdb4feccbff6562a3f Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Thu, 19 Nov 2020 16:23:33 +0100 Subject: [PATCH 2/7] Fixed debugger test --- apps/remix-ide-e2e/src/tests/debugger.test.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/debugger.test.ts b/apps/remix-ide-e2e/src/tests/debugger.test.ts index 3817717cad..503156ea80 100644 --- a/apps/remix-ide-e2e/src/tests/debugger.test.ts +++ b/apps/remix-ide-e2e/src/tests/debugger.test.ts @@ -89,11 +89,10 @@ module.exports = { .debugTransaction(2) .pause(2000) .goToVMTraceStep(10) - .pause(10000) .getEditorValue((content) => { - browser.assert.ok(content.indexOf(`constructor (string memory name, string memory symbol) public { - _name = name; - _symbol = symbol; + browser.assert.ok(content.indexOf(`constructor (string memory name_, string memory symbol_) public { + _name = name_; + _symbol = symbol_; _decimals = 18; }`) != -1, 'current displayed content is not from the ERC20 source code') From c599d1cb081de638011d4533a1c83c1862c3cf94 Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Thu, 19 Nov 2020 16:36:00 +0100 Subject: [PATCH 3/7] Debug ci --- apps/remix-ide-e2e/src/tests/debugger.test.ts | 12 ++++++------ apps/remix-ide-e2e/src/tests/solidityImport.test.ts | 1 + 2 files changed, 7 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 503156ea80..a5616dfd7b 100644 --- a/apps/remix-ide-e2e/src/tests/debugger.test.ts +++ b/apps/remix-ide-e2e/src/tests/debugger.test.ts @@ -44,8 +44,8 @@ module.exports = { .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:\n92') + .assert.containsText('*[data-id="solidityLocals"]', 'no locals') + .assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n92') }, '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:\n91') + .assert.containsText('*[data-id="stepdetail"]', 'execution step:\n91') .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:\n92') + .assert.containsText('*[data-id="stepdetail"]', 'execution step:\n92') }, 'Should jump through breakpoints': function (browser: NightwatchBrowser) { diff --git a/apps/remix-ide-e2e/src/tests/solidityImport.test.ts b/apps/remix-ide-e2e/src/tests/solidityImport.test.ts index 587faa82b1..e2ff722c93 100644 --- a/apps/remix-ide-e2e/src/tests/solidityImport.test.ts +++ b/apps/remix-ide-e2e/src/tests/solidityImport.test.ts @@ -69,6 +69,7 @@ module.exports = { .waitForElementPresent('[data-id="compiledErrors"] div:nth-child(3)') .click('[data-id="compiledErrors"] div:nth-child(3)') // select the second warning which point to ERC20 code .getEditorValue((content) => { + console.log('content: ', content) browser.assert.ok(content.indexOf(`contract ERC20 is Context, IERC20`) != -1, 'current displayed content should be from the ERC20 source code') }) From fa1a13cf1488f01540ad18c0b46e72270156084c Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Fri, 20 Nov 2020 08:43:07 +0100 Subject: [PATCH 4/7] Add delay for file switch --- apps/remix-ide-e2e/src/tests/solidityImport.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide-e2e/src/tests/solidityImport.test.ts b/apps/remix-ide-e2e/src/tests/solidityImport.test.ts index e2ff722c93..f143789898 100644 --- a/apps/remix-ide-e2e/src/tests/solidityImport.test.ts +++ b/apps/remix-ide-e2e/src/tests/solidityImport.test.ts @@ -68,8 +68,8 @@ module.exports = { .clickLaunchIcon('solidity') .waitForElementPresent('[data-id="compiledErrors"] div:nth-child(3)') .click('[data-id="compiledErrors"] div:nth-child(3)') // select the second warning which point to ERC20 code + .pause(10000) .getEditorValue((content) => { - console.log('content: ', content) browser.assert.ok(content.indexOf(`contract ERC20 is Context, IERC20`) != -1, 'current displayed content should be from the ERC20 source code') }) From 0a4f72b0cd07107ff35038034e9d59d75ea92336 Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Fri, 20 Nov 2020 09:05:41 +0100 Subject: [PATCH 5/7] Update nth element --- apps/remix-ide-e2e/src/tests/solidityImport.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/solidityImport.test.ts b/apps/remix-ide-e2e/src/tests/solidityImport.test.ts index f143789898..e559e7805f 100644 --- a/apps/remix-ide-e2e/src/tests/solidityImport.test.ts +++ b/apps/remix-ide-e2e/src/tests/solidityImport.test.ts @@ -66,9 +66,9 @@ module.exports = { .addFile('Untitled8.sol', sources[7]['browser/Untitled8.sol']) .clickLaunchIcon('fileExplorers') .clickLaunchIcon('solidity') - .waitForElementPresent('[data-id="compiledErrors"] div:nth-child(3)') - .click('[data-id="compiledErrors"] div:nth-child(3)') // select the second warning which point to ERC20 code - .pause(10000) + .waitForElementPresent('[data-id="compiledErrors"] div:nth-child(4)') + .click('[data-id="compiledErrors"] div:nth-child(4)') // select the second warning which point to ERC20 code + .pause(5000) .getEditorValue((content) => { browser.assert.ok(content.indexOf(`contract ERC20 is Context, IERC20`) != -1, 'current displayed content should be from the ERC20 source code') From 97428113e4ac7c5bf5320b6c2bb7031f5fff5b64 Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Fri, 20 Nov 2020 10:09:18 +0100 Subject: [PATCH 6/7] Debug ci --- apps/remix-ide-e2e/src/commands/debugTransaction.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide-e2e/src/commands/debugTransaction.ts b/apps/remix-ide-e2e/src/commands/debugTransaction.ts index 57174d9a9c..85b2b24238 100644 --- a/apps/remix-ide-e2e/src/commands/debugTransaction.ts +++ b/apps/remix-ide-e2e/src/commands/debugTransaction.ts @@ -17,7 +17,7 @@ function checkStyle (browser: NightwatchBrowser, index: number, callback: VoidFu browser.pause(2000).execute(function (index: number) { const debugBtn = document.querySelectorAll('*[data-shared="txLoggerDebugButton"]')[index] as HTMLInputElement - debugBtn.click() + debugBtn && debugBtn.click() }, [index], function () { callback() }) From 445a86b0d84275b2db451d5452c7e29eda61e0cb Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Fri, 20 Nov 2020 10:14:06 +0100 Subject: [PATCH 7/7] Debug ci --- apps/remix-ide-e2e/src/commands/selectContract.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/remix-ide-e2e/src/commands/selectContract.ts b/apps/remix-ide-e2e/src/commands/selectContract.ts index b228ef85f6..b341f11bbd 100644 --- a/apps/remix-ide-e2e/src/commands/selectContract.ts +++ b/apps/remix-ide-e2e/src/commands/selectContract.ts @@ -15,6 +15,7 @@ class SelectContract extends EventEmitter { function selectContract (browser: NightwatchBrowser, contractName: string, callback: VoidFunction) { browser.clickLaunchIcon('settings').clickLaunchIcon('udapp') + .pause(10000) .setValue('#runTabView select[class^="contractNames"]', contractName).perform(() => { callback() })