2011-12-29 05:14:32 +04:00
|
|
|
$ = require 'jquery'
|
|
|
|
RootView = require 'root-view'
|
|
|
|
|
|
|
|
describe "RootView", ->
|
|
|
|
rootView = null
|
|
|
|
beforeEach -> rootView = RootView.build()
|
|
|
|
|
|
|
|
describe ".addPane(view)", ->
|
|
|
|
it "adds the given view to the rootView (at the bottom by default)", ->
|
|
|
|
expect(rootView.vertical.children().length).toBe 1
|
|
|
|
rootView.addPane $('<div id="foo">')
|
|
|
|
expect(rootView.vertical.children().length).toBe 2
|
|
|
|
|
2011-12-29 23:12:13 +04:00
|
|
|
xdescribe "toggleFileFinder", ->
|
2011-12-29 21:58:59 +04:00
|
|
|
it "shows the FileFinder when it is not on screen and hides it when it is", ->
|
2011-12-29 05:30:34 +04:00
|
|
|
#expect(rootView.find('.file-finder')).not.toExist()
|
|
|
|
# rootView.toggleFileFinder()
|
|
|
|
# expect(rootView.find('.file-finder')).toExist()
|
|
|
|
# rootView.toggleFileFinder()
|
|
|
|
# expect(rootView.find('.file-finder')).not.toExist()
|
|
|
|
|
|
|
|
it "shows urls for all files in the same directory as editor.url", ->
|
|
|
|
rootView.editor.open require.resolve('window.coffee')
|
2011-12-29 05:14:32 +04:00
|
|
|
rootView.toggleFileFinder()
|
2011-12-29 05:30:34 +04:00
|
|
|
expect(rootView.fileFinder.urlList.length).toBeGreaterThan 1
|
|
|
|
|
2011-12-29 05:14:32 +04:00
|
|
|
|