           atom.commands.dispatch(treeView.element, 'tree-view:open-selected-entry-right')
 
     it "should have opened all windows", ->
-      expect(atom.workspace.getPanes().length).toBe 9
+      expect(getCenter().getPanes().length).toBe 9
 
     [0..8].forEach (index) ->
       paneNumber = index + 1

        describe "when the first pane is focused, a file is opened that is already open in the second pane", ->
          firstPane = null
          beforeEach ->
            firstPane = atom.workspace.getPanes()[0]
            firstPane.activate()
            selectEntry 'tree-view.txt'
            waitsForFileToOpen ->

                atom.commands.dispatch treeView.element, command

            it "opens the file in pane #{paneNumber} and focuses it", ->
              pane = getCenter().getPanes()[index]
              item = atom.workspace.getActivePaneItem()
              expect(atom.views.getView(pane)).toHaveFocus()
              expect(item.getPath()).toBe atom.project.getDirectories()[0].resolve(fileName)
