mirror of
https://github.com/atom/atom.git
synced 2026-01-24 14:28:14 -05:00
Don't show the move dialog when the project is selected
This commit is contained in:
@@ -849,6 +849,12 @@ describe "TreeView", ->
|
||||
expect(moveDialog.miniEditor.getText()).toBe(project.relativize(dotFilePath))
|
||||
expect(moveDialog.miniEditor.getSelectedText()).toBe '.dotfile'
|
||||
|
||||
describe "when the project is selected", ->
|
||||
it "doesn't display the move dialog", ->
|
||||
treeView.root.click()
|
||||
treeView.trigger "tree-view:move"
|
||||
expect(rootView.find(".tree-view-dialog").view()).not.toExist()
|
||||
|
||||
describe "tree-view:remove", ->
|
||||
it "shows the native alert dialog", ->
|
||||
fileView.click()
|
||||
|
||||
@@ -206,7 +206,7 @@ class TreeView extends ScrollView
|
||||
|
||||
moveSelectedEntry: ->
|
||||
entry = @selectedEntry()
|
||||
return unless entry
|
||||
return unless entry and entry isnt @root
|
||||
oldPath = entry.getPath()
|
||||
if entry instanceof FileView
|
||||
prompt = "Enter the new path for the file."
|
||||
|
||||
Reference in New Issue
Block a user