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
cfbe3e2f
Commit
cfbe3e2f
authored
Feb 11, 2020
by
ioedeveloper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Homepage tests to use data-attributes
parent
3736bede
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
49 additions
and
48 deletions
+49
-48
app.js
src/app.js
+3
-3
main-panel.js
src/app/components/main-panel.js
+1
-1
side-panel.js
src/app/components/side-panel.js
+1
-1
vertical-icons.js
src/app/components/vertical-icons.js
+3
-2
file-panel.js
src/app/panels/file-panel.js
+1
-1
terminal.js
src/app/panels/terminal.js
+5
-5
TreeView.js
src/app/ui/TreeView.js
+1
-0
landing-page.js
src/app/ui/landing-page/landing-page.js
+2
-2
homepage.js
test-browser/tests/homepage.js
+32
-33
No files found.
src/app.js
View file @
cfbe3e2f
...
...
@@ -141,21 +141,21 @@ class App {
if
(
self
.
_view
.
el
)
return
self
.
_view
.
el
// not resizable
self
.
_view
.
iconpanel
=
yo
`
<div id="icon-panel" class="
${
css
.
iconpanel
}
bg-light">
<div id="icon-panel"
data-id="icon-panel"
class="
${
css
.
iconpanel
}
bg-light">
${
''
}
</div>
`
// center panel, resizable
self
.
_view
.
sidepanel
=
yo
`
<div id="side-panel" style="min-width: 320px;" class=
${
css
.
sidepanel
}
>
<div id="side-panel"
data-id="side-panel"
style="min-width: 320px;" class=
${
css
.
sidepanel
}
>
${
''
}
</div>
`
// handle the editor + terminal
self
.
_view
.
mainpanel
=
yo
`
<div id="main-panel" class=
${
css
.
mainpanel
}
>
<div id="main-panel"
data-id="main-panel"
class=
${
css
.
mainpanel
}
>
${
''
}
</div>
`
...
...
src/app/components/main-panel.js
View file @
cfbe3e2f
...
...
@@ -26,7 +26,7 @@ export class MainPanel extends AbstractPanel {
render
()
{
return
yo
`
<div class=
${
css
.
pluginsContainer
}
>
<div class=
${
css
.
pluginsContainer
}
data-id="mainPanelPluginsContainer"
>
${
this
.
view
}
</div>`
}
...
...
src/app/components/side-panel.js
View file @
cfbe3e2f
...
...
@@ -132,7 +132,7 @@ export class SidePanel extends AbstractPanel {
return
yo
`
<header class="
${
css
.
swapitHeader
}
px-3">
<h6 class="
${
css
.
swapitTitle
}
">
${
name
}
</h6>
<h6 class="
${
css
.
swapitTitle
}
"
data-id="swapitTitle"
>
${
name
}
</h6>
${
docLink
}
${
versionWarning
}
</header>
...
...
src/app/components/vertical-icons.js
View file @
cfbe3e2f
...
...
@@ -227,6 +227,7 @@ export class VerticalIcons extends Plugin {
this
.
appManager
.
ensureActivated
(
'home'
)
}}
"
plugin="
home
" title="
Home
"
data-id="
homeIcon
"
>
<svg id="
Ebene_2
" data-name="
Ebene
2
" xmlns="
http
:
//www.w3.org/2000/svg" viewBox="0 0 105 100">
<
title
>
remix_logo1
<
/title
>
...
...
@@ -238,7 +239,7 @@ export class VerticalIcons extends Plugin {
<
/div>
`
this
.
iconKind
[
'fileexplorer'
]
=
yo
`
<div id='fileExplorerIcons'>
<div id='fileExplorerIcons'
data-id="fileExplorerIcons"
>
</div>
`
...
...
@@ -273,7 +274,7 @@ export class VerticalIcons extends Plugin {
`
this
.
iconKind
[
'settings'
]
=
yo
`
<div id='settingsIcons'>
<div id='settingsIcons'
data-id="settingsIcons"
>
</div>
`
...
...
src/app/panels/file-panel.js
View file @
cfbe3e2f
...
...
@@ -64,7 +64,7 @@ module.exports = class Filepanel extends ViewPlugin {
const
explorers
=
yo
`
<div>
<div class=
${
css
.
treeview
}
>
${
fileExplorer
.
init
()}
</div>
<div class=
${
css
.
treeview
}
data-id="fileExplorerInit"
>
${
fileExplorer
.
init
()}
</div>
<div class="filesystemexplorer
${
css
.
treeview
}
">
${
fileSystemExplorer
.
init
()}
</div>
</div>
`
...
...
src/app/panels/terminal.js
View file @
cfbe3e2f
...
...
@@ -123,14 +123,14 @@ class Terminal extends Plugin {
self
.
_view
.
input
.
innerText
=
'
\
n'
self
.
_view
.
cli
=
yo
`
<div id="terminalCli" class="
${
css
.
cli
}
">
<div id="terminalCli"
data-id="terminalCli"
class="
${
css
.
cli
}
">
<span class=
${
css
.
prompt
}
>
${
'>'
}
</span>
${
self
.
_view
.
input
}
</div>
`
self
.
_view
.
icon
=
yo
`
<i onmouseenter=
${
hover
}
onmouseleave=
${
hover
}
onmousedown=
${
minimize
}
class="btn btn-secondary btn-sm align-items-center
${
css
.
toggleTerminal
}
fas fa-angle-double-down"></i>`
class="btn btn-secondary btn-sm align-items-center
${
css
.
toggleTerminal
}
fas fa-angle-double-down"
data-id="toggleTerminal"
></i>`
self
.
_view
.
dragbar
=
yo
`
<div onmousedown=
${
mousedown
}
class=
${
css
.
dragbarHorizontal
}
></div>`
...
...
@@ -146,7 +146,7 @@ class Terminal extends Plugin {
self
.
_view
.
bar
=
yo
`
<div class="
${
css
.
bar
}
">
${
self
.
_view
.
dragbar
}
<div class="
${
css
.
menu
}
border-top border-dark bg-light">
<div class="
${
css
.
menu
}
border-top border-dark bg-light"
data-id="toggleTerminalMenu"
>
${
self
.
_view
.
icon
}
<div class=
${
css
.
clear
}
id="clearConsole" onclick=
${
clear
}
>
<i class="fas fa-ban" aria-hidden="true" title="Clear console"
...
...
@@ -177,9 +177,9 @@ class Terminal extends Plugin {
</div>
`
self
.
_view
.
term
=
yo
`
<div class="
${
css
.
terminal_container
}
" onscroll=
${
throttle
(
reattach
,
10
)}
onclick=
${
focusinput
}
>
<div class="
${
css
.
terminal_container
}
"
data-id="terminal_container"
onscroll=
${
throttle
(
reattach
,
10
)}
onclick=
${
focusinput
}
>
${
self
.
_components
.
autoCompletePopup
.
render
()}
<div class="bg-secondary" style="
<div class="bg-secondary"
data-id="terminalContainerDisplay"
style="
position: absolute;
height: 100%;
width: 100%;
...
...
src/app/ui/TreeView.js
View file @
cfbe3e2f
...
...
@@ -91,6 +91,7 @@ class TreeView {
var
list
=
yo
`<ul key=
${
keyPath
}
class=
${
css
.
ul_tv
}
>
${
children
}
</ul>`
list
.
style
.
display
=
'none'
caret
.
className
=
list
.
style
.
display
===
'none'
?
`fas fa-caret-right caret
${
css
.
caret_tv
}
`
:
`fas fa-caret-down caret
${
css
.
caret_tv
}
`
caret
.
setAttribute
(
'data-id'
,
`toggle_
${
keyPath
}
`
)
label
.
onclick
=
function
()
{
self
.
expand
(
keyPath
)
}
...
...
src/app/ui/landing-page/landing-page.js
View file @
cfbe3e2f
...
...
@@ -177,7 +177,7 @@ export class LandingPage extends ViewPlugin {
document
.
location
.
reload
()
}
const
img
=
yo
`<img src="assets/img/hexagon-remix-greengrey-texture.png"></img>`
let
container
=
yo
`<div class="
${
css
.
homeContainer
}
bg-light">
let
container
=
yo
`<div class="
${
css
.
homeContainer
}
bg-light"
data-id="homeContainer"
>
<div>
<div class="alert alert-info clearfix
${
css
.
thisJumboton
}
">
<div class="
${
css
.
headlineContainer
}
">
...
...
@@ -189,7 +189,7 @@ export class LandingPage extends ViewPlugin {
</div>
</div><!-- end of jumbotron -->
</div><!-- end of jumbotron container -->
<div class="row
${
css
.
hpSections
}
">
<div class="row
${
css
.
hpSections
}
"
data-id="hpSections"
>
<div id="col1" class="col-sm-7">
<div class="mb-5">
<h4>Environments</h4>
...
...
test-browser/tests/homepage.js
View file @
cfbe3e2f
...
...
@@ -7,71 +7,70 @@ module.exports = {
init
(
browser
,
done
,
'http://127.0.0.1:8080'
,
false
)
},
'Loads Icon
\'
s Panel'
:
function
(
browser
)
{
browser
.
waitForElementVisible
(
'
#icon-panel
'
,
10000
)
.
waitForElementVisible
(
'
#icon-panel > div > div[class^
="homeIcon"]'
)
.
waitForElementVisible
(
'
#icon-panel #fileExplorerIcons > div:nth-child(1)
'
)
.
waitForElementVisible
(
'
#icon-panel #settingsIcons > div:nth-child(1)
'
)
.
waitForElementVisible
(
'
#icon-panel #settingsIcons > div:nth-child(2)
'
)
browser
.
waitForElementVisible
(
'
div[data-id="icon-panel"]
'
,
10000
)
.
waitForElementVisible
(
'
div[data-id
="homeIcon"]'
)
.
waitForElementVisible
(
'
div[plugin="fileExplorers"]
'
)
.
waitForElementVisible
(
'
div[plugin="pluginManager"]
'
)
.
waitForElementVisible
(
'
div[plugin="settings"]
'
)
},
'Loads Side Panel'
:
function
(
browser
)
{
browser
.
waitForElementVisible
(
'
#side-panel
'
)
.
assert
.
containsText
(
'
#side-panel h6[class^
="swapitTitle"]'
,
'FILE EXPLORERS'
)
.
waitForElementVisible
(
'
#side-panel div[class^="treeview
"]'
)
.
waitForElementVisible
(
'
#side-panel ul[key="browser"] > li:nth-child(4)
'
)
browser
.
waitForElementVisible
(
'
div[data-id="side-panel"]
'
)
.
assert
.
containsText
(
'
h6[data-id
="swapitTitle"]'
,
'FILE EXPLORERS'
)
.
waitForElementVisible
(
'
div[data-id="fileExplorerInit
"]'
)
.
waitForElementVisible
(
'
li[key="browser/4_Ballot_test.sol"]
'
)
},
'Loads Main View'
:
function
(
browser
)
{
browser
.
waitForElementVisible
(
'
#main-panel > div[class^="mainview"] > div[class^="p
luginsContainer"]'
)
.
waitForElementVisible
(
'
#main-panel div[class^="homeContainer"] > div:nth-child(2)
'
)
.
waitForElementVisible
(
'
#main-panel div[class^="row hpSections"] > div:nth-child(1)
'
)
.
waitForElementVisible
(
'
#main-panel div[class^="panel"] > div[class^="terminal_container"]:nth-child(2)
'
)
browser
.
waitForElementVisible
(
'
div[data-id="mainPanelP
luginsContainer"]'
)
.
waitForElementVisible
(
'
div[data-id="homeContainer"]
'
)
.
waitForElementVisible
(
'
div[data-id="hpSections"]
'
)
.
waitForElementVisible
(
'
div[data-id="terminalContainerDisplay"]
'
)
},
'Loads terminal'
:
function
(
browser
)
{
browser
.
waitForElementVisible
(
'
#terminalCli
'
,
10000
)
.
waitForElementVisible
(
'
div[data-id="terminalCli"]
'
,
10000
)
.
journalLastChildIncludes
(
'Welcome to Remix'
)
},
'Toggles Side Panel'
:
function
(
browser
)
{
browser
.
waitForElementVisible
(
'#side-panel'
)
.
assert
.
visible
(
'#side-panel'
)
.
assert
.
containsText
(
'#side-panel h6[class^="swapitTitle"]'
,
'FILE EXPLORERS'
)
browser
.
waitForElementVisible
(
'div[data-id="side-panel"]'
)
.
assert
.
containsText
(
'h6[data-id="swapitTitle"]'
,
'FILE EXPLORERS'
)
.
clickLaunchIcon
(
'fileExplorers'
)
.
assert
.
hidden
(
'
#side-panel
'
)
.
assert
.
hidden
(
'
div[data-id="side-panel"]
'
)
.
clickLaunchIcon
(
'fileExplorers'
)
.
assert
.
visible
(
'
#side-panel
'
)
.
assert
.
containsText
(
'
#side-panel h6[class^
="swapitTitle"]'
,
'FILE EXPLORERS'
)
.
assert
.
visible
(
'
div[data-id="side-panel"]
'
)
.
assert
.
containsText
(
'
h6[data-id
="swapitTitle"]'
,
'FILE EXPLORERS'
)
},
'Toggles Terminal'
:
function
(
browser
)
{
browser
.
waitForElementVisible
(
'
#main-panel div[class^="panel"] > div[class^
="terminal_container"]'
)
.
assert
.
visible
(
'
#main-panel div[class^="panel"] > div[class^="terminal_container"]:nth-child(2)
'
)
.
click
(
'
div[class^="bar"] > div[class^="menu"] > i
'
)
.
checkElementStyle
(
'div[
class^="bar"] > div[class^="m
enu"]'
,
'height'
,
'35px'
)
.
click
(
'
div[class^="bar"] > div[class^="menu"] > i
'
)
.
assert
.
visible
(
'
#main-panel div[class^="panel"] > div[class^="terminal_container"]:nth-child(2)
'
)
browser
.
waitForElementVisible
(
'
div[data-id
="terminal_container"]'
)
.
assert
.
visible
(
'
div[data-id="terminalContainerDisplay"]
'
)
.
click
(
'
i[data-id="toggleTerminal"]
'
)
.
checkElementStyle
(
'div[
data-id="toggleTerminalM
enu"]'
,
'height'
,
'35px'
)
.
click
(
'
i[data-id="toggleTerminal"]
'
)
.
assert
.
visible
(
'
div[data-id="terminalContainerDisplay"]
'
)
},
'Toggles File Explorer Browser'
:
function
(
browser
)
{
browser
.
waitForElementVisible
(
'
#side-panel div[class^="treeview
"]'
)
.
waitForElementVisible
(
'
div[data-id="fileExplorerInit
"]'
)
.
assert
.
visible
(
'ul[key="browser"]'
)
.
click
(
'
li[key="browser"] > div[key="browser"] > div.fas
'
)
.
click
(
'
div[data-id="toggle_browser"]
'
)
.
assert
.
hidden
(
'ul[key="browser"]'
)
.
click
(
'
li[key="browser"] > div[key="browser"] > div.fas
'
)
.
click
(
'
div[data-id="toggle_browser"]
'
)
.
assert
.
visible
(
'ul[key="browser"]'
)
},
'Switch Tabs using tabs icon'
:
function
(
browser
)
{
browser
.
waitForElementVisible
(
'
#side-panel div[class^="treeview
"]'
)
.
waitForElementVisible
(
'
div[data-id="fileExplorerInit
"]'
)
.
switchFile
(
'browser/3_Ballot.sol'
)
.
assert
.
containsText
(
'div[title="browser/3_Ballot.sol"]
> span
'
,
'3_Ballot.sol'
)
.
click
(
'
div.dropdown.px-1 > span.dropdownCaret
'
)
.
assert
.
containsText
(
'div[title="browser/3_Ballot.sol"]'
,
'3_Ballot.sol'
)
.
click
(
'
span[class^=dropdownCaret]
'
)
.
click
(
'#homeItem'
)
.
assert
.
containsText
(
'div[title="home"]
> span
'
,
'Home'
)
.
assert
.
containsText
(
'div[title="home"]'
,
'Home'
)
.
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