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
dca07a60
Commit
dca07a60
authored
Jul 11, 2019
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hiding the modal after the callback is called
parent
70f71292
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
8 deletions
+6
-8
modaldialog.js
src/app/ui/modaldialog.js
+3
-6
addFile.js
test-browser/commands/addFile.js
+1
-0
verifyContracts.js
test-browser/commands/verifyContracts.js
+2
-2
No files found.
src/app/ui/modaldialog.js
View file @
dca07a60
...
@@ -49,18 +49,14 @@ module.exports = (title, content, ok, cancel, focusSelector, opts) => {
...
@@ -49,18 +49,14 @@ module.exports = (title, content, ok, cancel, focusSelector, opts) => {
function
okListener
()
{
function
okListener
()
{
removeEventListener
()
removeEventListener
()
hide
()
if
(
ok
&&
ok
.
fn
&&
agreed
)
ok
.
fn
()
if
(
ok
&&
ok
.
fn
&&
agreed
)
ok
.
fn
()
hide
()
}
}
function
cancelListener
()
{
function
cancelListener
()
{
removeEventListener
()
removeEventListener
()
hide
()
if
(
cancel
&&
cancel
.
fn
)
cancel
.
fn
()
if
(
cancel
&&
cancel
.
fn
)
cancel
.
fn
()
if
(
container
)
{
hide
()
container
.
class
=
`modal`
container
=
null
}
}
}
function
modalKeyEvent
(
e
)
{
function
modalKeyEvent
(
e
)
{
...
@@ -83,6 +79,7 @@ module.exports = (title, content, ok, cancel, focusSelector, opts) => {
...
@@ -83,6 +79,7 @@ module.exports = (title, content, ok, cancel, focusSelector, opts) => {
function
hide
()
{
function
hide
()
{
if
(
container
)
container
.
style
.
display
=
'none'
if
(
container
)
container
.
style
.
display
=
'none'
if
(
container
.
parentElement
)
container
.
parentElement
.
removeChild
(
container
)
if
(
container
.
parentElement
)
container
.
parentElement
.
removeChild
(
container
)
container
=
null
}
}
function
show
()
{
function
show
()
{
...
...
test-browser/commands/addFile.js
View file @
dca07a60
...
@@ -14,6 +14,7 @@ class AddFile extends EventEmitter {
...
@@ -14,6 +14,7 @@ class AddFile extends EventEmitter {
function
addFile
(
browser
,
name
,
content
,
done
)
{
function
addFile
(
browser
,
name
,
content
,
done
)
{
browser
.
clickLaunchIcon
(
'udapp'
).
clickLaunchIcon
(
'fileExplorers'
).
click
(
'.newFile'
)
browser
.
clickLaunchIcon
(
'udapp'
).
clickLaunchIcon
(
'fileExplorers'
).
click
(
'.newFile'
)
.
waitForElementVisible
(
'#modal-dialog'
)
.
perform
((
client
,
done
)
=>
{
.
perform
((
client
,
done
)
=>
{
browser
.
execute
(
function
(
fileName
)
{
browser
.
execute
(
function
(
fileName
)
{
if
(
fileName
!==
'Untitled.sol'
)
{
if
(
fileName
!==
'Untitled.sol'
)
{
...
...
test-browser/commands/verifyContracts.js
View file @
dca07a60
...
@@ -14,7 +14,7 @@ class VerifyContracts extends EventEmitter {
...
@@ -14,7 +14,7 @@ class VerifyContracts extends EventEmitter {
function
getCompiledContracts
(
browser
,
callback
)
{
function
getCompiledContracts
(
browser
,
callback
)
{
browser
.
clickLaunchIcon
(
'solidity'
).
execute
(
function
()
{
browser
.
clickLaunchIcon
(
'solidity'
).
execute
(
function
()
{
var
contracts
=
document
.
querySelectorAll
(
'#compileTabView select option'
)
var
contracts
=
document
.
querySelectorAll
(
'#compileTabView select
#compiledContracts
option'
)
if
(
!
contracts
)
{
if
(
!
contracts
)
{
return
null
return
null
}
else
{
}
else
{
...
@@ -33,7 +33,7 @@ function verifyContracts (browser, compiledContractNames, callback) {
...
@@ -33,7 +33,7 @@ function verifyContracts (browser, compiledContractNames, callback) {
getCompiledContracts
(
browser
,
(
result
)
=>
{
getCompiledContracts
(
browser
,
(
result
)
=>
{
if
(
result
.
value
)
{
if
(
result
.
value
)
{
for
(
var
contract
in
compiledContractNames
)
{
for
(
var
contract
in
compiledContractNames
)
{
console
.
log
(
' - '
+
compiledContractNames
[
contract
])
console
.
log
(
' - '
+
compiledContractNames
[
contract
]
,
result
.
value
)
if
(
result
.
value
.
indexOf
(
compiledContractNames
[
contract
])
===
-
1
)
{
if
(
result
.
value
.
indexOf
(
compiledContractNames
[
contract
])
===
-
1
)
{
browser
.
assert
.
fail
(
'compiled contract '
+
compiledContractNames
+
' not found'
,
'info about error'
,
''
)
browser
.
assert
.
fail
(
'compiled contract '
+
compiledContractNames
+
' not found'
,
'info about error'
,
''
)
browser
.
end
()
browser
.
end
()
...
...
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