         expect(atom.workspace.getActiveEditor().getCursorBufferPosition()).toEqual [5,2]
         SymbolsView::moveToPosition.reset()
         atom.workspace.getActiveEditor().setCursorBufferPosition([14,2])
-        atom.workspaceView.getActiveView().trigger 'symbols-view:go-to-declaration'
+        atom.commands.dispatch(atom.views.getView(atom.workspace), 'symbols-view:go-to-declaration')
 
       waitsFor ->
         SymbolsView::moveToPosition.callCount is 1

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

      waitsFor ->
        SymbolsView::moveToPosition.callCount is 1

        runs ->
          editor = atom.workspace.getActiveEditor()
          editor.setCursorBufferPosition([6,0])
          atom.commands.dispatch(atom.views.getView(atom.workspace), 'symbols-view:return-from-declaration')
          expect(editor.getCursorBufferPosition()).toEqual [6,0]

      it "returns to previous row and column", ->
