 
   describe "when a tab is clicked", ->
     it "shows the associated item on the pane and focuses the pane", ->
+      jasmine.attachToDOM(tabBar) # Remove after Atom 1.2.0 is released
+
       spyOn(pane, 'activate')
 
       event = triggerMouseEvent('mousedown', tabBar.tabAtIndex(0), which: 1)

      runs -> expect(pane.activate.callCount).toBe 2

    it "closes the tab when middle clicked", ->
      event = triggerMouseEvent('mousedown', tabBar.tabForItem(editor1), which: 2)

      expect(pane.getItems().length).toBe 2


  describe "when a tab's close icon is clicked", ->
    it "destroys the tab's item on the pane", ->
      jasmine.attachToDOM(tabBar) # Remove after Atom 1.2.0 is released

      $(tabBar.tabForItem(editor1)).find('.close-icon').click()
      expect(pane.getItems().length).toBe 2
      expect(pane.getItems().indexOf(editor1)).toBe -1
