Force TreeView spec to wait until the file events have been handled.

Without this, the wrong files where being unwatched.
This commit is contained in:
Corey Johnson
2012-11-15 16:16:05 -08:00
parent 7f999f4a96
commit 765fedaf42

View File

@@ -777,8 +777,12 @@ describe "TreeView", ->
moveDialog.trigger 'core:confirm'
expect(fs.exists(newPath)).toBeTruthy()
expect(fs.exists(filePath)).toBeFalsy()
waitsFor "tree view to update", ->
treeView.root.find('> .entries > .directory:contains(new)').length > 0
runs ->
expect(fs.exists(newPath)).toBeTruthy()
expect(fs.exists(filePath)).toBeFalsy()
describe "when a file or directory already exists at the target path", ->
it "shows an error message and does not close the dialog", ->