Skip to content
Permalink
Browse files

Tooltip: Convert tests to new infrastructure

Ref #10119
Ref gh-1528
  • Loading branch information...
scottgonzalez committed Apr 7, 2015
1 parent 7d48112 commit a2da340e0d1b02d243c71b86382e5e624e7211d6
@@ -4,34 +4,8 @@
<meta charset="utf-8">
<title>jQuery UI Tooltip Test Suite</title>

<script src="../../jquery.js"></script>
<script>
$.uiBackCompat = false;
</script>
<link rel="stylesheet" href="../../../external/qunit/qunit.css">
<script src="../../../external/qunit/qunit.js"></script>
<script src="../../../external/jquery-simulate/jquery.simulate.js"></script>
<script src="../testsuite.js"></script>
<script src="../../../external/qunit-assert-classes/qunit-assert-classes.js"></script>
<script>
TestHelpers.loadResources({
css: [ "core", "tooltip" ],
js: [
"ui/core.js",
"ui/widget.js",
"ui/position.js",
"ui/tooltip.js"
]
});
</script>

<script src="tooltip_common.js"></script>
<script src="tooltip_core.js"></script>
<script src="tooltip_events.js"></script>
<script src="tooltip_methods.js"></script>
<script src="tooltip_options.js"></script>

<script src="../swarminject.js"></script>
<script src="../../lib/css.js" data-modules="core tooltip"></script>
<script src="../../lib/bootstrap.js" data-widget="tooltip" data-no-back-compat="true"></script>
</head>
<body>

@@ -1,4 +1,9 @@
TestHelpers.commonWidgetTests( "tooltip", {
define( [
"lib/common",
"ui/tooltip"
], function( common ) {

common.testWidget( "tooltip", {
defaults: {
classes: {
"ui-tooltip": "ui-corner-all ui-widget-shadow"
@@ -21,3 +26,5 @@ TestHelpers.commonWidgetTests( "tooltip", {
open: null
}
});

} );
@@ -1,4 +1,9 @@
TestHelpers.commonWidgetTests( "tooltip", {
define( [
"lib/common",
"ui/tooltip"
], function( common ) {

common.testWidget( "tooltip", {
defaults: {
classes: {
"ui-tooltip": "ui-corner-all ui-widget-shadow"
@@ -22,3 +27,5 @@ TestHelpers.commonWidgetTests( "tooltip", {
open: null
}
});

} );
@@ -1,4 +1,7 @@
(function( $ ) {
define( [
"jquery",
"ui/tooltip"
], function( $ ) {

module( "tooltip: core" );

@@ -218,4 +221,4 @@ asyncTest( "multiple active delegated tooltips", function() {
step1();
});

}( jQuery ) );
} );
@@ -4,32 +4,8 @@
<meta charset="utf-8">
<title>jQuery UI Tooltip Test Suite</title>

<script src="../../jquery.js"></script>
<link rel="stylesheet" href="../../../external/qunit/qunit.css">
<script src="../../../external/qunit/qunit.js"></script>
<script src="../../../external/jquery-simulate/jquery.simulate.js"></script>
<script src="../testsuite.js"></script>
<script src="../../../external/qunit-assert-classes/qunit-assert-classes.js"></script>
<script>
TestHelpers.loadResources({
css: [ "core", "tooltip" ],
js: [
"ui/core.js",
"ui/widget.js",
"ui/position.js",
"ui/tooltip.js"
]
});
</script>

<script src="tooltip_common_deprecated.js"></script>
<script src="tooltip_core.js"></script>
<script src="tooltip_events.js"></script>
<script src="tooltip_methods.js"></script>
<script src="tooltip_options.js"></script>
<script src="tooltip_deprecated.js"></script>

<script src="../swarminject.js"></script>
<script src="../../lib/css.js" data-modules="core tooltip"></script>
<script src="../../lib/bootstrap.js" data-widget="tooltip" data-deprecated="true"></script>
</head>
<body>

@@ -1,4 +1,7 @@
(function( $ ) {
define( [
"jquery",
"ui/tooltip"
], function( $ ) {

module( "tooltip: (deprecated) options" );

@@ -10,4 +13,4 @@ test( "tooltipClass", function( assert ) {
assert.hasClasses( $( "#" + element.data( "ui-tooltip-id" ) ), "custom" );
});

}( jQuery ) );
} );
@@ -1,4 +1,7 @@
(function( $ ) {
define( [
"jquery",
"ui/tooltip"
], function( $ ) {

module( "tooltip: events" );

@@ -54,4 +57,4 @@ test( "focus events", function() {
element.trigger( "focusout" );
});

}( jQuery ) );
} );
@@ -1,17 +1,20 @@
(function( $ ) {
define( [
"jquery",
"ui/tooltip"
], function( $ ) {

module( "tooltip: methods" );

test( "destroy", function() {
test( "destroy", function( assert ) {
expect( 3 );
var element = $( "#tooltipped1" );

domEqual( "#tooltipped1", function() {
assert.domEqual( "#tooltipped1", function() {
element.tooltip().tooltip( "destroy" );
});

// make sure that open tooltips are removed on destroy
domEqual( "#tooltipped1", function() {
assert.domEqual( "#tooltipped1", function() {
element
.tooltip()
.tooltip( "open", $.Event( "mouseover", { target: element[0] }) )
@@ -133,4 +136,4 @@ test( "preserve changes to title attributes on close and destroy", function() {
} );
});

}( jQuery ) );
} );
@@ -1,4 +1,7 @@
(function( $ ) {
define( [
"jquery",
"ui/tooltip"
], function( $ ) {

module( "tooltip: options" );

@@ -209,4 +212,4 @@ test( "track and programmatic focus", function() {
equal( "inputtitle", $( ".ui-tooltip" ).text() );
});

}( jQuery ) );
} );

0 comments on commit a2da340

Please sign in to comment.
You can’t perform that action at this time.