Remove space-pen-extensions-spec

This commit is contained in:
Nathan Sobo
2015-09-04 11:29:24 -06:00
parent 035429b7bc
commit 239da56130
2 changed files with 8 additions and 15 deletions

View File

@@ -1,15 +0,0 @@
{$} = require '../src/space-pen-extensions'
describe "SpacePen extensions", ->
describe "tooltips", ->
describe "when the window is resized", ->
it "hides the tooltips", ->
view = $('<div></div>')
jasmine.attachToDOM(view[0])
view.setTooltip('this is a tip')
view.tooltip('show')
expect($(document.body).find('.tooltip')).toBeVisible()
$(window).trigger('resize')
expect($(document.body).find('.tooltip')).not.toExist()

View File

@@ -81,3 +81,11 @@ describe "TooltipManager", ->
hover element, ->
expect(document.body.querySelector(".tooltip")).toBeNull()
describe "when the window is resized", ->
it "hides the tooltips", ->
manager.add element, title: "Title"
hover element, ->
expect(document.body.querySelector(".tooltip")).toBeDefined()
window.dispatchEvent(new CustomEvent('resize'))
expect(document.body.querySelector(".tooltip")).toBeNull()