add setEditorValue

pull/3094/head
yann300 7 years ago
parent fb6439c27a
commit 0af5177d1f
  1. 16
      test-browser/helpers/contracts.js
  2. 1
      test-browser/tests/ballot.js
  3. 1
      test-browser/tests/compiling.js

@ -13,7 +13,8 @@ module.exports = {
useFilter,
addInstance,
clickFunction,
verifyCallReturnValue
verifyCallReturnValue,
setEditorValue
}
function getCompiledContracts (browser, compiled, callback) {
@ -134,6 +135,17 @@ function testFunction (fnFullName, txHash, log, expectedInput, expectedReturn, e
return this
}
function setEditorValue (value) {
this.perform((client, done) => {
this.execute(function (value) {
document.getElementById('input').editor.session.setValue(value)
}, [value], function (result) {
done()
})
})
return this
}
function addInstance (browser, address, done) {
browser.setValue('.ataddressinput', address, function () {
browser.click('div[class^="atAddress"]')
@ -160,7 +172,7 @@ function addFile (browser, name, content, done) {
done()
})
})
.setValue('#input textarea', content.content, function () {})
.setEditorValue(content.content)
.pause(1000)
.perform(function () {
done()

@ -23,6 +23,7 @@ module.exports = {
function runTests (browser, testData) {
browser.testFunction = contractHelper.testFunction
browser.setEditorValue = contractHelper.setEditorValue
browser
.waitForElementVisible('.newFile', 10000)
.click('.compileView')

@ -21,6 +21,7 @@ module.exports = {
function runTests (browser) {
browser.testFunction = contractHelper.testFunction
browser.clickFunction = contractHelper.clickFunction
browser.setEditorValue = contractHelper.setEditorValue
browser
.waitForElementVisible('.newFile', 10000)
.click('.compileView')

Loading…
Cancel
Save