Commit 60cc2fd1 authored by bunsenstraat's avatar bunsenstraat

close all files to make test work

parent 14fbd18b
'use strict' 'use strict'
import { ExternalProfile, LocationProfile, Profile } from '@remixproject/plugin-utils' import { ExternalProfile, LocationProfile, Profile } from '@remixproject/plugin-utils'
import { NightwatchBrowser } from 'nightwatch' import { NightwatchBrowser } from 'nightwatch'
import { resolve } from 'url'
import init from '../helpers/init' import init from '../helpers/init'
declare global { declare global {
......
...@@ -251,6 +251,7 @@ module.exports = class Filepanel extends ViewPlugin { ...@@ -251,6 +251,7 @@ module.exports = class Filepanel extends ViewPlugin {
if (checkSpecialChars(workspaceName) || checkSlash(workspaceName)) throw new Error('special characters are not allowed') if (checkSpecialChars(workspaceName) || checkSlash(workspaceName)) throw new Error('special characters are not allowed')
if (await this.workspaceExists(workspaceName)) throw new Error('workspace already exists') if (await this.workspaceExists(workspaceName)) throw new Error('workspace already exists')
else { else {
await this.call('fileManager', 'closeAllFiles')
const workspaceProvider = this._deps.fileProviders.workspace const workspaceProvider = this._deps.fileProviders.workspace
await this.processCreateWorkspace(workspaceName) await this.processCreateWorkspace(workspaceName)
workspaceProvider.setWorkspace(workspaceName) workspaceProvider.setWorkspace(workspaceName)
......
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