           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

              atom.commands.dispatch treeView.element, command

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

        activePaneItem = null

        beforeEach ->
          firstPane = getCenter().getPanes()[0]
          firstPane.activate()

          treeView.focus()
