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
08a807d6
Commit
08a807d6
authored
Jan 24, 2020
by
LianaHus
Committed by
Liana Husikyan
Jan 30, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added a test
parent
55c5b6bf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
76 additions
and
0 deletions
+76
-0
sendLowLevelTx.js
test-browser/commands/sendLowLevelTx.js
+18
-0
specialFunctions.js
test-browser/tests/specialFunctions.js
+58
-0
No files found.
test-browser/commands/sendLowLevelTx.js
0 → 100644
View file @
08a807d6
const
EventEmitter
=
require
(
'events'
)
class
sendLowLevelTx
extends
EventEmitter
{
command
(
address
,
value
,
callData
,
callback
)
{
this
.
api
.
perform
((
client
,
done
)
=>
{
this
.
api
.
execute
(
function
(
value
)
{
document
.
getElementById
(
'deployAndRunLLTxSendTransaction'
).
click
done
()
if
(
callback
)
{
callback
.
call
(
this
.
api
)
}
this
.
emit
(
'complete'
)
})
})
return
this
}
}
module
.
exports
=
sendLowLevelTx
test-browser/tests/specialFunctions.js
0 → 100644
View file @
08a807d6
'use strict'
var
init
=
require
(
'../helpers/init'
)
var
sauce
=
require
(
'./sauce'
)
module
.
exports
=
{
before
:
function
(
browser
,
done
)
{
init
(
browser
,
done
)
},
'@sources'
:
function
()
{
return
sources
},
'Use special functions receive/fullback'
:
function
(
browser
)
{
browser
.
waitForElementVisible
(
'#icon-panel'
,
10000
)
.
testContracts
(
'receiveAndfFallback.sol'
,
sources
[
0
][
'browser/Untitled.sol'
],
[
'CheckSpecials'
])
.
clickLaunchIcon
(
'udapp'
.
selectContract
(
'CheckSpecials'
)
.
createContract
(
''
)
.
clickInstance
(
0
)
.
perform
((
done
)
=>
{
browser
.
getAddressAtPosition
(
0
,
(
address
)
=>
{
browser
.
sendLowLevelTx
(
address
,
'0'
,
'0xaa'
)
.
journalLastChild
(
'dd'
)
.
waitForElementVisible
(
'label[id="deployAndRunLLTxError"]'
)
.
assert
.
containsText
(
'label[id="deployAndRunLLTxError"]'
,
''
)
.
perform
(
done
)
})
})
)
},
tearDown
:
sauce
}
var
sources
=
[
{
'browser/receiveAndfFallback.sol'
:
{
content
:
`
contract CheckSpecials {
receive() payable external{}
fallback() external {}
}
`
},
'browser/receiveOnly.sol'
:
{
content
:
`
contract CheckSpecials {
receive() payable external{}
}
`
},
'browser/fallbackOnly.sol'
:
{
content
:
`
contract CheckSpecials {
fallback() payable external{}
}
`
}
}
]
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