 
           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()
-
+    describe "when there are a list of items", ->
+      beforeEach ->
+        projectFindView.findEditor.setText('items')
+        projectFindView.trigger 'core:confirm'
+        waitsForPromise -> searchPromise
+        runs -> resultsView = getResultsView()
+
+      it "collapses the selected results view", ->
         # 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 the results view is empty", ->
    it "ignores core:confirm events", ->

        activePane = atom.workspaceView.getActivePaneView()
        expect(atom.workspace.getActivePaneItem().getPath()).toContain('sample.')

    it "arrows through the entire list without selecting paths and overshooting the boundaries", ->
      waitsForPromise ->
        atom.workspace.open('sample.js')

