         MarkdownPreviewView::renderMarkdown.callCount > 0
 
       runs ->
-        [editorPane, previewPane] = atom.workspaceView.getPanes()
+        [editorPane, previewPane] = atom.workspaceView.getPaneViews()
         preview = previewPane.getActiveItem()
         expect(preview[0].innerHTML).toBe "content"


      runs ->
        expect(MarkdownPreviewView::renderMarkdown.callCount).toBeGreaterThan 0
        preview = atom.workspaceView.getActivePaneItem()
        expect(preview).toBeInstanceOf(MarkdownPreviewView)

        MarkdownPreviewView::renderMarkdown.reset()

        MarkdownPreviewView::renderMarkdown.callCount > 0

      runs ->
        [editorPane, previewPane] = atom.workspaceView.getPaneViews()
        preview = previewPane.getActiveItem()
        MarkdownPreviewView::renderMarkdown.reset()

    it "closes the existing preview when toggle is triggered a second time", ->
      atom.workspaceView.getActiveView().trigger 'markdown-preview:toggle'

      [editorPane, previewPane] = atom.workspaceView.getPaneViews()
      expect(editorPane).toHaveFocus()
      expect(previewPane?.activeItem).toBeUndefined()

