mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Tests: Move commonWidgetTests() to TestHelpers.
This commit is contained in:
parent
33e93ef7f0
commit
e9d5079b04
1
grunt.js
1
grunt.js
@ -350,7 +350,6 @@ grunt.initConfig({
|
||||
globals: {
|
||||
addMonths: true,
|
||||
asyncTest: true,
|
||||
commonWidgetTests: true,
|
||||
container: true,
|
||||
deepEqual: true,
|
||||
d1: true,
|
||||
|
@ -1,4 +1,4 @@
|
||||
commonWidgetTests( "accordion", {
|
||||
TestHelpers.commonWidgetTests( "accordion", {
|
||||
defaults: {
|
||||
active: 0,
|
||||
animate: {},
|
||||
|
@ -1,4 +1,4 @@
|
||||
commonWidgetTests( "accordion", {
|
||||
TestHelpers.commonWidgetTests( "accordion", {
|
||||
defaults: {
|
||||
active: 0,
|
||||
animate: null,
|
||||
|
@ -1,4 +1,4 @@
|
||||
commonWidgetTests( "autocomplete", {
|
||||
TestHelpers.commonWidgetTests( "autocomplete", {
|
||||
defaults: {
|
||||
appendTo: "body",
|
||||
autoFocus: false,
|
||||
|
@ -1,4 +1,4 @@
|
||||
commonWidgetTests( "button", {
|
||||
TestHelpers.commonWidgetTests( "button", {
|
||||
defaults: {
|
||||
disabled: null,
|
||||
icons: {
|
||||
|
@ -6,4 +6,4 @@ var datepicker_defaults = {
|
||||
disabled: false
|
||||
};
|
||||
|
||||
//commonWidgetTests('datepicker', { defaults: datepicker_defaults });
|
||||
//TestHelpers.commonWidgetTests('datepicker', { defaults: datepicker_defaults });
|
||||
|
@ -1,4 +1,4 @@
|
||||
commonWidgetTests( "dialog", {
|
||||
TestHelpers.commonWidgetTests( "dialog", {
|
||||
defaults: {
|
||||
autoOpen: true,
|
||||
buttons: {},
|
||||
|
@ -1,36 +1,32 @@
|
||||
/*
|
||||
* draggable_defaults.js
|
||||
*/
|
||||
|
||||
var draggable_defaults = {
|
||||
addClasses: true,
|
||||
appendTo: "parent",
|
||||
axis: false,
|
||||
cancel: ":input,option",
|
||||
connectToSortable: false,
|
||||
containment: false,
|
||||
cursor: "auto",
|
||||
cursorAt: false,
|
||||
delay: 0,
|
||||
disabled: false,
|
||||
distance: 1,
|
||||
grid: false,
|
||||
handle: false,
|
||||
helper: "original",
|
||||
iframeFix: false,
|
||||
opacity: false,
|
||||
refreshPositions: false,
|
||||
revert: false,
|
||||
revertDuration: 500,
|
||||
scroll: true,
|
||||
scrollSensitivity: 20,
|
||||
scrollSpeed: 20,
|
||||
scope: "default",
|
||||
snap: false,
|
||||
snapMode: "both",
|
||||
snapTolerance: 20,
|
||||
stack: false,
|
||||
zIndex: false
|
||||
};
|
||||
|
||||
commonWidgetTests('draggable', { defaults: draggable_defaults });
|
||||
TestHelpers.commonWidgetTests( "draggable", {
|
||||
defaults: {
|
||||
addClasses: true,
|
||||
appendTo: "parent",
|
||||
axis: false,
|
||||
cancel: ":input,option",
|
||||
connectToSortable: false,
|
||||
containment: false,
|
||||
cursor: "auto",
|
||||
cursorAt: false,
|
||||
delay: 0,
|
||||
disabled: false,
|
||||
distance: 1,
|
||||
grid: false,
|
||||
handle: false,
|
||||
helper: "original",
|
||||
iframeFix: false,
|
||||
opacity: false,
|
||||
refreshPositions: false,
|
||||
revert: false,
|
||||
revertDuration: 500,
|
||||
scroll: true,
|
||||
scrollSensitivity: 20,
|
||||
scrollSpeed: 20,
|
||||
scope: "default",
|
||||
snap: false,
|
||||
snapMode: "both",
|
||||
snapTolerance: 20,
|
||||
stack: false,
|
||||
zIndex: false
|
||||
}
|
||||
});
|
||||
|
@ -1,4 +1,4 @@
|
||||
commonWidgetTests( "droppable", {
|
||||
TestHelpers.commonWidgetTests( "droppable", {
|
||||
defaults: {
|
||||
accept: "*",
|
||||
activeClass: false,
|
||||
|
@ -1,4 +1,4 @@
|
||||
commonWidgetTests( "menu", {
|
||||
TestHelpers.commonWidgetTests( "menu", {
|
||||
defaults: {
|
||||
disabled: false,
|
||||
menus: "ul",
|
||||
|
@ -1,4 +1,4 @@
|
||||
commonWidgetTests( "progressbar", {
|
||||
TestHelpers.commonWidgetTests( "progressbar", {
|
||||
defaults: {
|
||||
disabled: false,
|
||||
value: 0,
|
||||
|
@ -1,28 +1,24 @@
|
||||
/*
|
||||
* resizable_defaults.js
|
||||
*/
|
||||
|
||||
var resizable_defaults = {
|
||||
alsoResize: false,
|
||||
animate: false,
|
||||
animateDuration: 'slow',
|
||||
animateEasing: 'swing',
|
||||
aspectRatio: false,
|
||||
autoHide: false,
|
||||
cancel: ':input,option',
|
||||
containment: false,
|
||||
delay: 0,
|
||||
disabled: false,
|
||||
distance: 1,
|
||||
ghost: false,
|
||||
grid: false,
|
||||
handles: 'e,s,se',
|
||||
helper: false,
|
||||
maxHeight: null,
|
||||
maxWidth: null,
|
||||
minHeight: 10,
|
||||
minWidth: 10,
|
||||
zIndex: 1000
|
||||
};
|
||||
|
||||
commonWidgetTests('resizable', { defaults: resizable_defaults });
|
||||
TestHelpers.commonWidgetTests('resizable', {
|
||||
defaults: {
|
||||
alsoResize: false,
|
||||
animate: false,
|
||||
animateDuration: 'slow',
|
||||
animateEasing: 'swing',
|
||||
aspectRatio: false,
|
||||
autoHide: false,
|
||||
cancel: ':input,option',
|
||||
containment: false,
|
||||
delay: 0,
|
||||
disabled: false,
|
||||
distance: 1,
|
||||
ghost: false,
|
||||
grid: false,
|
||||
handles: 'e,s,se',
|
||||
helper: false,
|
||||
maxHeight: null,
|
||||
maxWidth: null,
|
||||
minHeight: 10,
|
||||
minWidth: 10,
|
||||
zIndex: 1000
|
||||
}
|
||||
});
|
||||
|
@ -1,16 +1,12 @@
|
||||
/*
|
||||
* selectable_defaults.js
|
||||
*/
|
||||
|
||||
var selectable_defaults = {
|
||||
appendTo: 'body',
|
||||
autoRefresh: true,
|
||||
cancel: ':input,option',
|
||||
delay: 0,
|
||||
disabled: false,
|
||||
distance: 0,
|
||||
filter: '*',
|
||||
tolerance: 'touch'
|
||||
};
|
||||
|
||||
commonWidgetTests('selectable', { defaults: selectable_defaults });
|
||||
TestHelpers.commonWidgetTests('selectable', {
|
||||
defaults: {
|
||||
appendTo: 'body',
|
||||
autoRefresh: true,
|
||||
cancel: ':input,option',
|
||||
delay: 0,
|
||||
disabled: false,
|
||||
distance: 0,
|
||||
filter: '*',
|
||||
tolerance: 'touch'
|
||||
}
|
||||
});
|
||||
|
@ -1,4 +1,4 @@
|
||||
commonWidgetTests( "slider", {
|
||||
TestHelpers.commonWidgetTests( "slider", {
|
||||
defaults: {
|
||||
animate: false,
|
||||
cancel: ':input,option',
|
||||
|
@ -1,34 +1,30 @@
|
||||
/*
|
||||
* sortable_defaults.js
|
||||
*/
|
||||
|
||||
var sortable_defaults = {
|
||||
appendTo: "parent",
|
||||
axis: false,
|
||||
cancel: ":input,option",
|
||||
connectWith: false,
|
||||
containment: false,
|
||||
cursor: 'auto',
|
||||
cursorAt: false,
|
||||
delay: 0,
|
||||
disabled: false,
|
||||
distance: 1,
|
||||
dropOnEmpty: true,
|
||||
forcePlaceholderSize: false,
|
||||
forceHelperSize: false,
|
||||
grid: false,
|
||||
handle: false,
|
||||
helper: "original",
|
||||
items: "> *",
|
||||
opacity: false,
|
||||
placeholder: false,
|
||||
revert: false,
|
||||
scroll: true,
|
||||
scrollSensitivity: 20,
|
||||
scrollSpeed: 20,
|
||||
scope: "default",
|
||||
tolerance: "intersect",
|
||||
zIndex: 1000
|
||||
};
|
||||
|
||||
commonWidgetTests('sortable', { defaults: sortable_defaults });
|
||||
TestHelpers.commonWidgetTests( "sortable", {
|
||||
defaults: {
|
||||
appendTo: "parent",
|
||||
axis: false,
|
||||
cancel: ":input,option",
|
||||
connectWith: false,
|
||||
containment: false,
|
||||
cursor: "auto",
|
||||
cursorAt: false,
|
||||
delay: 0,
|
||||
disabled: false,
|
||||
distance: 1,
|
||||
dropOnEmpty: true,
|
||||
forcePlaceholderSize: false,
|
||||
forceHelperSize: false,
|
||||
grid: false,
|
||||
handle: false,
|
||||
helper: "original",
|
||||
items: "> *",
|
||||
opacity: false,
|
||||
placeholder: false,
|
||||
revert: false,
|
||||
scroll: true,
|
||||
scrollSensitivity: 20,
|
||||
scrollSpeed: 20,
|
||||
scope: "default",
|
||||
tolerance: "intersect",
|
||||
zIndex: 1000
|
||||
}
|
||||
});
|
||||
|
@ -1,4 +1,4 @@
|
||||
commonWidgetTests( "spinner", {
|
||||
TestHelpers.commonWidgetTests( "spinner", {
|
||||
defaults: {
|
||||
culture: null,
|
||||
disabled: false,
|
||||
|
@ -1,4 +1,4 @@
|
||||
commonWidgetTests( "tabs", {
|
||||
TestHelpers.commonWidgetTests( "tabs", {
|
||||
defaults: {
|
||||
active: null,
|
||||
collapsible: false,
|
||||
|
@ -1,4 +1,4 @@
|
||||
commonWidgetTests( "tabs", {
|
||||
TestHelpers.commonWidgetTests( "tabs", {
|
||||
defaults: {
|
||||
active: null,
|
||||
ajaxOptions: null,
|
||||
|
@ -56,7 +56,7 @@ function testBasicUsage( widget ) {
|
||||
});
|
||||
}
|
||||
|
||||
window.commonWidgetTests = function( widget, settings ) {
|
||||
TestHelpers.commonWidgetTests = function( widget, settings ) {
|
||||
module( widget + ": common widget" );
|
||||
|
||||
testWidgetDefaults( widget, settings.defaults );
|
||||
|
@ -1,4 +1,4 @@
|
||||
commonWidgetTests( "tooltip", {
|
||||
TestHelpers.commonWidgetTests( "tooltip", {
|
||||
defaults: {
|
||||
content: function() {},
|
||||
disabled: false,
|
||||
|
Loading…
Reference in New Issue
Block a user