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
613e1602
Commit
613e1602
authored
Oct 27, 2016
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add comment + misc
parent
4d6a2e45
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
16 deletions
+13
-16
makeMockCompiler.js
ci/makeMockCompiler.js
+8
-10
editor.js
src/app/editor.js
+1
-1
applytestmode.js
test-browser/helpers/applytestmode.js
+1
-1
contracts.js
test-browser/helpers/contracts.js
+1
-2
ballot.js
test-browser/tests/ballot.js
+1
-1
simpleContract.js
test-browser/tests/simpleContract.js
+1
-1
No files found.
ci/makeMockCompiler.js
View file @
613e1602
...
...
@@ -16,21 +16,19 @@ gatherCompilationResults(function (error, data) {
function
gatherCompilationResults
(
callback
)
{
var
compilationResult
=
{}
fs
.
readdir
(
'./test-browser/tests'
,
'utf8'
,
function
(
error
,
data
)
{
fs
.
readdir
(
'./test-browser/tests'
,
'utf8'
,
function
(
error
,
filenames
)
{
if
(
error
)
{
console
.
log
(
error
)
process
.
exit
(
1
)
}
else
{
data
.
map
(
function
(
item
,
i
)
{
filenames
.
map
(
function
(
item
,
i
)
{
var
testDef
=
require
(
'../test-browser/tests/'
+
item
)
for
(
var
k
in
testDef
)
{
if
(
k
===
'@Sources'
)
{
var
source
=
testDef
[
k
]()
var
result
=
compile
(
source
,
1
)
compilationResult
[
result
.
key
]
=
result
result
=
compile
(
source
,
0
)
compilationResult
[
result
.
key
]
=
result
}
if
(
'@sources'
in
testDef
)
{
var
source
=
testDef
[
'@sources'
]()
var
result
=
compile
(
source
,
1
)
compilationResult
[
result
.
key
]
=
result
result
=
compile
(
source
,
0
)
compilationResult
[
result
.
key
]
=
result
}
})
...
...
src/app/editor.js
View file @
613e1602
...
...
@@ -12,7 +12,7 @@ function Editor (loadingFromGist, storage) {
var
SOL_CACHE_FILE
=
null
var
editor
=
ace
.
edit
(
'input'
)
document
.
getElementById
(
'input'
).
editor
=
editor
document
.
getElementById
(
'input'
).
editor
=
editor
// required to access the editor during tests
var
sessions
=
{}
var
sourceAnnotations
=
[]
...
...
test-browser/helpers/applytestmode.js
View file @
613e1602
...
...
@@ -3,5 +3,5 @@
*
*/
console
.
log
(
'applying test mode'
)
document
.
getElementById
(
'input'
).
editor
.
setBehavioursEnabled
(
false
)
document
.
getElementById
(
'input'
).
editor
.
setBehavioursEnabled
(
false
)
// disable bracket auto-match (i.e. automatic injection of closing brackets and other things), so we can enter raw source code.
console
.
log
(
'test mode applied'
)
test-browser/helpers/contracts.js
View file @
613e1602
...
...
@@ -7,7 +7,6 @@ module.exports = {
function
checkCompiledContracts
(
browser
,
compiled
,
callback
)
{
browser
.
elements
(
'css selector'
,
'.udapp .contract .title'
,
function
(
elements
)
{
console
.
log
(
JSON
.
stringify
(
elements
))
elements
.
value
.
map
(
function
(
item
,
i
)
{
browser
.
elementIdText
(
item
.
ELEMENT
,
function
(
text
)
{
browser
.
assert
.
equal
(
text
.
value
.
split
(
'
\
n'
)[
0
],
compiled
[
i
])
...
...
@@ -22,6 +21,6 @@ function testContracts (browser, contractCode, compiledContractNames, callback)
.
clearValue
(
'#input textarea'
)
.
click
(
'.newFile'
)
.
setValue
(
'#input textarea'
,
contractCode
,
function
()
{})
.
waitForElementPresent
(
'.contract .create'
,
3000
000
)
.
waitForElementPresent
(
'.contract .create'
,
2
000
)
checkCompiledContracts
(
browser
,
compiledContractNames
,
callback
)
}
test-browser/tests/ballot.js
View file @
613e1602
...
...
@@ -13,7 +13,7 @@ module.exports = {
before
:
function
(
browser
,
done
)
{
init
(
browser
,
done
)
},
'@
S
ources'
:
function
()
{
'@
s
ources'
:
function
()
{
return
sources
},
'Ballot'
:
function
(
browser
)
{
...
...
test-browser/tests/simpleContract.js
View file @
613e1602
...
...
@@ -12,7 +12,7 @@ module.exports = {
before
:
function
(
browser
,
done
)
{
init
(
browser
,
done
)
},
'@
S
ources'
:
function
()
{
'@
s
ources'
:
function
()
{
return
sources
},
'Simple Contract'
:
function
(
browser
)
{
...
...
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