mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2025-01-03 20:33:33 +03:00
Test disposal of manually-created tooltips
This also prevents subsequent tests from failing due to the manual tooltip never being removed from document.body.
This commit is contained in:
parent
5dfd0c9102
commit
d9ee94031f
@ -29,8 +29,10 @@ describe "TooltipManager", ->
|
||||
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"
|
||||
disposable = manager.add element, title: "Title", trigger: "manual"
|
||||
expect(document.body.querySelector(".tooltip")).toHaveText("Title")
|
||||
disposable.dispose()
|
||||
expect(document.body.querySelector(".tooltip")).toBeNull()
|
||||
|
||||
it "allows jQuery elements to be passed as the target", ->
|
||||
element2 = document.createElement('div')
|
||||
|
Loading…
Reference in New Issue
Block a user