From 2d7103485d175f7cbf07e2260209169536d78d7e Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Tue, 19 Oct 2021 12:55:08 +0100 Subject: [PATCH] close all files to make test work --- apps/remix-ide-e2e/src/tests/plugin_api.ts | 1 - apps/remix-ide/src/app/panels/file-panel.js | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide-e2e/src/tests/plugin_api.ts b/apps/remix-ide-e2e/src/tests/plugin_api.ts index 99867259ed..fc7f977251 100644 --- a/apps/remix-ide-e2e/src/tests/plugin_api.ts +++ b/apps/remix-ide-e2e/src/tests/plugin_api.ts @@ -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 { diff --git a/apps/remix-ide/src/app/panels/file-panel.js b/apps/remix-ide/src/app/panels/file-panel.js index 4ed0e6c8c9..f91ef5e2b7 100644 --- a/apps/remix-ide/src/app/panels/file-panel.js +++ b/apps/remix-ide/src/app/panels/file-panel.js @@ -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)