close all files to make test work

pull/5370/head
bunsenstraat 3 years ago
parent c30077e14e
commit 2d7103485d
  1. 1
      apps/remix-ide-e2e/src/tests/plugin_api.ts
  2. 1
      apps/remix-ide/src/app/panels/file-panel.js

@ -1,7 +1,6 @@
'use strict'
import { ExternalProfile, LocationProfile, Profile } from '@remixproject/plugin-utils'
import { NightwatchBrowser } from 'nightwatch'
import { resolve } from 'url'
import init from '../helpers/init'
declare global {

@ -251,6 +251,7 @@ module.exports = class Filepanel extends ViewPlugin {
if (checkSpecialChars(workspaceName) || checkSlash(workspaceName)) throw new Error('special characters are not allowed')
if (await this.workspaceExists(workspaceName)) throw new Error('workspace already exists')
else {
await this.call('fileManager', 'closeAllFiles')
const workspaceProvider = this._deps.fileProviders.workspace
await this.processCreateWorkspace(workspaceName)
workspaceProvider.setWorkspace(workspaceName)

Loading…
Cancel
Save