Fixed broken writeFile function

pull/4/head
ioedeveloper 5 years ago
parent 0488a4cb0f
commit b5ce812bbc
  1. 8
      src/app/files/fileManager.js
  2. 2
      test-browser/helpers/init.js
  3. 1
      test-browser/tests/defaultLayout.test.js

@ -136,8 +136,12 @@ class FileManager extends Plugin {
* @returns {void}
*/
writeFile (path, data) {
this._handleIsFile(path, `Cannot write file ${path}`)
this.setFile(path, data)
if (this.exists(path)) {
this._handleIsFile(path, `Cannot write file ${path}`)
this.setFile(path, data)
} else {
this.setFile(path, data)
}
}
/**

@ -24,7 +24,7 @@ module.exports = function (browser, callback, url, preloadPlugins = true) {
}
function initModules (browser, callback) {
browser.pause(5000)
browser.pause(20000)
.click('#icon-panel div[plugin="pluginManager"]')
.scrollAndClick('#pluginManager article[id="remixPluginManagerListItem_solidity"] button')
.pause(5000)

@ -18,6 +18,7 @@ module.exports = {
browser.waitForElementVisible('div[data-id="remixIdeSidePanel"]')
.assert.containsText('h6[data-id="sidePanelSwapitTitle"]', 'FILE EXPLORERS')
.waitForElementVisible('div[data-id="filePanelFileExplorerTree"]')
.pause(1000000)
.waitForElementVisible('li[key="browser/4_Ballot_test.sol"]')
},

Loading…
Cancel
Save