|
|
|
@ -217,13 +217,30 @@ module.exports = { |
|
|
|
|
.addFile('scripts/log_tx_block.js', { content: scriptBlockAndTransaction } ) |
|
|
|
|
.pause(1000) |
|
|
|
|
.executeScriptInTerminal('remix.execute(\'scripts/log_tx_block.js\')') |
|
|
|
|
.pause(10000) |
|
|
|
|
// check if the input of the transaction is being logged (web3 call)
|
|
|
|
|
.journalChildIncludes('0x775526410000000000000000000000000000000000000000000000000000000000000060464c0335b2f1609abd9de25141c0a3b49db516fc7375970dc737c32b986e88e3000000000000000000000000000000000000000000000000000000000000039e000000000000000000000000000000000000000000000000000000000000000602926b30b10e7a514d92bc71e085f5bff2687fac2856ae43ef7621bf1756fa370516d310bec5727543089be9a4d5f68471174ee528e95a2520b0ca36c2b6c6eb0000000000000000000000000000000000000000000000000000000000046f49036f5e4ea4dd042801c8841e3db8e654124305da0f11824fc1db60c405dbb39f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000') |
|
|
|
|
.waitForElementContainsText('*[data-id="terminalJournal"]', '0x775526410000000000000000000000000000000000000000000000000000000000000060464c0335b2f1609abd9de25141c0a3b49db516fc7375970dc737c32b986e88e3000000000000000000000000000000000000000000000000000000000000039e000000000000000000000000000000000000000000000000000000000000000602926b30b10e7a514d92bc71e085f5bff2687fac2856ae43ef7621bf1756fa370516d310bec5727543089be9a4d5f68471174ee528e95a2520b0ca36c2b6c6eb0000000000000000000000000000000000000000000000000000000000046f49036f5e4ea4dd042801c8841e3db8e654124305da0f11824fc1db60c405dbb39f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', 120000) |
|
|
|
|
// check if the logsBloom is being logged (web3 call)
|
|
|
|
|
.journalChildIncludes('0x00000000000000000000000000100000000000000000020000000000002000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000040000000060000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000100000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000001') |
|
|
|
|
.waitForElementContainsText('*[data-id="terminalJournal"]', '0x00000000000000000000000000100000000000000000020000000000002000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000040000000060000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000100000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000001', 120000) |
|
|
|
|
// check if the logsBloom is being logged (ethers.js call)
|
|
|
|
|
.journalChildIncludes('"hex":"0x025cd8"') |
|
|
|
|
.waitForElementContainsText('*[data-id="terminalJournal"]', '"hex":"0x025cd8"', 120000) |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
'Should listen on all transactions #group7': function (browser: NightwatchBrowser) { |
|
|
|
|
browser // it's already connected to goerli
|
|
|
|
|
.click('[data-id="terminalClearConsole"]') // clear the console
|
|
|
|
|
.click('[data-id="listenNetworkCheckInput"]') // start to listen
|
|
|
|
|
.waitForElementContainsText('*[data-id="terminalJournal"]', 'from:', 200000) |
|
|
|
|
.waitForElementContainsText('*[data-id="terminalJournal"]', 'to:', 200000) |
|
|
|
|
.click('[data-id="terminalClearConsole"]') // clear the console
|
|
|
|
|
.waitForElementContainsText('*[data-id="terminalJournal"]', 'from:', 200000) |
|
|
|
|
.waitForElementContainsText('*[data-id="terminalJournal"]', 'to:', 200000) |
|
|
|
|
.click('[data-id="listenNetworkCheckInput"]') // stop to listen
|
|
|
|
|
.pause(20000) |
|
|
|
|
.execute(function () { |
|
|
|
|
return (document.querySelector('[data-id="terminalJournal"]') as any).innerText |
|
|
|
|
}, [], function (result) { |
|
|
|
|
browser.assert.equal(result.value, '', 'terminal log should be empty') |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|