do not select the extension of a file path when the move dialog triggered

This commit is contained in:
Corey Johnson
2012-05-01 14:26:45 -07:00
parent 0227b11bf3
commit 17fb34ec96
2 changed files with 7 additions and 3 deletions

View File

@@ -391,11 +391,13 @@ describe "TreeView", ->
treeView.trigger "tree-view:move"
moveDialog = rootView.find(".move-dialog").view()
it "opens a move dialog with the file's current path populated", ->
it "opens a move dialog with the file's current path (excluding extension) populated", ->
extension = fs.extension(filePath)
fileNameWithoutExtension = fs.base(filePath, extension)
expect(moveDialog).toExist()
expect(moveDialog.prompt.text()).toBe "Enter the new path for the file:"
expect(moveDialog.editor.getText()).toBe(project.relativize(filePath))
expect(moveDialog.editor.getSelectedText()).toBe fs.base(filePath)
expect(moveDialog.editor.getSelectedText()).toBe fs.base(fileNameWithoutExtension)
expect(moveDialog.editor.isFocused).toBeTruthy()
describe "when the path is changed and confirmed", ->