close all files to make test work

indexworkspace2
bunsenstraat 3 years ago
parent 14fbd18b4f
commit 60cc2fd1b9
  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