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
acbd919a
Commit
acbd919a
authored
Sep 09, 2019
by
LianaHus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added scroll to icons in tests
added parameter to scrollInto to alighn to the center
parent
0b2da2ed
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
7 deletions
+24
-7
scrollAndClick.js
test-browser/commands/scrollAndClick.js
+15
-0
scrollInto.js
test-browser/commands/scrollInto.js
+1
-1
init.js
test-browser/helpers/init.js
+8
-6
No files found.
test-browser/commands/scrollAndClick.js
0 → 100644
View file @
acbd919a
const
EventEmitter
=
require
(
'events'
)
class
ScrollAndClick
extends
EventEmitter
{
command
(
target
)
{
this
.
api
.
scrollInto
(
target
)
.
click
(
target
)
.
perform
(()
=>
{
this
.
emit
(
'complete'
)
})
return
this
}
}
module
.
exports
=
ScrollAndClick
test-browser/commands/scrollInto.js
View file @
acbd919a
...
...
@@ -14,7 +14,7 @@ class ScrollInto extends EventEmitter {
function
_scrollInto
(
browser
,
target
,
cb
)
{
browser
.
execute
(
function
(
target
)
{
document
.
querySelector
(
target
).
scrollIntoView
()
document
.
querySelector
(
target
).
scrollIntoView
(
({
block
:
'center'
})
)
},
[
target
],
function
()
{
cb
()
})
...
...
test-browser/helpers/init.js
View file @
acbd919a
...
...
@@ -14,16 +14,18 @@ module.exports = function (browser, callback) {
}
function
initModules
(
browser
,
callback
)
{
browser
.
pause
(
3000
).
click
(
'#icon-panel div[plugin="pluginManager"]'
)
.
execute
(
function
()
{
document
.
querySelector
(
'div[id="pluginManager"]'
).
scrollTop
=
document
.
querySelector
(
'div[id="pluginManager"]'
).
scrollHeight
},
[],
function
()
{
browser
.
click
(
'#pluginManager article[id="remixPluginManagerListItem_solidity"] button'
)
browser
.
pause
(
3000
)
.
click
(
'#icon-panel div[plugin="pluginManager"]'
)
.
scrollInto
(
'#pluginManager article[id="remixPluginManagerListItem_solidity"] button'
)
.
click
(
'#pluginManager article[id="remixPluginManagerListItem_solidity"] button'
)
.
pause
(
5000
)
.
scrollInto
(
'#pluginManager article[id="remixPluginManagerListItem_udapp"] button'
)
.
click
(
'#pluginManager article[id="remixPluginManagerListItem_udapp"] button'
)
.
scrollInto
(
'#pluginManager article[id="remixPluginManagerListItem_solidityStaticAnalysis"] button'
)
.
click
(
'#pluginManager article[id="remixPluginManagerListItem_solidityStaticAnalysis"] button'
)
.
scrollInto
(
'#pluginManager article[id="remixPluginManagerListItem_debugger"] button'
)
.
click
(
'#pluginManager article[id="remixPluginManagerListItem_debugger"] button'
)
.
scrollInto
(
'#icon-panel div[plugin="fileExplorers"]'
)
.
click
(
'#icon-panel div[plugin="fileExplorers"]'
)
.
perform
(()
=>
{
callback
()
})
})
}
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