Fixed failing test

pull/5370/head
ioedeveloper 5 years ago
parent f9312dfb58
commit 3c2d12d157
  1. 4
      src/app/files/file-explorer.js
  2. 2
      test-browser/tests/remixd.test.js

@ -288,7 +288,7 @@ function fileExplorer (localRegistry, files, menuItems) {
tooltip(`failed to remove file ${key}.`)
} else {
const { type } = fileManager.currentFileProvider()
console.log('file deleted!')
self.updatePath(type)
}
},
@ -399,6 +399,8 @@ function fileExplorer (localRegistry, files, menuItems) {
fileExplorer.prototype.updatePath = function (path) {
this.files.resolveDirectory(path, (error, fileTree) => {
console.log('path: ', path)
console.log('fileTree: ', fileTree)
if (error) console.error(error)
if (!fileTree) return
var newTree = normalize(path, fileTree)

@ -115,6 +115,8 @@ function runTests (browser, testData) {
})
.clickLaunchIcon('fileExplorers')
.waitForElementVisible('[data-path="localhost/folder1"]')
.click('[data-path="localhost/folder1"]')
.click('[data-path="localhost/folder1"]') // click twice because remixd does not return nested folder details after update
.waitForElementVisible('[data-path="localhost/folder1/contract1.sol"]')
.waitForElementVisible('[data-path="localhost/folder1/renamed_contract_' + browserName + '.sol"]') // check if renamed file is preset
.waitForElementNotPresent('[data-path="localhost/folder1/contract_' + browserName + '.sol"]') // check if renamed (old) file is not present

Loading…
Cancel
Save