Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
6f3c6342
Commit
6f3c6342
authored
Nov 07, 2016
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add test
parent
26416340
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
1 deletion
+37
-1
app.js
src/app.js
+1
-1
staticanalysis.js
test-browser/tests/staticanalysis.js
+36
-0
No files found.
src/app.js
View file @
6f3c6342
...
@@ -613,7 +613,7 @@ var run = function () {
...
@@ -613,7 +613,7 @@ var run = function () {
selectedVersion
=
queryParams
.
get
().
version
selectedVersion
=
queryParams
.
get
().
version
}
}
loadVersion
(
selectedVersion
)
loadVersion
(
selectedVersion
)
}).
fail
(
function
(
xhr
,
text
,
err
)
{
}).
fail
(
function
(
xhr
,
text
,
err
)
{
// loading failed for some reason, fall back to local compiler
// loading failed for some reason, fall back to local compiler
$
(
'#versionSelector'
).
append
(
new
Option
(
'latest local version'
,
'builtin'
))
$
(
'#versionSelector'
).
append
(
new
Option
(
'latest local version'
,
'builtin'
))
...
...
test-browser/tests/staticanalysis.js
0 → 100644
View file @
6f3c6342
'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
()
})
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment