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
92871429
Commit
92871429
authored
Mar 20, 2018
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix test
parent
0a8eef9c
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
18 additions
and
16 deletions
+18
-16
BrowserStackLocal
ci/BrowserStackLocal
+0
-0
contract1.sol
contracts/contract1.sol
+2
-1
contract1.sol
contracts/folder1/contract1.sol
+0
-0
contract_firefox.sol
contracts/folder1/contract_firefox.sol
+0
-0
contract_firefox_toremove.sol
contracts/folder1/contract_firefox_toremove.sol
+2
-0
nightwatch.js
nightwatch.js
+0
-1
package.json
package.json
+1
-2
init.js
test-browser/helpers/init.js
+3
-2
compiling.js
test-browser/tests/compiling.js
+6
-5
sharedFolderExplorer.js
test-browser/tests/sharedFolderExplorer.js
+4
-5
No files found.
ci/BrowserStackLocal
0 → 100755
View file @
92871429
File added
contracts/contract1.sol
View file @
92871429
contract test1 { function get () returns (uint) { return
10
; }}
contract test1 { function get () returns (uint) { return
8
; }}
\ No newline at end of file
contracts/folder1/contract1.sol
View file @
92871429
contracts/folder1/
renamed_
contract_firefox.sol
→
contracts/folder1/contract_firefox.sol
View file @
92871429
File moved
contracts/folder1/contract_firefox_toremove.sol
0 → 100644
View file @
92871429
contract test2 { function get () returns (uint) { return 11; }}
\ No newline at end of file
nightwatch.js
View file @
92871429
...
@@ -28,7 +28,6 @@ module.exports = {
...
@@ -28,7 +28,6 @@ module.exports = {
'path'
:
''
'path'
:
''
},
},
'desiredCapabilities'
:
{
'desiredCapabilities'
:
{
'screenResolution'
:
'2560x1600'
,
'browserName'
:
'firefox'
,
'browserName'
:
'firefox'
,
'javascriptEnabled'
:
true
,
'javascriptEnabled'
:
true
,
'acceptSslCerts'
:
true
,
'acceptSslCerts'
:
true
,
...
...
package.json
View file @
92871429
...
@@ -173,6 +173,5 @@
...
@@ -173,6 +173,5 @@
"test"
:
"npm run csslint; standard && node test/index.js"
,
"test"
:
"npm run csslint; standard && node test/index.js"
,
"test-browser"
:
"npm-run-all -lpr selenium downloadsolc make-mock-compiler serve browsertest"
,
"test-browser"
:
"npm-run-all -lpr selenium downloadsolc make-mock-compiler serve browsertest"
,
"watch"
:
"watchify src/index.js -dv -p browserify-reload -o build/app.js"
"watch"
:
"watchify src/index.js -dv -p browserify-reload -o build/app.js"
},
}
"dependencies"
:
{}
}
}
test-browser/helpers/init.js
View file @
92871429
...
@@ -2,10 +2,11 @@ module.exports = function (browser, callback) {
...
@@ -2,10 +2,11 @@ module.exports = function (browser, callback) {
browser
browser
.
url
(
'http://127.0.0.1:8080/#version=builtin'
)
.
url
(
'http://127.0.0.1:8080/#version=builtin'
)
.
injectScript
(
'test-browser/helpers/applytestmode.js'
,
function
()
{
.
injectScript
(
'test-browser/helpers/applytestmode.js'
,
function
()
{
browser
.
resizeWindow
(
2560
,
1440
,
callback
)
browser
.
resizeWindow
(
2560
,
1440
,
()
=>
{
.
click
(
'#autoCompile'
)
browser
.
click
(
'#autoCompile'
)
.
perform
(
function
()
{
.
perform
(
function
()
{
callback
()
callback
()
})
})
})
})
})
}
}
test-browser/tests/compiling.js
View file @
92871429
...
@@ -73,11 +73,12 @@ function testReturnValues (browser, callback) {
...
@@ -73,11 +73,12 @@ function testReturnValues (browser, callback) {
.
testFunction
(
'retunValues1 - transact (not payable)'
,
.
testFunction
(
'retunValues1 - transact (not payable)'
,
'0x79dc928d149d2ade02ab610a8ae290636222d034d4adce0bb08a68401e3d1f7f'
,
'0x79dc928d149d2ade02ab610a8ae290636222d034d4adce0bb08a68401e3d1f7f'
,
`[vm]\nfrom:0xca3...a733c\nto:testReturnValues.retunValues1() 0x5e7...26e9f\nvalue:0 wei\ndata:0x9ed...59eb7\nlogs:0\nhash:0x79d...d1f7f`
,
`[vm]\nfrom:0xca3...a733c\nto:testReturnValues.retunValues1() 0x5e7...26e9f\nvalue:0 wei\ndata:0x9ed...59eb7\nlogs:0\nhash:0x79d...d1f7f`
,
null
,
`{
null
,
"0": "bool: _b true",
`{
"1": "uint256: _u 345",
"0": "bool: _b true",
"2": "int256: _i -345",
"1": "uint256: _u 345",
"3": "address: _a 0xca35b7d915458ef540ade6068dfe2f44e8fa733c"
"2": "int256: _i -345",
"3": "address: _a 0xca35b7d915458ef540ade6068dfe2f44e8fa733c"
}`
)
}`
)
.
pause
(
500
)
.
pause
(
500
)
.
testFunction
(
'retunValues2 - transact (not payable)'
,
.
testFunction
(
'retunValues2 - transact (not payable)'
,
...
...
test-browser/tests/sharedFolderExplorer.js
View file @
92871429
...
@@ -20,7 +20,6 @@ contract gmbh {
...
@@ -20,7 +20,6 @@ contract gmbh {
}
}
}
}
`
`
var
sources
=
[
var
sources
=
[
{
{
'localhost/folder1/contract2.sol'
:
{
content
:
'contract test2 { function get () returns (uint) { return 11; }}'
}
'localhost/folder1/contract2.sol'
:
{
content
:
'contract test2 { function get () returns (uint) { return 11; }}'
}
...
@@ -79,25 +78,25 @@ function runTests (browser, testData) {
...
@@ -79,25 +78,25 @@ function runTests (browser, testData) {
.
click
(
'[data-path="localhost/folder1/contract1.sol"]'
)
// open localhost/folder1/contract1.sol
.
click
(
'[data-path="localhost/folder1/contract1.sol"]'
)
// open localhost/folder1/contract1.sol
.
pause
(
1000
)
.
pause
(
1000
)
.
perform
(
function
(
done
)
{
// check the content and replace by another
.
perform
(
function
(
done
)
{
// check the content and replace by another
browser
.
testEditorValue
(
'contract test1 { function get () returns (uint) { return 10; }}
\
n
'
,
()
=>
{
browser
.
testEditorValue
(
'contract test1 { function get () returns (uint) { return 10; }}'
,
()
=>
{
console
.
log
(
'testEditorValue'
)
console
.
log
(
'testEditorValue'
)
done
()
done
()
})
})
})
})
.
perform
(
function
(
done
)
{
.
perform
(
function
(
done
)
{
browser
.
setEditorValue
(
'contract test1Changed { function get () returns (uint) { return 10; }}
\
n
'
,
()
=>
{
browser
.
setEditorValue
(
'contract test1Changed { function get () returns (uint) { return 10; }}'
,
()
=>
{
console
.
log
(
'setEditorValue'
)
console
.
log
(
'setEditorValue'
)
done
()
done
()
})
})
})
})
.
perform
(
function
(
done
)
{
.
perform
(
function
(
done
)
{
browser
.
testEditorValue
(
'contract test1Changed { function get () returns (uint) { return 10; }}
\
n
'
,
()
=>
{
browser
.
testEditorValue
(
'contract test1Changed { function get () returns (uint) { return 10; }}'
,
()
=>
{
console
.
log
(
'testEditorValue'
)
console
.
log
(
'testEditorValue'
)
done
()
done
()
})
})
})
})
.
perform
(
function
(
done
)
{
.
perform
(
function
(
done
)
{
browser
.
setEditorValue
(
'contract test1 { function get () returns (uint) { return 10; }}
\
n
'
,
()
=>
{
browser
.
setEditorValue
(
'contract test1 { function get () returns (uint) { return 10; }}'
,
()
=>
{
console
.
log
(
'setEditorValue'
)
console
.
log
(
'setEditorValue'
)
done
()
done
()
})
})
...
...
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