         expect(resultsView.find("li").length).toBe resultsView.getPathCount() + resultsView.getMatchCount()
 
   describe "arrowing through the list", ->
-    describe "when nothing is selected", ->
-      beforeEach ->
-        projectFindView.findEditor.setText('items')
-        projectFindView.trigger 'core:confirm'
-
-      it "doesnt error when the user arrows down", ->
-        waitsForPromise ->
-          searchPromise
-
-        runs ->
-          resultsView = getResultsView()
-          resultsView.find('.selected').removeClass('selected')
-          expect(resultsView.find('.selected')).not.toExist()
-          resultsView.trigger 'core:move-down'
-          expect(resultsView.find('.selected')).toExist()
-
-      it "doesnt error when the user arrows up", ->
-        waitsForPromise ->
-          searchPromise
-
-        runs ->
-          resultsView = getResultsView()
-          resultsView.find('.selected').removeClass('selected')
-          expect(resultsView.find('.selected')).not.toExist()
-          resultsView.trigger 'core:move-up'
-          expect(resultsView.find('.selected')).toExist()
-
-    it "arrows through the list without selecting paths", ->
+    resultsView = null
+
+    it "opens the correct file containing the result when 'core:confirm' is called", ->
       openHandler = null
 
       waitsForPromise ->


          lastSelectedItem = selectedItem[0]

    it "collapsed vs expanded transition next", ->
      projectFindView.findEditor.setText('items')
      projectFindView.trigger 'core:confirm'

      waitsForPromise ->
        searchPromise

      runs ->
        resultsView = getResultsView()

        # collapsed case
        resultsView.find('.selected').removeClass('selected')
        resultsView.find('.path:eq(0) .search-result:last').addClass('selected')
        resultsView.find('.path:eq(1)').view().expand(false)

        resultsView.trigger 'core:move-down'

        selectedItem = resultsView.find('.selected')
        expect(selectedItem).toHaveClass('path')
        expect(selectedItem[0]).toBe resultsView.find('.path:eq(1)')[0]

        # expanded case
        resultsView.find('.selected').removeClass('selected')
        resultsView.find('.path:eq(0) .search-result:last').addClass('selected')
        resultsView.find('.path:eq(1)').view().expand(true)

        resultsView.trigger 'core:move-down'

        selectedItem = resultsView.find('.selected')
        expect(selectedItem).toHaveClass('search-result')
        expect(selectedItem[0]).toBe resultsView.find('.path:eq(1) .search-result:first')[0]


    it "collapsed vs expanded transition previous", ->
      projectFindView.findEditor.setText('items')
      projectFindView.trigger 'core:confirm'

      waitsForPromise ->
        searchPromise

      runs ->
        resultsView = getResultsView()

        # collapsed case
        resultsView.find('.selected').removeClass('selected')
        resultsView.find('.path:eq(1) .search-result:first').addClass('selected')
        resultsView.find('.path:eq(0)').view().expand(false)

        resultsView.trigger 'core:move-up'

        selectedItem = resultsView.find('.selected')
        expect(selectedItem).toHaveClass('path')
        expect(selectedItem[0]).toBe resultsView.find('.path:eq(0)')[0]

        # expanded case
        resultsView.find('.selected').removeClass('selected')
        resultsView.find('.path:eq(1) .search-result:first').addClass('selected')
        resultsView.find('.path:eq(0)').view().expand(true)

        resultsView.trigger 'core:move-up'

        selectedItem = resultsView.find('.selected')
        expect(selectedItem).toHaveClass('search-result')
        expect(selectedItem[0]).toBe resultsView.find('.path:eq(0) .search-result:last')[0]

    it "collapse current list", ->
      projectFindView.findEditor.setText('items')
      projectFindView.trigger 'core:confirm'

      waitsForPromise ->
        searchPromise

      runs ->
        resultsView = getResultsView()

        # select item in first list
        resultsView.find('.selected').removeClass('selected')
        resultsView.find('.path:eq(0) .search-result:first').addClass('selected')

        expect(selectedItem).toHaveClass('search-result')
        expect(selectedItem[0]).toBe resultsView.find('.path:eq(0) .search-result:first')[0]

      describe "when nothing is selected", ->
        it "doesnt error when the user arrows down", ->
          resultsView.find('.selected').removeClass('selected')
          expect(resultsView.find('.selected')).not.toExist()
          resultsView.trigger 'core:move-down'
          expect(resultsView.find('.selected')).toExist()

        it "doesnt error when the user arrows up", ->
          resultsView.find('.selected').removeClass('selected')
          expect(resultsView.find('.selected')).not.toExist()
          resultsView.trigger 'core:move-up'
          expect(resultsView.find('.selected')).toExist()

      describe "when there are collapsed results", ->
        it "moves to the correct next result when a path is selected", ->
          resultsView.find('.selected').removeClass('selected')
          resultsView.find('.path:eq(0) .search-result:last').addClass('selected')
          resultsView.find('.path:eq(1)').view().expand(false)

          resultsView.trigger 'core:move-down'

          selectedItem = resultsView.find('.selected')
          expect(selectedItem).toHaveClass('path')
          expect(selectedItem[0]).toBe resultsView.find('.path:eq(1)')[0]

        it "moves to the correct previous result when a path is selected", ->
          resultsView.find('.selected').removeClass('selected')
          resultsView.find('.path:eq(1) .search-result:first').addClass('selected')
          resultsView.find('.path:eq(0)').view().expand(false)

          resultsView.trigger 'core:move-up'

          selectedItem = resultsView.find('.selected')
          expect(selectedItem).toHaveClass('path')
          expect(selectedItem[0]).toBe resultsView.find('.path:eq(0)')[0]

  describe "when the results view is empty", ->
    it "ignores core:confirm events", ->
