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
97404021
Commit
97404021
authored
Dec 11, 2017
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add setEditorValue
parent
f112f9ae
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
2 deletions
+16
-2
contracts.js
test-browser/helpers/contracts.js
+14
-2
ballot.js
test-browser/tests/ballot.js
+1
-0
compiling.js
test-browser/tests/compiling.js
+1
-0
No files found.
test-browser/helpers/contracts.js
View file @
97404021
...
@@ -13,7 +13,8 @@ module.exports = {
...
@@ -13,7 +13,8 @@ module.exports = {
useFilter
,
useFilter
,
addInstance
,
addInstance
,
clickFunction
,
clickFunction
,
verifyCallReturnValue
verifyCallReturnValue
,
setEditorValue
}
}
function
getCompiledContracts
(
browser
,
compiled
,
callback
)
{
function
getCompiledContracts
(
browser
,
compiled
,
callback
)
{
...
@@ -134,6 +135,17 @@ function testFunction (fnFullName, txHash, log, expectedInput, expectedReturn, e
...
@@ -134,6 +135,17 @@ function testFunction (fnFullName, txHash, log, expectedInput, expectedReturn, e
return
this
return
this
}
}
function
setEditorValue
(
value
)
{
this
.
perform
((
client
,
done
)
=>
{
this
.
execute
(
function
(
value
)
{
document
.
getElementById
(
'input'
).
editor
.
session
.
setValue
(
value
)
},
[
value
],
function
(
result
)
{
done
()
})
})
return
this
}
function
addInstance
(
browser
,
address
,
done
)
{
function
addInstance
(
browser
,
address
,
done
)
{
browser
.
setValue
(
'.ataddressinput'
,
address
,
function
()
{
browser
.
setValue
(
'.ataddressinput'
,
address
,
function
()
{
browser
.
click
(
'div[class^="atAddress"]'
)
browser
.
click
(
'div[class^="atAddress"]'
)
...
@@ -160,7 +172,7 @@ function addFile (browser, name, content, done) {
...
@@ -160,7 +172,7 @@ function addFile (browser, name, content, done) {
done
()
done
()
})
})
})
})
.
set
Value
(
'#input textarea'
,
content
.
content
,
function
()
{}
)
.
set
EditorValue
(
content
.
content
)
.
pause
(
1000
)
.
pause
(
1000
)
.
perform
(
function
()
{
.
perform
(
function
()
{
done
()
done
()
...
...
test-browser/tests/ballot.js
View file @
97404021
...
@@ -23,6 +23,7 @@ module.exports = {
...
@@ -23,6 +23,7 @@ module.exports = {
function
runTests
(
browser
,
testData
)
{
function
runTests
(
browser
,
testData
)
{
browser
.
testFunction
=
contractHelper
.
testFunction
browser
.
testFunction
=
contractHelper
.
testFunction
browser
.
setEditorValue
=
contractHelper
.
setEditorValue
browser
browser
.
waitForElementVisible
(
'.newFile'
,
10000
)
.
waitForElementVisible
(
'.newFile'
,
10000
)
.
click
(
'.compileView'
)
.
click
(
'.compileView'
)
...
...
test-browser/tests/compiling.js
View file @
97404021
...
@@ -21,6 +21,7 @@ module.exports = {
...
@@ -21,6 +21,7 @@ module.exports = {
function
runTests
(
browser
)
{
function
runTests
(
browser
)
{
browser
.
testFunction
=
contractHelper
.
testFunction
browser
.
testFunction
=
contractHelper
.
testFunction
browser
.
clickFunction
=
contractHelper
.
clickFunction
browser
.
clickFunction
=
contractHelper
.
clickFunction
browser
.
setEditorValue
=
contractHelper
.
setEditorValue
browser
browser
.
waitForElementVisible
(
'.newFile'
,
10000
)
.
waitForElementVisible
(
'.newFile'
,
10000
)
.
click
(
'.compileView'
)
.
click
(
'.compileView'
)
...
...
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