fixed cloas all files

pull/5370/head
lianahus 4 years ago committed by Liana Husikyan
parent cd6ea67dfb
commit d178598e80
  1. 2
      apps/remix-ide-e2e/src/tests/workspace.test.ts
  2. 3
      libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx

@ -47,7 +47,7 @@ module.exports = {
.execute(function () { document.querySelector('*[data-id="modalDialogCustomPromptTextCreate"]')['value'] = 'workspace_name_1' })
.click('*[data-id="workspacesModalDialogModalDialogModalFooter-react"] .modal-ok')
.waitForElementVisible('*[data-id="treeViewLitreeViewItemtests"]')
.waitForElementNotPresent('*[data-id="treeViewLitreeViewItemtest.sol"]')
.waitForElementNotPresent('*[data-id="treeViewLitreeViewItemtest.sol"]', 60000)
.click('*[data-id="workspacesSelect"] option[value="workspace_name"]')
.waitForElementVisible('*[data-id="treeViewLitreeViewItemtests"]')
},

@ -119,6 +119,7 @@ export const Workspace = (props: WorkspaceProps) => {
const createNewWorkspace = async (workspaceName) => {
try {
await props.fileManager.closeAllFiles()
await props.createWorkspace(workspaceName)
await setWorkspace(workspaceName)
toast('New default workspace has been created.')
@ -127,6 +128,7 @@ export const Workspace = (props: WorkspaceProps) => {
console.error(e)
}
}
const [state, setState] = useState({
workspaces: [],
reset: false,
@ -224,6 +226,7 @@ export const Workspace = (props: WorkspaceProps) => {
const workspaceName = workspaceCreateInput.current.value
try {
await props.fileManager.closeAllFiles()
await props.createWorkspace(workspaceName)
await setWorkspace(workspaceName)
} catch (e) {

Loading…
Cancel
Save