aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/tooltip/tooltip_methods.js
blob: cb99ea457c517326e4f1c52b4f180b180ff3a33d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
(function( $ ) {

module( "tooltip: methods" );

test( "destroy", function() {
	var beforeHtml = $( "#tooltipped1" ).parent().html();
	var afterHtml = $( "#tooltipped1" ).tooltip().tooltip( "destroy" ).parent().html();
	equal( afterHtml, beforeHtml );
});

test( "open", function() {
	var element = $( "#tooltipped1" ).tooltip();
	element.tooltip( "open" );
	ok( $( ".ui-tooltip" ).is( ":visible" ) );
});

/*
TODO currently tooltip doesn't override widget
can't return anything useful if no element is kept around and there's no useful reference
test("widget", function() {
	var tooltip = $("#tooltipped1").tooltip();
	same(tooltip.tooltip("widget")[0], $(".ui-tooltip")[0]);
	same(tooltip.tooltip("widget").end()[0], tooltip[0]);
});
*/

}( jQuery ) );