       describe "when the preview is not the active item and not in the active pane", ->
         it "re-renders the preview and makes it active", ->
           markdownEditor = atom.workspace.getActiveTextEditor()
-          [editorPane, previewPane] = getCenter().getPanes()
+          [editorPane, previewPane] = atom.workspace.getCenter().getPanes()
           previewPane.splitRight(copyActiveItem: true)
           previewPane.activate()
 

      describe "when the preview is in the active pane but is not the active item", ->
        it "re-renders the preview but does not make it active", ->
          markdownEditor = atom.workspace.getActiveTextEditor()
          previewPane = getCenter().getPanes()[1]
          previewPane.activate()

          waitsForPromise ->

        expect(fs.isFileSync(outputPath)).toBe true

    it "saves the HTML when it is triggered and the preview pane has focus", ->
      [editorPane, previewPane] = atom.workspace.getCenter().getPanes()
      previewPane.activate()

      outputPath = temp.path(suffix: '.html')
