From f44e32ef0cdf313899c408420fc0f3e6def13930 Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Tue, 11 Aug 2020 16:19:02 +0100 Subject: [PATCH] Fixed failing tests --- apps/remix-ide-e2e/src/commands/getAddressAtPosition.ts | 4 +++- apps/remix-ide-e2e/src/tests/publishContract.test.ts | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/remix-ide-e2e/src/commands/getAddressAtPosition.ts b/apps/remix-ide-e2e/src/commands/getAddressAtPosition.ts index f2f531d7c6..40319db14d 100644 --- a/apps/remix-ide-e2e/src/commands/getAddressAtPosition.ts +++ b/apps/remix-ide-e2e/src/commands/getAddressAtPosition.ts @@ -22,7 +22,9 @@ function getAddressAtPosition (browser: NightwatchBrowser, index: number, callba return id.replace('instance', '') }, [index], function (result) { - typeof result.value === 'string' && callback(result.value) + const pos = typeof result.value === 'string' ? result.value : null + + callback(pos) }) } diff --git a/apps/remix-ide-e2e/src/tests/publishContract.test.ts b/apps/remix-ide-e2e/src/tests/publishContract.test.ts index 2be4ac981d..3fa9e6c239 100644 --- a/apps/remix-ide-e2e/src/tests/publishContract.test.ts +++ b/apps/remix-ide-e2e/src/tests/publishContract.test.ts @@ -44,7 +44,7 @@ module.exports = { .clickLaunchIcon('fileExplorers') .openFile('browser/1_Storage.sol') .clickLaunchIcon('udapp') - .waitForElementVisible('*[data-id="contractDropdownIpfsCheckbox"]') + .waitForElementPresent('*[data-id="contractDropdownIpfsCheckbox"]') .click('*[data-id="contractDropdownIpfsCheckbox"]') .click('*[data-id="Deploy - transact (not payable)"]') .pause(5000) @@ -57,7 +57,7 @@ module.exports = { .refresh() .openFile('browser/1_Storage.sol') .clickLaunchIcon('udapp') - .waitForElementVisible('*[data-id="contractDropdownIpfsCheckbox"]') + .waitForElementPresent('*[data-id="contractDropdownIpfsCheckbox"]') .verify.elementPresent('*[data-id="contractDropdownIpfsCheckbox"]:checked') .end() },