From 5c713ba790df071d2cc6249ec203788b2c4028a0 Mon Sep 17 00:00:00 2001 From: yann300 Date: Tue, 27 Oct 2020 10:09:42 +0100 Subject: [PATCH] fix e2e tests --- .../src/commands/clickFunction.ts | 2 +- apps/remix-ide-e2e/src/tests/debugger.test.ts | 22 +++++++++++-------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/apps/remix-ide-e2e/src/commands/clickFunction.ts b/apps/remix-ide-e2e/src/commands/clickFunction.ts index 20e44766d4..12976f53d5 100644 --- a/apps/remix-ide-e2e/src/commands/clickFunction.ts +++ b/apps/remix-ide-e2e/src/commands/clickFunction.ts @@ -14,7 +14,7 @@ class ClickFunction extends EventEmitter { done() }) }) - .click('.instance button[title="' + fnFullName + '"]') + .scrollAndClick('.instance button[title="' + fnFullName + '"]') .pause(2000) .perform(() => { this.emit('complete') diff --git a/apps/remix-ide-e2e/src/tests/debugger.test.ts b/apps/remix-ide-e2e/src/tests/debugger.test.ts index 93bbae00f2..46cf2481c9 100644 --- a/apps/remix-ide-e2e/src/tests/debugger.test.ts +++ b/apps/remix-ide-e2e/src/tests/debugger.test.ts @@ -131,10 +131,14 @@ module.exports = { .goToVMTraceStep(717) .pause(5000) .checkVariableDebug('soliditylocals', localVariable_step717_ABIEncoder) // all locals should be initiaed + .clickLaunchIcon('udapp') + .clickInstance(2) }, 'Should load more solidity locals array': function (browser: NightwatchBrowser) { - browser.addFile('locals.sol', sources[3]['browser/locals.sol']) + browser + .clickLaunchIcon('solidity') + .testContracts('locals.sol', sources[3]['browser/locals.sol'], ['testLocals']) .clickLaunchIcon('udapp') .waitForElementPresent('*[title="Deploy - transact (not payable)"]', 40000) .createContract('') @@ -241,15 +245,15 @@ const sources = [ { 'browser/locals.sol': { content: ` - pragma solidity ^0.7.0; - contract test { - function t () public { - uint[] memory array = new uint[](150); - for (uint k = 0; k < 150; k++) { - array[k] = k; - } + pragma solidity ^0.7.0; + contract testLocals { + function t () public { + uint[] memory array = new uint[](150); + for (uint k = 0; k < 150; k++) { + array[k] = k; + } + } } - } ` } },