pull/2748/head
Aniket-Engg 2 years ago committed by Aniket
parent 024f819084
commit bf1da2baf9
  1. 26
      apps/remix-ide-e2e/src/tests/runAndDeploy.test.ts
  2. 2
      libs/remix-ui/run-tab/src/lib/components/universalDappUI.tsx

@ -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);
}
}`
}
}
]

@ -236,7 +236,7 @@ export function UniversalDappUI (props: UdappProps) {
</div>
<div className="udapp_cActionsWrapper" data-id="universalDappUiContractActionWrapper">
<div className="udapp_contractActionsContainer">
<div data-id="instanceBalance" className="d-flex">
<div data-id="instanceBal" className="d-flex">
<label>Balance: {instanceBalance} ETH</label>
</div>
{

Loading…
Cancel
Save