diff --git a/src/packages/command-panel/lib/command-panel-view.coffee b/src/packages/command-panel/lib/command-panel-view.coffee index 74806feda..a0255a6c0 100644 --- a/src/packages/command-panel/lib/command-panel-view.coffee +++ b/src/packages/command-panel/lib/command-panel-view.coffee @@ -141,6 +141,7 @@ class CommandPanelView extends View else @detach() catch error + @loadingMessage.hide() if error.name is "SyntaxError" @flashError() return diff --git a/src/packages/command-panel/spec/command-panel-spec.coffee b/src/packages/command-panel/spec/command-panel-spec.coffee index cf86ae0b4..782399da3 100644 --- a/src/packages/command-panel/spec/command-panel-spec.coffee +++ b/src/packages/command-panel/spec/command-panel-spec.coffee @@ -345,13 +345,15 @@ describe "CommandPanel", -> # there shouldn't be any dangling operations after this describe "if the command is malformed", -> - it "adds and removes an error class to the command panel and does not close it", -> + it "adds and removes an error class to the command panel and does not close it or display a loading message", -> + rootView.attachToDom() rootView.trigger 'command-panel:toggle' commandPanel.miniEditor.insertText 'garbage-command!!' commandPanel.miniEditor.hiddenInput.trigger keydownEvent('enter') expect(commandPanel.parent()).toExist() expect(commandPanel).toHaveClass 'error' + expect(commandPanel.loadingMessage).toBeHidden() advanceClock 400