Show tooltip immediately if the tooltip trigger is manual

This commit is contained in:
Johnston Jiaa
2016-02-28 11:48:27 -05:00
parent a7e43fef7a
commit 5dfd0c9102
3 changed files with 9 additions and 1 deletions

View File

@@ -28,6 +28,10 @@ describe "TooltipManager", ->
hover element, ->
expect(document.body.querySelector(".tooltip")).toHaveText("Title")
it "creates a tooltip immediately if the trigger type is manual", ->
manager.add element, title: "Title", trigger: "manual"
expect(document.body.querySelector(".tooltip")).toHaveText("Title")
it "allows jQuery elements to be passed as the target", ->
element2 = document.createElement('div')
jasmine.attachToDOM(element2)