From 1e325fe28ea301b215a29fcc5343a02ff7e9aae4 Mon Sep 17 00:00:00 2001 From: Justin Palmer Date: Wed, 13 Feb 2013 13:44:03 -0800 Subject: [PATCH] need a hand with these specs --- .../command-panel/spec/command-panel-spec.coffee | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/packages/command-panel/spec/command-panel-spec.coffee b/src/packages/command-panel/spec/command-panel-spec.coffee index 99f886b03..7f068dbe3 100644 --- a/src/packages/command-panel/spec/command-panel-spec.coffee +++ b/src/packages/command-panel/spec/command-panel-spec.coffee @@ -128,6 +128,9 @@ describe "CommandPanel", -> beforeEach -> expect(commandPanel.previewList).toBeVisible() + it "shows the expand and collapse all buttons", -> + expect(commandPanel.find('.expand-collapse')).toBeVisible() + describe "when the preview list is focused", -> it "hides the command panel", -> expect(commandPanel.previewList).toMatchSelector(':focus') @@ -465,3 +468,12 @@ describe "CommandPanel", -> expect(editSession.buffer.getPath()).toBe project.resolve(operation.getPath()) expect(editSession.getSelectedBufferRange()).toEqual operation.getBufferRange() expect(previewList.focus).toHaveBeenCalled() + + describe "when a path in the preview list is clicked", -> + it "shows and hides the matches for that path", -> + previewList.find('li.path:first-child').mousedown() + expect(previewList.find('li.path:first-child ul.matches')).toBeHidden() + + previewList.find('li.path:first-child').mousedown() + expect(previewList.find('li.path:first-child ul.matches')).toBeVisible() +