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
e96bd6b5
Commit
e96bd6b5
authored
Jun 20, 2019
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor ballot
parent
c313d29e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
ballot.js
test-browser/tests/ballot.js
+11
-9
No files found.
test-browser/tests/ballot.js
View file @
e96bd6b5
...
@@ -14,13 +14,7 @@ module.exports = {
...
@@ -14,13 +14,7 @@ module.exports = {
'@sources'
:
function
()
{
'@sources'
:
function
()
{
return
sources
return
sources
},
},
'Ballot'
:
function
(
browser
)
{
'Deploy Ballot'
:
function
(
browser
)
{
runTests
(
browser
)
},
tearDown
:
sauce
}
function
runTests
(
browser
,
testData
)
{
browser
browser
.
waitForElementVisible
(
'#icon-panel'
,
10000
)
.
waitForElementVisible
(
'#icon-panel'
,
10000
)
.
clickLaunchIcon
(
'solidity'
)
.
clickLaunchIcon
(
'solidity'
)
...
@@ -33,7 +27,10 @@ function runTests (browser, testData) {
...
@@ -33,7 +27,10 @@ function runTests (browser, testData) {
.
testFunction
(
'delegate - transact (not payable)'
,
'0x0571a2439ea58bd349dd130afb8aff62a33af14c06de0dbc3928519bdf13ce2e'
,
.
testFunction
(
'delegate - transact (not payable)'
,
'0x0571a2439ea58bd349dd130afb8aff62a33af14c06de0dbc3928519bdf13ce2e'
,
`[vm]\nfrom:0xca3...a733c\nto:Ballot.delegate(address) 0x692...77b3a\nvalue:0 wei\ndata:0x5c1...4d2db\nlogs:0\nhash:0x057...3ce2e`
,
`[vm]\nfrom:0xca3...a733c\nto:Ballot.delegate(address) 0x692...77b3a\nvalue:0 wei\ndata:0x5c1...4d2db\nlogs:0\nhash:0x057...3ce2e`
,
{
types
:
'address to'
,
values
:
'"0x4b0897b0513fdc7c541b6d9d7e929c4e5364d2db"'
},
null
,
null
)
{
types
:
'address to'
,
values
:
'"0x4b0897b0513fdc7c541b6d9d7e929c4e5364d2db"'
},
null
,
null
)
.
pause
(
500
)
},
'Debug Ballot / delegate'
:
function
(
browser
)
{
browser
.
pause
(
500
)
.
click
(
'span#tx0x0571a2439ea58bd349dd130afb8aff62a33af14c06de0dbc3928519bdf13ce2e button[class^="debug"]'
)
.
click
(
'span#tx0x0571a2439ea58bd349dd130afb8aff62a33af14c06de0dbc3928519bdf13ce2e button[class^="debug"]'
)
.
pause
(
2000
)
.
pause
(
2000
)
.
clickLaunchIcon
(
'debugger'
)
.
clickLaunchIcon
(
'debugger'
)
...
@@ -43,7 +40,10 @@ function runTests (browser, testData) {
...
@@ -43,7 +40,10 @@ function runTests (browser, testData) {
.
pause
(
1000
)
.
pause
(
1000
)
.
checkVariableDebug
(
'soliditystate'
,
stateCheck
)
.
checkVariableDebug
(
'soliditystate'
,
stateCheck
)
.
checkVariableDebug
(
'soliditylocals'
,
localsCheck
)
.
checkVariableDebug
(
'soliditylocals'
,
localsCheck
)
.
clickLaunchIcon
(
'run'
)
},
'Access Ballot via at address'
:
function
(
browser
)
{
browser
.
clickLaunchIcon
(
'run'
)
.
click
(
'button[class^="udappClose"]'
)
.
click
(
'button[class^="udappClose"]'
)
.
addFile
(
'ballot.abi'
,
{
content
:
ballotABI
})
.
addFile
(
'ballot.abi'
,
{
content
:
ballotABI
})
.
addAtAddressInstance
(
'0x692a70D2e424a56D2C6C27aA97D1a86395877b3B'
,
true
,
false
)
.
addAtAddressInstance
(
'0x692a70D2e424a56D2C6C27aA97D1a86395877b3B'
,
true
,
false
)
...
@@ -56,6 +56,8 @@ function runTests (browser, testData) {
...
@@ -56,6 +56,8 @@ function runTests (browser, testData) {
`[vm]\nfrom:0xca3...a733c\nto:Ballot.delegate(address) 0x692...77b3a\nvalue:0 wei\ndata:0x5c1...4d2db\nlogs:0\nhash:0xd3c...df10f`
,
`[vm]\nfrom:0xca3...a733c\nto:Ballot.delegate(address) 0x692...77b3a\nvalue:0 wei\ndata:0x5c1...4d2db\nlogs:0\nhash:0xd3c...df10f`
,
{
types
:
'address to'
,
values
:
'"0x4b0897b0513fdc7c541b6d9d7e929c4e5364d2db"'
},
null
,
null
)
{
types
:
'address to'
,
values
:
'"0x4b0897b0513fdc7c541b6d9d7e929c4e5364d2db"'
},
null
,
null
)
.
end
()
.
end
()
},
tearDown
:
sauce
}
}
var
localsCheck
=
{
var
localsCheck
=
{
...
...
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