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
d8ef0bee
Commit
d8ef0bee
authored
Feb 10, 2020
by
ioedeveloper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Undo ModalFooterClick Changes
parent
7f278008
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
32 additions
and
15 deletions
+32
-15
modalFooterCancelClick.js
test-browser/commands/modalFooterCancelClick.js
+17
-0
modalFooterOKClick.js
test-browser/commands/modalFooterOKClick.js
+5
-5
ballot.js
test-browser/tests/ballot.js
+1
-1
gist.js
test-browser/tests/gist.js
+7
-7
publishContract.js
test-browser/tests/publishContract.js
+1
-1
recorder.js
test-browser/tests/recorder.js
+1
-1
No files found.
test-browser/commands/modalFooterCancelClick.js
0 → 100644
View file @
d8ef0bee
const
EventEmitter
=
require
(
'events'
)
class
ModalFooterOKClick
extends
EventEmitter
{
command
()
{
this
.
api
.
waitForElementVisible
(
'#modal-footer-cancel'
).
perform
((
client
,
done
)
=>
{
this
.
api
.
execute
(
function
()
{
document
.
querySelector
(
'#modal-footer-cancel'
).
click
()
},
[],
(
result
)
=>
{
done
()
this
.
emit
(
'complete'
)
})
})
return
this
}
}
module
.
exports
=
ModalFooterOKClick
test-browser/commands/modalFooterClick.js
→
test-browser/commands/modalFooter
OK
Click.js
View file @
d8ef0bee
const
EventEmitter
=
require
(
'events'
)
class
ModalFooterClick
extends
EventEmitter
{
command
(
cssSelector
)
{
this
.
api
.
waitForElementVisible
(
cssSelector
).
perform
((
client
,
done
)
=>
{
class
ModalFooter
OK
Click
extends
EventEmitter
{
command
()
{
this
.
api
.
waitForElementVisible
(
'#modal-footer-ok'
).
perform
((
client
,
done
)
=>
{
this
.
api
.
execute
(
function
()
{
document
.
querySelector
(
cssSelector
).
click
()
document
.
querySelector
(
'#modal-footer-ok'
).
click
()
},
[],
(
result
)
=>
{
done
()
this
.
emit
(
'complete'
)
...
...
@@ -14,4 +14,4 @@ class ModalFooterClick extends EventEmitter {
}
}
module
.
exports
=
ModalFooterClick
module
.
exports
=
ModalFooter
OK
Click
test-browser/tests/ballot.js
View file @
d8ef0bee
...
...
@@ -60,7 +60,7 @@ module.exports = {
'Deploy and use Ballot using external web3'
:
function
(
browser
)
{
browser
.
click
(
'#selectExEnvOptions #web3-mode'
)
.
modalFooter
Click
(
'#modal-footer-ok'
)
.
modalFooter
OKClick
(
)
.
clickLaunchIcon
(
'solidity'
)
.
testContracts
(
'Untitled.sol'
,
sources
[
0
][
'browser/Untitled.sol'
],
[
'Ballot'
])
.
clickLaunchIcon
(
'udapp'
)
...
...
test-browser/tests/gist.js
View file @
d8ef0bee
...
...
@@ -23,7 +23,7 @@ module.exports = {
.
waitForElementVisible
(
'#icon-panel'
,
10000
)
.
clickLaunchIcon
(
'fileExplorers'
)
.
click
(
'#publishToGist'
)
.
modalFooter
Click
(
'#modal-footer-ok'
)
.
modalFooter
OKClick
(
)
.
getModalBody
((
value
,
done
)
=>
{
const
reg
=
/gist.github.com
\/([^
.
]
+
)
/
const
id
=
value
.
match
(
reg
)
...
...
@@ -33,7 +33,7 @@ module.exports = {
}
else
{
let
gistid
=
id
[
1
]
browser
.
modalFooterC
lick
(
'#modal-footer-cancel'
)
.
modalFooterC
ancelClick
(
)
.
executeScript
(
`remix.loadgist('
${
gistid
}
')`
)
.
switchFile
(
'browser/gists'
)
.
switchFile
(
`browser/gists/
${
gistid
}
`
)
...
...
@@ -44,8 +44,8 @@ module.exports = {
},
'Load Gist Modal'
:
function
(
browser
)
{
browser
.
waitForElementVisible
(
'#icon-panel'
,
10000
)
.
clickLaunchIcon
(
'
fileExplorers
'
)
.
waitForElementVisible
(
'#icon-panel'
)
.
clickLaunchIcon
(
'
home
'
)
.
scrollAndClick
(
'div.file > div.btn-group > button:nth-child(1)'
)
.
waitForElementVisible
(
'h6.modal-title'
)
.
assert
.
containsText
(
'h6.modal-title'
,
'Load a Gist'
)
...
...
@@ -62,10 +62,10 @@ module.exports = {
.
scrollAndClick
(
'div.file > div.btn-group > button:nth-child(1)'
)
.
waitForElementVisible
(
'#prompt_text'
)
.
setValue
(
'#prompt_text'
,
testData
.
invalidGistId
)
.
modalFooter
Click
(
'#modal-footer-ok'
)
.
modalFooter
OKClick
(
)
.
waitForElementVisible
(
'div.modal-body > div'
)
.
assert
.
containsText
(
'div.modal-body > div'
,
'Gist load error: Not Found'
)
.
modalFooter
Click
(
'#modal-footer-ok'
)
.
modalFooter
OKClick
(
)
},
'Import From Gist For Valid Gist ID'
:
function
(
browser
)
{
...
...
@@ -75,7 +75,7 @@ module.exports = {
.
scrollAndClick
(
'div.file > div.btn-group > button:nth-child(1)'
)
.
waitForElementVisible
(
'#prompt_text'
)
.
setValue
(
'#prompt_text'
,
testData
.
validGistId
)
.
modalFooter
Click
(
'#modal-footer-ok'
)
.
modalFooter
OKClick
(
)
.
switchFile
(
`browser/gists/
${
testData
.
validGistId
}
`
)
.
switchFile
(
`browser/gists/
${
testData
.
validGistId
}
/ApplicationRegistry`
)
.
waitForElementVisible
(
`div[title='browser/gists/
${
testData
.
validGistId
}
/ApplicationRegistry']`
)
...
...
test-browser/tests/publishContract.js
View file @
d8ef0bee
...
...
@@ -21,7 +21,7 @@ module.exports = {
if
(
value
.
indexOf
(
'dweb:/ipfs'
)
===
-
1
)
browser
.
assert
.
fail
(
'ipfs deploy failed'
,
''
,
''
)
done
()
})
.
modalFooter
Click
(
'#modal-footer-ok'
)
.
modalFooter
OKClick
(
)
},
'Publish on Swarm'
:
function
(
browser
)
{
browser
...
...
test-browser/tests/recorder.js
View file @
d8ef0bee
...
...
@@ -38,7 +38,7 @@ module.exports = {
.
click
(
'.instance:nth-of-type(2) > div > button'
)
.
clickFunction
(
'set - transact (not payable)'
,
{
types
:
'uint256 _p'
,
values
:
'34'
})
.
click
(
'i.savetransaction'
)
.
modalFooter
Click
(
'#modal-footer-ok'
)
.
modalFooter
OKClick
(
)
.
getEditorValue
(
function
(
result
)
{
var
parsed
=
JSON
.
parse
(
result
)
browser
.
assert
.
equal
(
JSON
.
stringify
(
parsed
.
transactions
[
0
].
record
.
parameters
),
JSON
.
stringify
(
scenario
.
transactions
[
0
].
record
.
parameters
))
...
...
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