|
|
|
@ -24,7 +24,8 @@ module.exports = { |
|
|
|
|
renameFile, |
|
|
|
|
removeFile, |
|
|
|
|
getAddressAtPosition, |
|
|
|
|
clickLaunchIcon |
|
|
|
|
clickLaunchIcon, |
|
|
|
|
scrollDown |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function clickLaunchIcon (icon) { |
|
|
|
@ -153,11 +154,29 @@ function testConstantFunction (browser, address, fnFullName, expectedInput, expe |
|
|
|
|
.click('.instance button[title="' + fnFullName + '"]') |
|
|
|
|
.pause(1000) |
|
|
|
|
.waitForElementPresent('#instance' + address + ' div[class^="contractActionsContainer"] div[class^="value"]') |
|
|
|
|
.scrollDown('#runTabView') |
|
|
|
|
.assert.containsText('#instance' + address + ' div[class^="contractActionsContainer"] div[class^="value"]', expectedOutput).perform(() => { |
|
|
|
|
cb() |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function scrollDown (target) { |
|
|
|
|
return this.perform((client, done) => { |
|
|
|
|
_scrollDown(this, target, () => { |
|
|
|
|
done() |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function _scrollDown (browser, target, cb) { |
|
|
|
|
browser.execute(function () { |
|
|
|
|
document.querySelector(target).scrollTop = 0 |
|
|
|
|
document.querySelector(target).scrollTop = document.querySelector(target).scrollHeight |
|
|
|
|
}, [], function () { |
|
|
|
|
cb() |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function testFunction (fnFullName, txHash, log, expectedInput, expectedReturn, expectedEvent, callback) { |
|
|
|
|
// this => browser
|
|
|
|
|
this.waitForElementPresent('.instance button[title="' + fnFullName + '"]') |
|
|
|
|