From 8df9d5e6a31b329d067c92c704ea599acf5acb32 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Thu, 27 May 2021 19:01:43 +0530 Subject: [PATCH] contract call tests for VM --- apps/remix-ide-e2e/src/tests/ballot.test.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/apps/remix-ide-e2e/src/tests/ballot.test.ts b/apps/remix-ide-e2e/src/tests/ballot.test.ts index 51174f84b1..1e7e6e72af 100644 --- a/apps/remix-ide-e2e/src/tests/ballot.test.ts +++ b/apps/remix-ide-e2e/src/tests/ballot.test.ts @@ -34,6 +34,19 @@ module.exports = { }) }, + 'Call method from Ballot to check return value': function (browser: NightwatchBrowser) { + browser + .clickFunction('winnerName - call') + // Test in terminal + .testFunction('last', + { + to: 'Ballot.winnerName() 0x692a70D2e424a56D2C6C27aA97D1a86395877b3A', + 'decoded output': { "0": "bytes32: winnerName_ 0x48656c6c6f20576f726c64210000000000000000000000000000000000000000" } + }) + // Test in Udapp UI + .assert.containsText('*[data-id="treeViewDiv0"]', "bytes32: winnerName_ 0x48656c6c6f20576f726c64210000000000000000000000000000000000000000") + }, + 'Debug Ballot / delegate': function (browser: NightwatchBrowser) { browser.pause(500) .click('*[data-id="txLoggerDebugButton0x41fab8ea5b1d9fba5e0a6545ca1a2d62fff518578802c033c2b9a031a01c31b3"]')