jquery-ui/tests/unit/tooltip/deprecated.js
Michał Gołębiowski-Owczarek 9dc2bf9737 Tests: Fix tooltip tests by destroying tooltips
Some tests were not properly destroying tooltips which made tests
start to fail with the new QUnit.

Ref gh-2157
2023-05-10 10:53:57 +02:00

24 lines
523 B
JavaScript

define( [
"qunit",
"jquery",
"./helper",
"ui/widgets/tooltip"
], function( QUnit, $, testHelper ) {
"use strict";
var beforeAfterEach = testHelper.beforeAfterEach;
QUnit.module( "tooltip: (deprecated) options", beforeAfterEach() );
QUnit.test( "tooltipClass", function( assert ) {
assert.expect( 1 );
var element = $( "#tooltipped1" ).tooltip( {
tooltipClass: "custom"
} ).tooltip( "open" );
assert.hasClasses( $( "#" + element.data( "ui-tooltip-id" ) ), "custom" );
element.tooltip( "destroy" );
} );
} );