           atom.workspace.open("tagged.js")
 
         runs ->
-          editor = atom.workspaceView.getActivePaneItem()
+          editor = atom.workspace.getActiveEditor()
           editor.setCursorBufferPosition([6,24])
           spyOn(SymbolsView.prototype, "moveToPosition").andCallThrough()
           atom.workspaceView.getActiveView().trigger 'symbols-view:go-to-declaration'

      atom.workspace.open('sample.js')

    runs ->
      expect(atom.workspaceView.getActivePaneItem().getCursorBufferPosition()).toEqual [0,0]
      expect(atom.workspaceView.find('.symbols-view')).not.toExist()
      atom.workspaceView.getActiveView().trigger "symbols-view:toggle-file-symbols"


          atom.workspace.open("tagged.js")

        runs ->
          editor = atom.workspace.getActiveEditor()
          editor.setCursorBufferPosition([8,14])
          spyOn(SymbolsView.prototype, "moveToPosition").andCallThrough()
          atom.workspaceView.getActiveView().trigger 'symbols-view:go-to-declaration'
