 {WorkspaceView, $} = require 'atom'
 
-BackgroundTips = require '../lib/background-tips'
 BackgroundTipsView = require '../lib/background-tips-view'
 
 # Use the command `window:run-package-specs` (cmd-alt-ctrl-p) to run specs.

    BackgroundTipsView.displayDuration = 50
    BackgroundTipsView.fadeDuration = 1

  activatePackage = ->
    backgroundTips = atom.packages.activatePackage('background-tips', immediate: true)
    backgroundTipsView = backgroundTips.mainModule.backgroundTipsView

  describe "when the package is activated when there is only one pane", ->
    beforeEach ->

    describe "when the pane is empty", ->
      it "attaches the view after a delay", ->
        expect(atom.workspaceView.getActivePane().getItems().length).toBe 0

        activatePackage ->
          expect(backgroundTipsView.parent()).not.toExist()
          advanceClock BackgroundTipsView.startDelay + 1
          expect(backgroundTipsView.parent()).toExist()

    describe "when the pane is not empty", ->
      it "does not attach the view", ->
        atom.workspaceView.getActivePane().activateItem($("item"))

        activatePackage ->
          advanceClock BackgroundTipsView.startDelay + 1
          expect(backgroundTipsView.parent()).not.toExist()

    describe "when a second pane is created", ->
      it "detaches the view", ->
        activatePackage ->
          advanceClock BackgroundTipsView.startDelay + 1
          expect(backgroundTipsView.parent()).toExist()

          atom.workspaceView.getActivePane().splitRight()
          expect(backgroundTipsView.parent()).not.toExist()

  describe "when the package is activated when there are multiple panes", ->
    beforeEach ->
