Commit ced308e8 authored by LianaHus's avatar LianaHus Committed by ioedeveloper

fixed the test

parent 69a34c89
......@@ -104,8 +104,8 @@ function fileExplorer (localRegistry, files, menuItems) {
self.ensureRoot(() => {
const folderpath = filepath.split('/').slice(0, -1).join('/')
const currentTree = self.treeView.nodeAt(folderpath)
if (currentTree && self.treeView.isExpanded(folderpath)) {
if (!self.treeView.isExpanded(folderpath)) self.treeView.expand(folderpath)
if (currentTree) {
self.files.resolveDirectory(folderpath, (error, fileTree) => {
if (error) console.error(error)
if (!fileTree) return
......@@ -136,7 +136,7 @@ function fileExplorer (localRegistry, files, menuItems) {
if (!fileTree) return
fileTree = normalize(folderpath, fileTree)
self.treeView.updateNodeFromJSON(folderpath, fileTree, true)
self.treeview.expand(folderpath)
if (!self.treeView.isExpanded(folderpath)) self.treeView.expand(folderpath)
})
})
}
......
......@@ -494,10 +494,11 @@ module.exports = class TestTab extends ViewPlugin {
this.testsExecutionStopped = yo`<label class="text-warning h6" data-id="testTabTestsExecutionStopped">The test execution has been stopped</label>`
this.testsExecutionStoppedError = yo`<label class="text-danger h6" data-id="testTabTestsExecutionStoppedError">The test execution has been stopped because of error(s) in your test file</label>`
this.uiPathList = yo`<datalist id="utPathList"></datalist>`
const placeHolderPath = 'browser/tests'
const availablePaths = yo`
<div>
<input
placeholder="browser/tests"
placeholder=${placeHolderPath}
list="utPathList"
class="custom-select"
id="utPath"
......@@ -544,6 +545,7 @@ module.exports = class TestTab extends ViewPlugin {
</div>
`
this._view.el = el
this.testTabLogic.setCurrentPath(placeHolderPath)
this.updateForNewCurrent(this.fileManager.currentFile())
return el
}
......
......@@ -22,8 +22,7 @@ module.exports = {
.waitForElementVisible('*[data-id="modalDialogContainer"]')
.setValue('*[data-id="modalDialogCustomPromptText"]', '5_New_contract.sol')
.modalFooterOKClick()
.pause(2000)
.waitForElementVisible('*[data-id="treeViewLibrowser/5_New_contract.sol"]')
.waitForElementVisible('*[data-id="treeViewLibrowser/5_New_contract.sol"]', 7000)
},
'Should rename `5_New_contract.sol` to 5_Renamed_Contract.sol': function (browser) {
......@@ -82,8 +81,7 @@ module.exports = {
.click('*[data-id="fileExplorerNewFilepublishToGist"]')
.waitForElementVisible('*[data-id="modalDialogContainer"]')
.modalFooterOKClick()
.pause(10000)
.waitForElementVisible('*[data-id="modalDialogContainer"]')
.waitForElementVisible('*[data-id="modalDialogContainer"]', 7000)
.modalFooterOKClick()
.pause(2000)
.perform((done) => {
......
......@@ -37,7 +37,6 @@ module.exports = {
.click('*[data-id="compilerContainerCompileBtn"]')
.pause(3000)
.click('*[data-id="verticalIconsKindfileExplorers"]')
.openFile('browser/artifacts')
.openFile('browser/artifacts/Ballot.json')
},
......
......@@ -45,7 +45,6 @@ module.exports = {
.modalFooterCancelClick()
.executeScript(`remix.loadgist('${gistid}')`)
.perform((done) => { if (runtimeBrowser === 'chrome') { browser.openFile('browser/gists') } done() })
.openFile(`browser/gists/${gistid}`)
.openFile(`browser/gists/${gistid}/1_Storage.sol`)
.perform(done)
}
......@@ -86,7 +85,6 @@ module.exports = {
.waitForElementVisible('*[data-id="modalDialogCustomPromptText"]')
.setValue('*[data-id="modalDialogCustomPromptText"]', testData.validGistId)
.modalFooterOKClick()
.openFile(`browser/gists/${testData.validGistId}`)
.openFile(`browser/gists/${testData.validGistId}/ApplicationRegistry`)
.waitForElementVisible(`div[title='browser/gists/${testData.validGistId}/ApplicationRegistry']`)
.assert.containsText(`div[title='browser/gists/${testData.validGistId}/ApplicationRegistry'] > span`, 'ApplicationRegistry')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment