     it "closes the command panel", ->
       rootView.trigger 'command-panel:toggle'
       expect(rootView.find('.command-panel').view()).toBe commandPanel
-      commandPanel.miniEditor.trigger keydownEvent('escape')
+      commandPanel.miniEditor.hiddenInput.trigger keydownEvent('escape')
       expect(rootView.find('.command-panel')).not.toExist()
 
   describe "when return is pressed on the panel's editor", ->

      spyOn(commandPanel, 'execute')
      rootView.trigger 'command-panel:toggle'
      commandPanel.miniEditor.insertText 's/hate/love/g'
      commandPanel.miniEditor.trigger keydownEvent('enter')

      expect(commandPanel.execute).toHaveBeenCalled()


        rootView.trigger 'command-panel:toggle'
        commandPanel.miniEditor.insertText 'garbage-command!!'

        commandPanel.miniEditor.hiddenInput.trigger keydownEvent('enter')
        expect(commandPanel.parent()).toExist()
        expect(commandPanel).toHaveClass 'error'

