Attach to DOM before checking visibility

This commit is contained in:
Kevin Sawicki
2013-02-13 17:12:40 -08:00
parent 1922034df5
commit 1a8bba4d70

View File

@@ -471,6 +471,8 @@ describe "CommandPanel", ->
describe "when a path in the preview list is clicked", ->
it "shows and hides the matches for that path", ->
rootView.attachToDom()
expect(previewList.find('li.path:first-child ul.matches')).toBeVisible()
previewList.find('li.path:first-child').mousedown()
expect(previewList.find('li.path:first-child ul.matches')).toBeHidden()