pull/1/head
yann300 8 years ago
parent 264163403e
commit 6f3c6342c7
  1. 36
      test-browser/tests/staticanalysis.js

@ -0,0 +1,36 @@
'use strict'
var contractHelper = require('../helpers/contracts')
var init = require('../helpers/init')
var sauce = require('./sauce')
var sources = {
'sources': {
'Untitled': `contract test1 { address test = tx.origin; } contract test2 {}`
}
}
module.exports = {
before: function (browser, done) {
init(browser, done)
},
'@sources': function () {
return sources
},
'Static Analysis': function (browser) {
runTests(browser)
},
tearDown: sauce
}
function runTests (browser) {
browser
.waitForElementVisible('.newFile', 10000)
contractHelper.testContracts(browser, sources.sources.Untitled, ['test1', 'test2'], function () {
browser
.click('.staticanalysisView')
.click('#staticanalysisView button')
.waitForElementPresent('#staticanalysisresult .warning')
.assert.containsText('#staticanalysisresult .warning pre', '1 use of tx.origin')
.end()
})
}
Loading…
Cancel
Save