test filter

pull/3094/head
yann300 7 years ago
parent 25acd62eea
commit 1a060e62bc
  1. 19
      test-browser/helpers/contracts.js
  2. 5
      test-browser/tests/compiling.js

@ -9,7 +9,8 @@ module.exports = {
verifyContract: verifyContract, verifyContract: verifyContract,
testFunction, testFunction,
checkDebug, checkDebug,
goToVMtraceStep goToVMtraceStep,
useFilter
} }
function getCompiledContracts (browser, compiled, callback) { function getCompiledContracts (browser, compiled, callback) {
@ -116,6 +117,22 @@ function addFile (browser, name, content, done) {
}) })
} }
function useFilter (browser, filter, test, done) {
var filterClass = '#editor-container div[class^="search"] input[class^="filter"]'
browser.setValue(filterClass, filter, function () {
browser.execute(function () {
return document.querySelector('#modal-dialog #prompt_text').innerHTML === test
}, [], function (result) {
browser.setValue(filterClass, '', function () {
if (!result.value) {
browser.assert.fail('useFilter on ' + filter + ' ' + test, 'info about error', '')
}
done()
})
})
})
}
function switchFile (browser, name, done) { function switchFile (browser, name, done) {
browser browser
.useXpath() .useXpath()

@ -44,6 +44,11 @@ function testSimpleContract (browser, callback) {
"0": "uint256: 8" "0": "uint256: 8"
}`) }`)
.pause(500) .pause(500)
.perform((client, done) => {
contractHelper.useFilter(browser, '0x12332162e2e31397dc1e07ed0a1cf08f728e9b4487c6f9ed79d2f39410c92782', '', () => {
done()
})
})
.testFunction('g - transact (not payable)', .testFunction('g - transact (not payable)',
'0xb1532162e2e31397dc1e07ed0a1cf08f728e9b4487c6f9ed79d2f39410c92781', '0xb1532162e2e31397dc1e07ed0a1cf08f728e9b4487c6f9ed79d2f39410c92781',
'[vm] from:0xca3...a733c, to:TestContract.g() 0x692...77b3a, value:0 wei, data:0xe21...79b8e, 0 logs, hash:0xb15...92781', null, `{ '[vm] from:0xca3...a733c, to:TestContract.g() 0x692...77b3a, value:0 wei, data:0xe21...79b8e, 0 logs, hash:0xb15...92781', null, `{

Loading…
Cancel
Save