         ensure text: "\nabc\ndef\n"
 
       narrow.waitsForRefresh ->
-        dispatchEditorCommand('narrow:refresh')
+        runCommand('narrow:refresh')
 
       runs ->
         ensure text: originalText
 
   describe "narrow:next-item, narrow:previous-item", ->
-    nextItem = -> runs -> narrow.waitsForConfirm -> dispatchEditorCommand('narrow:next-item')
-    previousItem = -> runs -> narrow.waitsForConfirm -> dispatchEditorCommand('narrow:previous-item')
+    nextItem = -> runs -> narrow.waitsForConfirm -> runCommand('narrow:next-item')
+    previousItem = -> runs -> narrow.waitsForConfirm -> runCommand('narrow:previous-item')
 
     describe "basic behavior", ->
       beforeEach ->


      runs ->
        expect(Ui.getSize()).toBe(4)
        paneForItem(editor).activate()
        ensureEditorIsActive(editor)
        dispatchEditorCommand('narrow:close')
        expect(Ui.getSize()).toBe(3)
        dispatchEditorCommand('narrow:close')
        expect(Ui.getSize()).toBe(2)
        dispatchEditorCommand('narrow:close')
        expect(Ui.getSize()).toBe(1)
        dispatchEditorCommand('narrow:close')
        expect(Ui.getSize()).toBe(0)
        dispatchEditorCommand('narrow:close')
        expect(Ui.getSize()).toBe(0)

  describe "narrow:refresh", ->
    beforeEach ->

      ensureEditorIsActive(ui.editor)
      ensure cursor: [1, 0], selectedItemRow: 1

      runCommand('narrow:focus-prompt'); ensureEditorIsActive(ui.editor)
      ensure cursor: [0, 0], selectedItemRow: 1

      # focus provider.editor
      runCommand('narrow:focus-prompt'); ensureEditorIsActive(editor)
      ensure cursor: [0, 0], selectedItemRow: 1

      # focus narrow-editor
      runCommand('narrow:focus-prompt'); ensureEditorIsActive(ui.editor)
      ensure cursor: [0, 0], selectedItemRow: 1

  describe "narrow:close", ->
