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

    it "closes the command panel", ->
      rootView.trigger 'command-panel:toggle'
      expect(rootView.find('.command-panel').view()).toBe commandPanel
      commandPanel.miniEditor.trigger keydownEvent('escape')
      expect(rootView.find('.command-panel')).not.toExist()

  describe "when return is pressed on the panel's editor", ->

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

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

