mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Autocomplete: Convert tests to new infrastructure
Ref #10119 Ref gh-1528
This commit is contained in:
parent
e39ee9d669
commit
aff3c32ee1
@ -4,32 +4,8 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>jQuery UI Autocomplete Test Suite</title>
|
<title>jQuery UI Autocomplete Test Suite</title>
|
||||||
|
|
||||||
<script src="../../jquery.js"></script>
|
<script src="../../lib/css.js" data-modules="core menu autocomplete"></script>
|
||||||
<link rel="stylesheet" href="../../../external/qunit/qunit.css">
|
<script src="../../lib/bootstrap.js" data-widget="autocomplete"></script>
|
||||||
<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", "menu", "autocomplete" ],
|
|
||||||
js: [
|
|
||||||
"ui/core.js",
|
|
||||||
"ui/widget.js",
|
|
||||||
"ui/position.js",
|
|
||||||
"ui/menu.js",
|
|
||||||
"ui/autocomplete.js"
|
|
||||||
]
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script src="autocomplete_common.js"></script>
|
|
||||||
<script src="autocomplete_core.js"></script>
|
|
||||||
<script src="autocomplete_events.js"></script>
|
|
||||||
<script src="autocomplete_methods.js"></script>
|
|
||||||
<script src="autocomplete_options.js"></script>
|
|
||||||
|
|
||||||
<script src="../swarminject.js"></script>
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
@ -1,4 +1,9 @@
|
|||||||
TestHelpers.commonWidgetTests( "autocomplete", {
|
define( [
|
||||||
|
"lib/common",
|
||||||
|
"ui/autocomplete"
|
||||||
|
], function( common ) {
|
||||||
|
|
||||||
|
common.testWidget( "autocomplete", {
|
||||||
defaults: {
|
defaults: {
|
||||||
appendTo: null,
|
appendTo: null,
|
||||||
autoFocus: false,
|
autoFocus: false,
|
||||||
@ -28,3 +33,5 @@ TestHelpers.commonWidgetTests( "autocomplete", {
|
|||||||
select: null
|
select: null
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
} );
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
(function( $ ) {
|
define( [
|
||||||
|
"jquery",
|
||||||
|
"ui/autocomplete"
|
||||||
|
], function( $ ) {
|
||||||
|
|
||||||
module( "autocomplete: core" );
|
module( "autocomplete: core" );
|
||||||
|
|
||||||
@ -395,4 +398,4 @@ asyncTest( "Search if the user retypes the same value (#7434)", function() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
}( jQuery ) );
|
} );
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
(function( $ ) {
|
define( [
|
||||||
|
"jquery",
|
||||||
|
"ui/autocomplete"
|
||||||
|
], function( $ ) {
|
||||||
|
|
||||||
module( "autocomplete: events" );
|
module( "autocomplete: events" );
|
||||||
|
|
||||||
@ -179,4 +182,4 @@ asyncTest( "blur during remote search", function() {
|
|||||||
ac.val( "ro" ).keydown();
|
ac.val( "ro" ).keydown();
|
||||||
});
|
});
|
||||||
|
|
||||||
}( jQuery ) );
|
} );
|
||||||
|
@ -1,10 +1,13 @@
|
|||||||
(function( $ ) {
|
define( [
|
||||||
|
"jquery",
|
||||||
|
"ui/autocomplete"
|
||||||
|
], function( $ ) {
|
||||||
|
|
||||||
module( "autocomplete: methods" );
|
module( "autocomplete: methods" );
|
||||||
|
|
||||||
test( "destroy", function() {
|
test( "destroy", function( assert ) {
|
||||||
expect( 1 );
|
expect( 1 );
|
||||||
domEqual( "#autocomplete", function() {
|
assert.domEqual( "#autocomplete", function() {
|
||||||
$( "#autocomplete" ).autocomplete().autocomplete( "destroy" );
|
$( "#autocomplete" ).autocomplete().autocomplete( "destroy" );
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -42,4 +45,4 @@ test( "widget", function( assert ) {
|
|||||||
assert.hasClasses( widgetElement, "ui-menu" );
|
assert.hasClasses( widgetElement, "ui-menu" );
|
||||||
});
|
});
|
||||||
|
|
||||||
}( jQuery ) );
|
} );
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
(function( $ ) {
|
define( [
|
||||||
|
"jquery",
|
||||||
|
"ui/autocomplete"
|
||||||
|
], function( $ ) {
|
||||||
|
|
||||||
module( "autocomplete: options" );
|
module( "autocomplete: options" );
|
||||||
|
|
||||||
@ -311,4 +314,4 @@ test( "source, update after init", function() {
|
|||||||
equal( menu.find( ".ui-menu-item" ).text(), "php" );
|
equal( menu.find( ".ui-menu-item" ).text(), "php" );
|
||||||
});
|
});
|
||||||
|
|
||||||
}( jQuery ) );
|
} );
|
||||||
|
Loading…
Reference in New Issue
Block a user