diff --git a/apps/remix-ide-e2e/src/tests/runAndDeploy.test.ts b/apps/remix-ide-e2e/src/tests/runAndDeploy.test.ts index c8f2277ba2..075bd0e05a 100644 --- a/apps/remix-ide-e2e/src/tests/runAndDeploy.test.ts +++ b/apps/remix-ide-e2e/src/tests/runAndDeploy.test.ts @@ -65,6 +65,21 @@ module.exports = { }) }, + 'Should show and update balance for deployed contract on JavascriptVM #group3': function (browser: NightwatchBrowser) { + browser.waitForElementVisible('*[data-id="remixIdeSidePanel"]') + .clickLaunchIcon('filePanel') + .addFile('checkBalance.sol', sources[0]['checkBalance.sol']) + .clickLaunchIcon('udapp') + .setValue('*[data-id="dandrValue"]', '111') + .waitForElementVisible('*[data-id="Deploy - transact (payable)"]', 45000) + .click('*[data-id="Deploy - transact (payable)"]') + .pause(1000) + .clickInstance(1) + .pause(1000) + .waitForElementVisible('*[data-id="instanceBal"]', 45000) + .assert.containsText('*[data-id="instanceBal"]', 'Balance') + }, + 'Should run low level interaction (fallback function) #group3': function (browser: NightwatchBrowser) { browser.waitForElementPresent('*[data-id="remixIdeSidePanel"]') .clickInstance(0) @@ -224,6 +239,17 @@ const sources = [ message = _message; } }` + }, + 'checkBalance.sol': { + content: `pragma solidity ^0.8.0; + contract checkBalance { + constructor () payable {} + + function sendSomeEther(uint256 num) public { + payable(msg.sender).transfer(num); + } + + }` } } ] diff --git a/libs/remix-ui/run-tab/src/lib/components/universalDappUI.tsx b/libs/remix-ui/run-tab/src/lib/components/universalDappUI.tsx index 3ac993bd23..d7cd9c09c3 100644 --- a/libs/remix-ui/run-tab/src/lib/components/universalDappUI.tsx +++ b/libs/remix-ui/run-tab/src/lib/components/universalDappUI.tsx @@ -236,7 +236,7 @@ export function UniversalDappUI (props: UdappProps) {