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

@ -613,7 +613,7 @@ var run = function () {
selectedVersion = queryParams.get().version
}
loadVersion(selectedVersion)
loadVersion(selectedVersion)
}).fail(function (xhr, text, err) {
// loading failed for some reason, fall back to local compiler
$('#versionSelector').append(new Option('latest local version', 'builtin'))

@ -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