Skip to content

Commit

Permalink
Update naming convention for unique identifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
ioedeveloper committed Feb 12, 2020
1 parent 53c4f1e commit 0fd852b
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 32 deletions.
2 changes: 1 addition & 1 deletion src/app/components/side-panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export class SidePanel extends AbstractPanel {

return yo`
<header class="${css.swapitHeader} px-3">
<h6 class="${css.swapitTitle}" data-id="sidePanelFileExplorerTitle">${name}</h6>
<h6 class="${css.swapitTitle}" data-id="sidePanelSwapitTitle">${name}</h6>
${docLink}
${versionWarning}
</header>
Expand Down
6 changes: 3 additions & 3 deletions src/app/components/vertical-icons.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ export class VerticalIcons extends Plugin {
this.appManager.ensureActivated('home')
}}"
plugin="home" title="Home"
data-id="iconPanelHomeIcon"
data-id="verticalIconsHomeIcon"
>
<svg id="Ebene_2" data-name="Ebene 2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 105 100">
<title>remix_logo1</title>
Expand All @@ -239,7 +239,7 @@ export class VerticalIcons extends Plugin {
</div>`

this.iconKind['fileexplorer'] = yo`
<div id='fileExplorerIcons' data-id="fileExplorerIcons">
<div id='fileExplorerIcons' data-id="verticalIconsFileExplorerIcons">
</div>
`

Expand Down Expand Up @@ -274,7 +274,7 @@ export class VerticalIcons extends Plugin {
`

this.iconKind['settings'] = yo`
<div id='settingsIcons' data-id="settingsIcons">
<div id='settingsIcons' data-id="verticalIconsSettingsIcons">
</div>
`

Expand Down
2 changes: 1 addition & 1 deletion src/app/panels/file-panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ module.exports = class Filepanel extends ViewPlugin {

const explorers = yo`
<div>
<div class=${css.treeview} data-id="sidePanelFileExplorerTree">${fileExplorer.init()}</div>
<div class=${css.treeview} data-id="filePanelFileExplorerTree">${fileExplorer.init()}</div>
<div class="filesystemexplorer ${css.treeview}">${fileSystemExplorer.init()}</div>
</div>
`
Expand Down
10 changes: 5 additions & 5 deletions src/app/panels/terminal.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,14 @@ class Terminal extends Plugin {

self._view.input.innerText = '\n'
self._view.cli = yo`
<div id="terminalCli" data-id="mainPanelTerminalCli" 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" data-id="mainPanelToggleTerminal"></i>`
class="btn btn-secondary btn-sm align-items-center ${css.toggleTerminal} fas fa-angle-double-down" data-id="terminalToggleIcon"></i>`
self._view.dragbar = yo`
<div onmousedown=${mousedown} class=${css.dragbarHorizontal}></div>`

Expand All @@ -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" data-id="mainPanelToggleTerminalMenu">
<div class="${css.menu} border-top border-dark bg-light" data-id="terminalToggleMenu">
${self._view.icon}
<div class=${css.clear} id="clearConsole" onclick=${clear}>
<i class="fas fa-ban" aria-hidden="true" title="Clear console"
Expand Down Expand Up @@ -177,9 +177,9 @@ class Terminal extends Plugin {
</div>
`
self._view.term = yo`
<div class="${css.terminal_container}" data-id="mainPanelTerminalContainer" onscroll=${throttle(reattach, 10)} onclick=${focusinput}>
<div class="${css.terminal_container}" data-id="terminalContainer" onscroll=${throttle(reattach, 10)} onclick=${focusinput}>
${self._components.autoCompletePopup.render()}
<div class="bg-secondary" data-id="mainPanelTerminalContainer" style="
<div class="bg-secondary" data-id="terminalContainerDisplay" style="
position: absolute;
height: 100%;
width: 100%;
Expand Down
2 changes: 1 addition & 1 deletion src/app/ui/TreeView.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +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', `sidePanelToggle${keyPath}`)
caret.setAttribute('data-id', `treeViewToggle${keyPath}`)
label.onclick = function () {
self.expand(keyPath)
}
Expand Down
4 changes: 2 additions & 2 deletions src/app/ui/landing-page/landing-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -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" data-id="mainPanelHomeContainer">
let container = yo`<div class="${css.homeContainer} bg-light" data-id="landingPageHomeContainer">
<div>
<div class="alert alert-info clearfix ${css.thisJumboton}">
<div class="${css.headlineContainer}">
Expand All @@ -189,7 +189,7 @@ export class LandingPage extends ViewPlugin {
</div>
</div><!-- end of jumbotron -->
</div><!-- end of jumbotron container -->
<div class="row ${css.hpSections}" data-id="mainPanelHpSections">
<div class="row ${css.hpSections}" data-id="landingPageHpSections">
<div id="col1" class="col-sm-7">
<div class="mb-5">
<h4>Environments</h4>
Expand Down
38 changes: 19 additions & 19 deletions test-browser/tests/homepage.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,64 +8,64 @@ module.exports = {
},
'Loads Icon\'s Panel': function (browser) {
browser.waitForElementVisible('div[data-id="remixIdeIconPanel"]', 10000)
.waitForElementVisible('div[data-id="iconPanelHomeIcon"]')
.waitForElementVisible('div[data-id="verticalIconsHomeIcon"]')
.waitForElementVisible('div[plugin="fileExplorers"]')
.waitForElementVisible('div[plugin="pluginManager"]')
.waitForElementVisible('div[plugin="settings"]')
},

'Loads Side Panel': function (browser) {
browser.waitForElementVisible('div[data-id="remixIdeSidePanel"]')
.assert.containsText('h6[data-id="sidePanelFileExplorerTitle"]', 'FILE EXPLORERS')
.waitForElementVisible('div[data-id="sidePanelFileExplorerTree"]')
.assert.containsText('h6[data-id="sidePanelSwapitTitle"]', 'FILE EXPLORERS')
.waitForElementVisible('div[data-id="filePanelFileExplorerTree"]')
.waitForElementVisible('li[key="browser/4_Ballot_test.sol"]')
},

'Loads Main View': function (browser) {
browser.waitForElementVisible('div[data-id="mainPanelPluginsContainer"]')
.waitForElementVisible('div[data-id="mainPanelHomeContainer"]')
.waitForElementVisible('div[data-id="mainPanelHpSections"]')
.waitForElementVisible('div[data-id="mainPanelTerminalContainer"]')
.waitForElementVisible('div[data-id="landingPageHomeContainer"]')
.waitForElementVisible('div[data-id="landingPageHpSections"]')
.waitForElementVisible('div[data-id="terminalContainer"]')
},

'Loads terminal': function (browser) {
browser
.waitForElementVisible('div[data-id="mainPanelTerminalCli"]', 10000)
.waitForElementVisible('div[data-id="terminalCli"]', 10000)
.journalLastChildIncludes('Welcome to Remix')
},

'Toggles Side Panel': function (browser) {
browser.waitForElementVisible('div[data-id="remixIdeSidePanel"]')
.assert.containsText('h6[data-id="sidePanelFileExplorerTitle"]', 'FILE EXPLORERS')
.assert.containsText('h6[data-id="sidePanelSwapitTitle"]', 'FILE EXPLORERS')
.clickLaunchIcon('fileExplorers')
.assert.hidden('div[data-id="remixIdeSidePanel"]')
.clickLaunchIcon('fileExplorers')
.assert.visible('div[data-id="remixIdeSidePanel"]')
.assert.containsText('h6[data-id="sidePanelFileExplorerTitle"]', 'FILE EXPLORERS')
.assert.containsText('h6[data-id="sidePanelSwapitTitle"]', 'FILE EXPLORERS')
},

'Toggles Terminal': function (browser) {
browser.waitForElementVisible('div[data-id="mainPanelTerminalContainer"]')
.assert.visible('div[data-id="mainPanelTerminalContainer"]')
.click('i[data-id="mainPanelToggleTerminal"]')
.checkElementStyle('div[data-id="mainPanelToggleTerminalMenu"]', 'height', '35px')
.click('i[data-id="mainPanelToggleTerminal"]')
.assert.visible('div[data-id="mainPanelTerminalContainer"]')
browser.waitForElementVisible('div[data-id="terminalContainer"]')
.assert.visible('div[data-id="terminalContainerDisplay"]')
.click('i[data-id="terminalToggleIcon"]')
.checkElementStyle('div[data-id="terminalToggleMenu"]', 'height', '35px')
.click('i[data-id="terminalToggleIcon"]')
.assert.visible('div[data-id="terminalContainerDisplay"]')
},

'Toggles File Explorer Browser': function (browser) {
browser
.waitForElementVisible('div[data-id="sidePanelFileExplorerTree"]')
.waitForElementVisible('div[data-id="filePanelFileExplorerTree"]')
.assert.visible('ul[key="browser"]')
.click('div[data-id="sidePanelTogglebrowser"]')
.click('div[data-id="treeViewTogglebrowser"]')
.assert.hidden('ul[key="browser"]')
.click('div[data-id="sidePanelTogglebrowser"]')
.click('div[data-id="treeViewTogglebrowser"]')
.assert.visible('ul[key="browser"]')
},

'Switch Tabs using tabs icon': function (browser) {
browser
.waitForElementVisible('div[data-id="sidePanelFileExplorerTree"]')
.waitForElementVisible('div[data-id="filePanelFileExplorerTree"]')
.switchFile('browser/3_Ballot.sol')
.assert.containsText('div[title="browser/3_Ballot.sol"]', '3_Ballot.sol')
.click('span[class^=dropdownCaret]')
Expand Down

0 comments on commit 0fd852b

Please sign in to comment.