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
78f5ed4a
Unverified
Commit
78f5ed4a
authored
Feb 27, 2019
by
yann300
Committed by
GitHub
Feb 27, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1727 from ethereum/swap_it_workspace
swap_it_workspaces
parents
d4b37116
d7d9c8b5
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
96 additions
and
30 deletions
+96
-30
app.js
src/app.js
+1
-1
file-panel.js
src/app/panels/file-panel.js
+2
-1
analysis-tab.js
src/app/tabs/analysis-tab.js
+2
-1
run-tab.js
src/app/tabs/run-tab.js
+2
-1
test-tab.js
src/app/tabs/test-tab.js
+2
-1
generate.js
src/app/ui/landing-page/generate.js
+11
-3
workspace.js
src/app/ui/landing-page/workspace.js
+50
-0
framingService.js
src/framingService.js
+3
-3
remixAppManager.js
src/remixAppManager.js
+4
-0
contracts.js
test-browser/helpers/contracts.js
+5
-5
init.js
test-browser/helpers/init.js
+3
-3
ballot.js
test-browser/tests/ballot.js
+3
-3
compiling.js
test-browser/tests/compiling.js
+3
-3
sharedFolderExplorer.js
test-browser/tests/sharedFolderExplorer.js
+2
-2
simpleContract.js
test-browser/tests/simpleContract.js
+1
-1
staticanalysis.js
test-browser/tests/staticanalysis.js
+1
-1
testRecorder.js
test-browser/tests/units/testRecorder.js
+1
-1
No files found.
src/app.js
View file @
78f5ed4a
...
@@ -459,7 +459,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
...
@@ -459,7 +459,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
let
configProvider
=
self
.
_components
.
filesProviders
[
'config'
]
let
configProvider
=
self
.
_components
.
filesProviders
[
'config'
]
appManager
.
init
([
appManager
.
init
([
{
profile
:
homepageProfile
(),
api
:
generateHomePage
()
},
{
profile
:
homepageProfile
(),
api
:
generateHomePage
(
appManager
,
appStore
)
},
{
profile
:
this
.
profile
(),
api
:
this
},
{
profile
:
this
.
profile
(),
api
:
this
},
{
profile
:
udapp
.
profile
(),
api
:
udapp
},
{
profile
:
udapp
.
profile
(),
api
:
udapp
},
{
profile
:
fileManager
.
profile
(),
api
:
fileManager
},
{
profile
:
fileManager
.
profile
(),
api
:
fileManager
},
...
...
src/app/panels/file-panel.js
View file @
78f5ed4a
...
@@ -169,7 +169,8 @@ function filepanel (localRegistry) {
...
@@ -169,7 +169,8 @@ function filepanel (localRegistry) {
self
.
profile
=
function
()
{
self
.
profile
=
function
()
{
return
{
return
{
name
:
'file explorers'
,
name
:
'fileExplorers'
,
displayName
:
'file explorers'
,
methods
:
[],
methods
:
[],
events
:
[],
events
:
[],
icon
:
'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB3aWR0aD0iMTc5MiIgaGVpZ2h0PSIxNzkyIiB2aWV3Qm94PSIwIDAgMTc5MiAxNzkyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik0xNjk2IDM4NHE0MCAwIDY4IDI4dDI4IDY4djEyMTZxMCA0MC0yOCA2OHQtNjggMjhoLTk2MHEtNDAgMC02OC0yOHQtMjgtNjh2LTI4OGgtNTQ0cS00MCAwLTY4LTI4dC0yOC02OHYtNjcycTAtNDAgMjAtODh0NDgtNzZsNDA4LTQwOHEyOC0yOCA3Ni00OHQ4OC0yMGg0MTZxNDAgMCA2OCAyOHQyOCA2OHYzMjhx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tab.js
View file @
78f5ed4a
...
@@ -11,7 +11,8 @@ class AnalysisTab {
...
@@ -11,7 +11,8 @@ class AnalysisTab {
}
}
profile
()
{
profile
()
{
return
{
return
{
name
:
'solidity static analysis'
,
name
:
'solidityStaticAnalysis'
,
displayName
:
'solidity static analysis'
,
methods
:
[],
methods
:
[],
events
:
[],
events
:
[],
icon
:
'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB3aWR0aD0iMjA0OCIgaGVpZ2h0PSIxNzkyIiB2aWV3Qm94PSIwIDAgMjA0OCAxNzkyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik0yMDQ4IDE1MzZ2MTI4aC0yMDQ4di0xNTM2aDEyOHYxNDA4aDE5MjB6bS0xMjgtMTI0OHY0MzVxMCAyMS0xOS41IDI5LjV0LTM1LjUtNy41bC0xMjEtMTIxLTYzMyA2MzNxLTEwIDEwLTIzIDEwdC0yMy0xMGwtMjMzLTIzMy00MTYgNDE2LTE5Mi0xOTIgNTg1LTU4NXExMC0xMCAyMy0xMHQyMyAxMGwyMzMgMjMzIDQ2NC00NjQtMTIxLTEyMXEtMTYtMTYtNy41LTM1LjV0MjkuNS0xOS41aDQzNXExNCAwIDIzIDl0OSAyM3oiLz48L3N2Zz4='
,
icon
:
'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB3aWR0aD0iMjA0OCIgaGVpZ2h0PSIxNzkyIiB2aWV3Qm94PSIwIDAgMjA0OCAxNzkyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik0yMDQ4IDE1MzZ2MTI4aC0yMDQ4di0xNTM2aDEyOHYxNDA4aDE5MjB6bS0xMjgtMTI0OHY0MzVxMCAyMS0xOS41IDI5LjV0LTM1LjUtNy41bC0xMjEtMTIxLTYzMyA2MzNxLTEwIDEwLTIzIDEwdC0yMy0xMGwtMjMzLTIzMy00MTYgNDE2LTE5Mi0xOTIgNTg1LTU4NXExMC0xMCAyMy0xMHQyMyAxMGwyMzMgMjMzIDQ2NC00NjQtMTIxLTEyMXEtMTYtMTYtNy41LTM1LjV0MjkuNS0xOS41aDQzNXExNCAwIDIzIDl0OSAyM3oiLz48L3N2Zz4='
,
...
...
src/app/tabs/run-tab.js
View file @
78f5ed4a
...
@@ -149,7 +149,8 @@ class RunTab {
...
@@ -149,7 +149,8 @@ class RunTab {
profile
()
{
profile
()
{
return
{
return
{
name
:
'run transactions'
,
name
:
'run'
,
displayName
:
'run transactions'
,
methods
:
[],
methods
:
[],
events
:
[],
events
:
[],
icon
:
'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB3aWR0aD0iMTc5MiIgaGVpZ2h0PSIxNzkyIiB2aWV3Qm94PSIwIDAgMTc5MiAxNzkyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik0xNTc2IDkyN2wtMTMyOCA3MzhxLTIzIDEzLTM5LjUgM3QtMTYuNS0zNnYtMTQ3MnEwLTI2IDE2LjUtMzZ0MzkuNSAzbDEzMjggNzM4cTIzIDEzIDIzIDMxdC0yMyAzMXoiLz48L3N2Zz4='
,
icon
:
'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB3aWR0aD0iMTc5MiIgaGVpZ2h0PSIxNzkyIiB2aWV3Qm94PSIwIDAgMTc5MiAxNzkyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik0xNTc2IDkyN2wtMTMyOCA3MzhxLTIzIDEzLTM5LjUgM3QtMTYuNS0zNnYtMTQ3MnEwLTI2IDE2LjUtMzZ0MzkuNSAzbDEzMjggNzM4cTIzIDEzIDIzIDMxdC0yMyAzMXoiLz48L3N2Zz4='
,
...
...
src/app/tabs/test-tab.js
View file @
78f5ed4a
...
@@ -25,7 +25,8 @@ module.exports = class TestTab {
...
@@ -25,7 +25,8 @@ module.exports = class TestTab {
}
}
profile
()
{
profile
()
{
return
{
return
{
name
:
'solidity unit testing'
,
name
:
'solidityUnitTesting'
,
displayName
:
'solidity unit testing'
,
methods
:
[],
methods
:
[],
events
:
[],
events
:
[],
icon
:
'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB3aWR0aD0iMjMwNCIgaGVpZ2h0PSIxNzkyIiB2aWV3Qm94PSIwIDAgMjMwNCAxNzkyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik0xNzI4IDQ0OGwtMzg0IDcwNGg3Njh6bS0xMjgwIDBsLTM4NCA3MDRoNzY4em04MjEtMTkycS0xNCA0MC00NS41IDcxLjV0LTcxLjUgNDUuNXYxMjkxaDYwOHExNCAwIDIzIDl0OSAyM3Y2NHEwIDE0LTkgMjN0LTIzIDloLTEzNDRxLTE0IDAtMjMtOXQtOS0yM3YtNjRxMC0xNCA5LTIzdDIzLTloNjA4di0xMjkxcS00MC0xNC03MS41LTQ1LjV0LTQ1LjUtNzEuNWgtNDkxcS0xNCAwLTIzLTl0LTktMjN2LTY0cTAtMTQgOS0yM3QyMy05aDQ5MXEyMS01NyA3MC05Mi41dDExMS0zNS41IDExMSAzNS41IDcwIDkyLjVoNDkxcTE0IDAgMjMgOXQ5IDIzdjY0cTAgMTQtOSAyM3QtMjMgOWgtNDkxem0tMTgxIDE2cTMzIDAgNTYuNS0yMy41dDIzLjUtNTYuNS0yMy41LTU2LjUtNTYuNS0yMy41LTU2LjUgMjMuNS0yMy41IDU2LjUgMjMuNSA1Ni41IDU2LjUgMjMuNXptMTA4OCA4ODBxMC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TY0cTAtMTQgOS0yM3QyMy05aDQ5MXEyMS01NyA3MC05Mi41dDExMS0zNS41IDExMSAzNS41IDcwIDkyLjVoNDkxcTE0IDAgMjMgOXQ5IDIzdjY0cTAgMTQtOSAyM3QtMjMgOWgtNDkxem0tMTgxIDE2cTMzIDAgNTYuNS0yMy41dDIzLjUtNTYuNS0yMy41LTU2LjUtNTYuNS0yMy41LTU2LjUgMjMuNS0yMy41IDU2LjUgMjMuNSA1Ni41IDU2LjUgMjMuNXptMTA4OCA4ODBxMCA3My00Ni41IDEzMXQtMTE3LjUgOTEtMTQ0LjUgNDkuNS0xMzkuNSAxNi41LTEzOS41LTE2LjUtMTQ0LjUtNDkuNS0xMTcuNS05MS00Ni41LTEzMXEwLTExIDM1LTgxdDkyLTE3NC41IDEwNy0xOTUuNSAxMDItMTg0IDU2LTEwMHExOC0zMyA1Ni0zM3Q1NiAzM3E0IDcgNTYgMTAwdDEwMiAxODQgMTA3IDE5NS41IDkyIDE3NC41IDM1IDgxem0tMTI4MCAwcTAgNzMtNDYuNSAxMzF0LTExNy41IDkxLTE0NC41IDQ5LjUtMTM5LjUgMTYuNS0xMzkuNS0xNi41LTE0NC41LTQ5LjUtMTE3LjUtOTEtNDYuNS0xMzFxMC0xMSAzNS04MXQ5Mi0xNzQuNSAxMDctMTk1LjUgMTAyLTE4NCA1Ni0xMDBxMTgtMzMgNTYtMzN0NTYgMzNxNCA3IDU2IDEwMHQxMDIgMTg0IDEwNyAxOTUuNSA5MiAxNzQuNSAzNSA4MXoiLz48L3N2Zz4='
,
...
...
src/app/ui/landing-page/generate.js
View file @
78f5ed4a
/* global
alert
*/
/* global */
import
LandingPage
from
'./landing-page'
import
LandingPage
from
'./landing-page'
import
Section
from
'./section'
import
Section
from
'./section'
import
{
defaultWorkspaces
}
from
'./workspace'
export
function
homepageProfile
()
{
export
function
homepageProfile
()
{
return
{
return
{
...
@@ -13,7 +14,8 @@ export function homepageProfile () {
...
@@ -13,7 +14,8 @@ export function homepageProfile () {
}
}
}
}
export
function
generateHomePage
()
{
export
function
generateHomePage
(
appManager
)
{
/*
var actions1 = [
var actions1 = [
{label: 'new file', type: `callback`, payload: () => { alert(`-new file created-`) }},
{label: 'new file', type: `callback`, payload: () => { alert(`-new file created-`) }},
{label: 'import from GitHub', type: `callback`, payload: () => { alert(`-imported from GitHub-`) }},
{label: 'import from GitHub', type: `callback`, payload: () => { alert(`-imported from GitHub-`) }},
...
@@ -51,6 +53,12 @@ export function generateHomePage () {
...
@@ -51,6 +53,12 @@ export function generateHomePage () {
var section3 = new Section('Learn', actions3)
var section3 = new Section('Learn', actions3)
var section4 = new Section('Plugins', actions4)
var section4 = new Section('Plugins', actions4)
var section5 = new Section('Help', actions5)
var section5 = new Section('Help', actions5)
*/
return
new
LandingPage
([
section1
,
section2
,
section3
,
section4
,
section5
])
var
sectionsWorkspaces
=
[]
defaultWorkspaces
(
appManager
).
forEach
((
workspace
)
=>
{
sectionsWorkspaces
.
push
({
label
:
workspace
.
title
,
type
:
'callback'
,
payload
:
()
=>
{
workspace
.
activate
()
}})
})
var
sectionWorkspace
=
new
Section
(
'Workspaces'
,
sectionsWorkspaces
)
return
new
LandingPage
([
sectionWorkspace
])
}
}
src/app/ui/landing-page/workspace.js
0 → 100644
View file @
78f5ed4a
export
class
Workspace
{
constructor
(
title
,
description
,
activate
,
deactivate
)
{
this
.
title
=
title
this
.
description
=
description
this
.
activate
=
activate
this
.
deactivate
=
deactivate
}
}
export
const
defaultWorkspaces
=
(
appManager
,
appStore
)
=>
{
return
[
new
Workspace
(
'Close All Modules'
,
''
,
()
=>
{
appStore
.
getActives
()
.
filter
(({
profile
})
=>
!
profile
.
required
)
.
forEach
((
profile
)
=>
{
appManager
.
deactivateOne
(
profile
.
name
)
})
},
()
=>
{}),
new
Workspace
(
'Solidity Basic'
,
''
,
()
=>
{
appManager
.
ensureActivated
(
'solidity'
)
},
()
=>
{}),
new
Workspace
(
'Solidity Unit testing'
,
''
,
()
=>
{
appManager
.
ensureActivated
(
'solidity'
)
appManager
.
ensureActivated
(
'solidityUnitTesting'
)
},
()
=>
{}),
new
Workspace
(
'Solidity Full Environement'
,
''
,
()
=>
{
appManager
.
ensureActivated
(
'solidity'
)
appManager
.
ensureActivated
(
'run'
)
appManager
.
ensureActivated
(
'solidityStaticAnalysis'
)
appManager
.
ensureActivated
(
'solidityUnitTesting'
)
},
()
=>
{}),
new
Workspace
(
'Vyper Basic'
,
''
,
()
=>
{
appManager
.
ensureActivated
(
'vyper'
)
},
()
=>
{}),
new
Workspace
(
'Pipeline'
,
''
,
()
=>
{
appManager
.
ensureActivated
(
'solidity'
)
appManager
.
ensureActivated
(
'run'
)
appManager
.
ensureActivated
(
'pipeline'
)
},
()
=>
{}),
new
Workspace
(
'Deploy and Run Solidity'
,
''
,
()
=>
{
appManager
.
ensureActivated
(
'solidity'
)
appManager
.
ensureActivated
(
'run'
)
},
()
=>
{}),
new
Workspace
(
'Deploy and Run Vyper'
,
''
,
()
=>
{
appManager
.
ensureActivated
(
'vyper'
)
appManager
.
ensureActivated
(
'run'
)
},
()
=>
{}),
new
Workspace
(
'Debugger'
,
''
,
()
=>
{
appManager
.
ensureActivated
(
'debugger'
)
},
()
=>
{})
]
}
src/framingService.js
View file @
78f5ed4a
...
@@ -2,12 +2,12 @@ export default {
...
@@ -2,12 +2,12 @@ export default {
start
:
(
appStore
,
swapPanelApi
,
verticalIconApi
,
mainPanelApi
,
resizeFeature
)
=>
{
start
:
(
appStore
,
swapPanelApi
,
verticalIconApi
,
mainPanelApi
,
resizeFeature
)
=>
{
swapPanelApi
.
event
.
on
(
'toggle'
,
(
moduleName
)
=>
{
swapPanelApi
.
event
.
on
(
'toggle'
,
(
moduleName
)
=>
{
resizeFeature
.
panel1
.
clientWidth
!==
0
?
resizeFeature
.
minimize
()
:
resizeFeature
.
maximise
()
resizeFeature
.
panel1
.
clientWidth
!==
0
?
resizeFeature
.
minimize
()
:
resizeFeature
.
maximise
()
if
(
moduleName
===
'file
e
xplorers'
)
{
if
(
moduleName
===
'file
E
xplorers'
)
{
mainPanelApi
.
showContent
(
'code editor'
)
mainPanelApi
.
showContent
(
'code editor'
)
}
}
})
})
swapPanelApi
.
event
.
on
(
'showing'
,
(
moduleName
)
=>
{
swapPanelApi
.
event
.
on
(
'showing'
,
(
moduleName
)
=>
{
if
(
moduleName
===
'file
e
xplorers'
)
{
if
(
moduleName
===
'file
E
xplorers'
)
{
mainPanelApi
.
showContent
(
'code editor'
)
mainPanelApi
.
showContent
(
'code editor'
)
}
}
resizeFeature
.
panel1
.
clientWidth
===
0
?
resizeFeature
.
maximise
()
:
''
resizeFeature
.
panel1
.
clientWidth
===
0
?
resizeFeature
.
maximise
()
:
''
...
@@ -21,7 +21,7 @@ export default {
...
@@ -21,7 +21,7 @@ export default {
})
})
// mainPanelApi.event.on('showing', (moduleName) => {})
// mainPanelApi.event.on('showing', (moduleName) => {})
verticalIconApi
.
select
(
'file
e
xplorers'
)
verticalIconApi
.
select
(
'file
E
xplorers'
)
verticalIconApi
.
select
(
'homepage'
)
verticalIconApi
.
select
(
'homepage'
)
resizeFeature
.
minimize
()
resizeFeature
.
minimize
()
}
}
...
...
src/remixAppManager.js
View file @
78f5ed4a
...
@@ -14,6 +14,10 @@ export class RemixAppManager extends AppManagerApi {
...
@@ -14,6 +14,10 @@ export class RemixAppManager extends AppManagerApi {
}
}
}
}
ensureActivated
(
module
)
{
if
(
!
this
.
store
.
isActive
(
module
))
this
.
activateOne
(
module
)
}
proxy
()
{
proxy
()
{
// that's temporary. should be removed when we can have proper notification registration
// that's temporary. should be removed when we can have proper notification registration
return
this
.
data
.
proxy
return
this
.
data
.
proxy
...
...
test-browser/helpers/contracts.js
View file @
78f5ed4a
...
@@ -50,14 +50,14 @@ function getCompiledContracts (browser, compiled, callback) {
...
@@ -50,14 +50,14 @@ function getCompiledContracts (browser, compiled, callback) {
}
}
function
selectContract
(
browser
,
contractName
,
callback
)
{
function
selectContract
(
browser
,
contractName
,
callback
)
{
browser
.
clickLaunchIcon
(
'settings'
).
clickLaunchIcon
(
'run
transactions
'
)
browser
.
clickLaunchIcon
(
'settings'
).
clickLaunchIcon
(
'run'
)
.
setValue
(
'#runTabView select[class^="contractNames"]'
,
contractName
).
perform
(()
=>
{
.
setValue
(
'#runTabView select[class^="contractNames"]'
,
contractName
).
perform
(()
=>
{
callback
()
callback
()
})
})
}
}
function
createContract
(
browser
,
inputParams
,
callback
)
{
function
createContract
(
browser
,
inputParams
,
callback
)
{
browser
.
clickLaunchIcon
(
'settings'
).
clickLaunchIcon
(
'run
transactions
'
)
browser
.
clickLaunchIcon
(
'settings'
).
clickLaunchIcon
(
'run'
)
.
setValue
(
'div[class^="contractActionsContainerSingle"] input'
,
inputParams
,
function
()
{
.
setValue
(
'div[class^="contractActionsContainerSingle"] input'
,
inputParams
,
function
()
{
browser
.
click
(
'#runTabView button[class^="instanceButton"]'
).
pause
(
500
).
perform
(
function
()
{
callback
()
})
browser
.
click
(
'#runTabView button[class^="instanceButton"]'
).
pause
(
500
).
perform
(
function
()
{
callback
()
})
})
})
...
@@ -217,7 +217,7 @@ function setEditorValue (value, callback) {
...
@@ -217,7 +217,7 @@ function setEditorValue (value, callback) {
}
}
function
addInstance
(
browser
,
address
,
isValidFormat
,
isValidChecksum
,
callback
)
{
function
addInstance
(
browser
,
address
,
isValidFormat
,
isValidChecksum
,
callback
)
{
browser
.
clickLaunchIcon
(
'run
transactions
'
).
clearValue
(
'.ataddressinput'
).
setValue
(
'.ataddressinput'
,
address
,
function
()
{
browser
.
clickLaunchIcon
(
'run'
).
clearValue
(
'.ataddressinput'
).
setValue
(
'.ataddressinput'
,
address
,
function
()
{
browser
.
click
(
'div[class^="atAddress"]'
)
browser
.
click
(
'div[class^="atAddress"]'
)
.
execute
(
function
()
{
.
execute
(
function
()
{
var
ret
=
document
.
querySelector
(
'div[class^="modalBody"] div'
).
innerHTML
var
ret
=
document
.
querySelector
(
'div[class^="modalBody"] div'
).
innerHTML
...
@@ -265,7 +265,7 @@ function modalFooterOKClick () {
...
@@ -265,7 +265,7 @@ function modalFooterOKClick () {
}
}
function
addFile
(
browser
,
name
,
content
,
done
)
{
function
addFile
(
browser
,
name
,
content
,
done
)
{
browser
.
clickLaunchIcon
(
'run
transactions'
).
clickLaunchIcon
(
'file e
xplorers'
).
click
(
'.newFile'
)
browser
.
clickLaunchIcon
(
'run
'
).
clickLaunchIcon
(
'fileE
xplorers'
).
click
(
'.newFile'
)
.
perform
((
client
,
done
)
=>
{
.
perform
((
client
,
done
)
=>
{
browser
.
execute
(
function
(
fileName
)
{
browser
.
execute
(
function
(
fileName
)
{
if
(
fileName
!==
'Untitled.sol'
)
{
if
(
fileName
!==
'Untitled.sol'
)
{
...
@@ -372,7 +372,7 @@ function useFilter (browser, filter, test, done) {
...
@@ -372,7 +372,7 @@ function useFilter (browser, filter, test, done) {
}
}
function
switchFile
(
browser
,
name
,
done
)
{
function
switchFile
(
browser
,
name
,
done
)
{
browser
.
clickLaunchIcon
(
'settings'
).
clickLaunchIcon
(
'file
e
xplorers'
)
browser
.
clickLaunchIcon
(
'settings'
).
clickLaunchIcon
(
'file
E
xplorers'
)
.
click
(
'li[key="'
+
name
+
'"]'
)
.
click
(
'li[key="'
+
name
+
'"]'
)
.
pause
(
2000
)
.
pause
(
2000
)
.
perform
(()
=>
{
.
perform
(()
=>
{
...
...
test-browser/helpers/init.js
View file @
78f5ed4a
...
@@ -22,10 +22,10 @@ function initModules (browser, callback) {
...
@@ -22,10 +22,10 @@ function initModules (browser, callback) {
document
.
querySelector
(
'div[title="pluginManager"]'
).
scrollTop
=
document
.
querySelector
(
'div[title="pluginManager"]'
).
scrollHeight
document
.
querySelector
(
'div[title="pluginManager"]'
).
scrollTop
=
document
.
querySelector
(
'div[title="pluginManager"]'
).
scrollHeight
},
[],
function
()
{
},
[],
function
()
{
browser
.
click
(
'#pluginManager div[title="solidity"] button'
)
browser
.
click
(
'#pluginManager div[title="solidity"] button'
)
.
click
(
'#pluginManager div[title="run
transactions
"] button'
)
.
click
(
'#pluginManager div[title="run"] button'
)
.
click
(
'#pluginManager div[title="solidity
static a
nalysis"] button'
)
.
click
(
'#pluginManager div[title="solidity
StaticA
nalysis"] button'
)
.
click
(
'#pluginManager div[title="debugger"] button'
)
.
click
(
'#pluginManager div[title="debugger"] button'
)
.
click
(
'#icon-panel div[title="file
e
xplorers"]'
)
.
click
(
'#icon-panel div[title="file
E
xplorers"]'
)
.
perform
(()
=>
{
callback
()
})
.
perform
(()
=>
{
callback
()
})
})
})
}
}
test-browser/tests/ballot.js
View file @
78f5ed4a
...
@@ -34,7 +34,7 @@ function runTests (browser, testData) {
...
@@ -34,7 +34,7 @@ function runTests (browser, testData) {
contractHelper
.
testContracts
(
browser
,
'Untitled.sol'
,
sources
[
0
][
'browser/Untitled.sol'
],
[
'Ballot'
],
function
()
{
contractHelper
.
testContracts
(
browser
,
'Untitled.sol'
,
sources
[
0
][
'browser/Untitled.sol'
],
[
'Ballot'
],
function
()
{
done
()
done
()
})
})
}).
clickLaunchIcon
(
'run
transactions
'
)
}).
clickLaunchIcon
(
'run'
)
.
setValue
(
'input[placeholder="uint8 _numProposals"]'
,
'1'
)
.
setValue
(
'input[placeholder="uint8 _numProposals"]'
,
'1'
)
.
click
(
'#runTabView button[class^="instanceButton"]'
)
.
click
(
'#runTabView button[class^="instanceButton"]'
)
.
waitForElementPresent
(
'.instance:nth-of-type(2)'
)
.
waitForElementPresent
(
'.instance:nth-of-type(2)'
)
...
@@ -65,7 +65,7 @@ function runTests (browser, testData) {
...
@@ -65,7 +65,7 @@ function runTests (browser, testData) {
done
()
done
()
})
})
})
})
.
clickLaunchIcon
(
'run
transactions
'
)
.
clickLaunchIcon
(
'run'
)
.
click
(
'div[class^="udappClose"]'
)
.
click
(
'div[class^="udappClose"]'
)
.
perform
((
client
,
done
)
=>
{
.
perform
((
client
,
done
)
=>
{
console
.
log
(
'ballot.abi'
)
console
.
log
(
'ballot.abi'
)
...
@@ -79,7 +79,7 @@ function runTests (browser, testData) {
...
@@ -79,7 +79,7 @@ function runTests (browser, testData) {
done
()
done
()
})
})
})
})
.
clickLaunchIcon
(
'file
e
xplorers'
)
.
clickLaunchIcon
(
'file
E
xplorers'
)
.
perform
((
client
,
done
)
=>
{
.
perform
((
client
,
done
)
=>
{
console
.
log
(
'addInstance 0x692a70D2e424a56D2C6C27aA97D1a86395877b3A'
)
console
.
log
(
'addInstance 0x692a70D2e424a56D2C6C27aA97D1a86395877b3A'
)
contractHelper
.
addInstance
(
browser
,
'0x692a70D2e424a56D2C6C27aA97D1a86395877b3A'
,
true
,
true
,
()
=>
{
contractHelper
.
addInstance
(
browser
,
'0x692a70D2e424a56D2C6C27aA97D1a86395877b3A'
,
true
,
true
,
()
=>
{
...
...
test-browser/tests/compiling.js
View file @
78f5ed4a
...
@@ -38,7 +38,7 @@ function runTests (browser) {
...
@@ -38,7 +38,7 @@ function runTests (browser) {
function
testSimpleContract
(
browser
,
callback
)
{
function
testSimpleContract
(
browser
,
callback
)
{
contractHelper
.
testContracts
(
browser
,
'Untitled.sol'
,
sources
[
0
][
'browser/Untitled.sol'
],
[
'TestContract'
],
function
()
{
contractHelper
.
testContracts
(
browser
,
'Untitled.sol'
,
sources
[
0
][
'browser/Untitled.sol'
],
[
'TestContract'
],
function
()
{
browser
.
clickLaunchIcon
(
'run
transactions
'
)
browser
.
clickLaunchIcon
(
'run'
)
.
click
(
'#runTabView button[class^="instanceButton"]'
)
.
click
(
'#runTabView button[class^="instanceButton"]'
)
.
waitForElementPresent
(
'.instance:nth-of-type(2)'
)
.
waitForElementPresent
(
'.instance:nth-of-type(2)'
)
.
click
(
'.instance:nth-of-type(2)'
)
.
click
(
'.instance:nth-of-type(2)'
)
...
@@ -69,7 +69,7 @@ function testSimpleContract (browser, callback) {
...
@@ -69,7 +69,7 @@ function testSimpleContract (browser, callback) {
function
testReturnValues
(
browser
,
callback
)
{
function
testReturnValues
(
browser
,
callback
)
{
contractHelper
.
testContracts
(
browser
,
'returnValues.sol'
,
sources
[
1
][
'browser/returnValues.sol'
],
[
'testReturnValues'
],
function
()
{
contractHelper
.
testContracts
(
browser
,
'returnValues.sol'
,
sources
[
1
][
'browser/returnValues.sol'
],
[
'testReturnValues'
],
function
()
{
browser
.
clickLaunchIcon
(
'run
transactions
'
)
browser
.
clickLaunchIcon
(
'run'
)
.
click
(
'#runTabView button[class^="instanceButton"]'
)
.
click
(
'#runTabView button[class^="instanceButton"]'
)
.
waitForElementPresent
(
'.instance:nth-of-type(2)'
)
.
waitForElementPresent
(
'.instance:nth-of-type(2)'
)
.
click
(
'.instance:nth-of-type(2)'
)
.
click
(
'.instance:nth-of-type(2)'
)
...
@@ -107,7 +107,7 @@ function testReturnValues (browser, callback) {
...
@@ -107,7 +107,7 @@ function testReturnValues (browser, callback) {
function
testInputValues
(
browser
,
callback
)
{
function
testInputValues
(
browser
,
callback
)
{
contractHelper
.
testContracts
(
browser
,
'inputValues.sol'
,
sources
[
2
][
'browser/inputValues.sol'
],
[
'test'
],
function
()
{
contractHelper
.
testContracts
(
browser
,
'inputValues.sol'
,
sources
[
2
][
'browser/inputValues.sol'
],
[
'test'
],
function
()
{
browser
.
clickLaunchIcon
(
'run
transactions
'
)
browser
.
clickLaunchIcon
(
'run'
)
.
click
(
'#runTabView button[class^="instanceButton"]'
)
.
click
(
'#runTabView button[class^="instanceButton"]'
)
.
waitForElementPresent
(
'.instance:nth-of-type(2)'
)
.
waitForElementPresent
(
'.instance:nth-of-type(2)'
)
.
click
(
'.instance:nth-of-type(2)'
)
.
click
(
'.instance:nth-of-type(2)'
)
...
...
test-browser/tests/sharedFolderExplorer.js
View file @
78f5ed4a
...
@@ -71,7 +71,7 @@ function runTests (browser, testData) {
...
@@ -71,7 +71,7 @@ function runTests (browser, testData) {
}
}
browser
browser
.
waitForElementVisible
(
'#icon-panel'
,
10000
)
.
waitForElementVisible
(
'#icon-panel'
,
10000
)
.
clickLaunchIcon
(
'file
e
xplorers'
)
.
clickLaunchIcon
(
'file
E
xplorers'
)
.
click
(
'.websocketconn'
)
.
click
(
'.websocketconn'
)
.
waitForElementVisible
(
'#modal-footer-ok'
,
10000
)
.
waitForElementVisible
(
'#modal-footer-ok'
,
10000
)
.
click
(
'#modal-footer-ok'
)
.
click
(
'#modal-footer-ok'
)
...
@@ -132,7 +132,7 @@ function runTests (browser, testData) {
...
@@ -132,7 +132,7 @@ function runTests (browser, testData) {
testImportFromRemixd
(
browser
,
()
=>
{
done
()
})
testImportFromRemixd
(
browser
,
()
=>
{
done
()
})
})
})
.
perform
(
function
()
{
.
perform
(
function
()
{
browser
.
clickLaunchIcon
(
'file
e
xplorers'
).
click
(
'[data-path="localhost"]'
)
// collapse and expand
browser
.
clickLaunchIcon
(
'file
E
xplorers'
).
click
(
'[data-path="localhost"]'
)
// collapse and expand
.
waitForElementNotVisible
(
'[data-path="localhost/folder1"]'
)
.
waitForElementNotVisible
(
'[data-path="localhost/folder1"]'
)
.
click
(
'[data-path="localhost"]'
)
.
click
(
'[data-path="localhost"]'
)
.
waitForElementVisible
(
'[data-path="localhost/folder1"]'
)
.
waitForElementVisible
(
'[data-path="localhost/folder1"]'
)
...
...
test-browser/tests/simpleContract.js
View file @
78f5ed4a
...
@@ -24,7 +24,7 @@ function runTests (browser) {
...
@@ -24,7 +24,7 @@ function runTests (browser) {
browser
browser
.
waitForElementVisible
(
'#icon-panel'
,
10000
)
.
waitForElementVisible
(
'#icon-panel'
,
10000
)
.
clickLaunchIcon
(
'solidity'
)
.
clickLaunchIcon
(
'solidity'
)
.
clickLaunchIcon
(
'file
e
xplorers'
)
.
clickLaunchIcon
(
'file
E
xplorers'
)
.
click
(
'#swap-panel label[data-path="browser"]'
)
.
click
(
'#swap-panel label[data-path="browser"]'
)
.
perform
(()
=>
{
.
perform
(()
=>
{
// the first fn is used to pass browser to the other ones.
// the first fn is used to pass browser to the other ones.
...
...
test-browser/tests/staticanalysis.js
View file @
78f5ed4a
...
@@ -40,7 +40,7 @@ function runTests (browser) {
...
@@ -40,7 +40,7 @@ function runTests (browser) {
.
clickLaunchIcon
(
'solidity'
)
.
clickLaunchIcon
(
'solidity'
)
contractHelper
.
testContracts
(
browser
,
'Untitled.sol'
,
sources
[
0
][
'browser/Untitled.sol'
],
[
'TooMuchGas'
,
'test1'
,
'test2'
],
function
()
{
contractHelper
.
testContracts
(
browser
,
'Untitled.sol'
,
sources
[
0
][
'browser/Untitled.sol'
],
[
'TooMuchGas'
,
'test1'
,
'test2'
],
function
()
{
browser
browser
.
clickLaunchIcon
(
'solidity
static a
nalysis'
)
.
clickLaunchIcon
(
'solidity
StaticA
nalysis'
)
.
click
(
'#staticanalysisView button'
)
.
click
(
'#staticanalysisView button'
)
.
waitForElementPresent
(
'#staticanalysisresult .staticAnalysisWarning'
,
2000
,
true
,
function
()
{
.
waitForElementPresent
(
'#staticanalysisresult .staticAnalysisWarning'
,
2000
,
true
,
function
()
{
dom
.
listSelectorContains
([
'browser/Untitled.sol:2:33:Use of tx.origin'
,
dom
.
listSelectorContains
([
'browser/Untitled.sol:2:33:Use of tx.origin'
,
...
...
test-browser/tests/units/testRecorder.js
View file @
78f5ed4a
...
@@ -10,7 +10,7 @@ module.exports = {
...
@@ -10,7 +10,7 @@ module.exports = {
browser
.
clickLaunchIcon
=
contractHelper
.
clickLaunchIcon
browser
.
clickLaunchIcon
=
contractHelper
.
clickLaunchIcon
contractHelper
.
addFile
(
browser
,
'scenario.json'
,
{
content
:
records
},
()
=>
{
contractHelper
.
addFile
(
browser
,
'scenario.json'
,
{
content
:
records
},
()
=>
{
browser
browser
.
clickLaunchIcon
(
'run
transactions
'
)
.
clickLaunchIcon
(
'run'
)
.
click
(
'div[class^="cardContainer"] i[class^="arrow"]'
)
.
click
(
'div[class^="cardContainer"] i[class^="arrow"]'
)
.
click
(
'#runTabView .runtransaction'
)
.
click
(
'#runTabView .runtransaction'
)
.
waitForElementPresent
(
'.instance:nth-of-type(2)'
)
.
waitForElementPresent
(
'.instance:nth-of-type(2)'
)
...
...
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