]> source.dussan.org Git - jquery-ui.git/commitdiff
Tests: Move commonWidgetTests() to TestHelpers.
authorScott González <scott.gonzalez@gmail.com>
Thu, 19 Apr 2012 17:03:21 +0000 (13:03 -0400)
committerScott González <scott.gonzalez@gmail.com>
Thu, 19 Apr 2012 17:03:21 +0000 (13:03 -0400)
20 files changed:
grunt.js
tests/unit/accordion/accordion_defaults.js
tests/unit/accordion/accordion_defaults_deprecated.js
tests/unit/autocomplete/autocomplete_defaults.js
tests/unit/button/button_defaults.js
tests/unit/datepicker/datepicker_defaults.js
tests/unit/dialog/dialog_defaults.js
tests/unit/draggable/draggable_defaults.js
tests/unit/droppable/droppable_defaults.js
tests/unit/menu/menu_defaults.js
tests/unit/progressbar/progressbar_defaults.js
tests/unit/resizable/resizable_defaults.js
tests/unit/selectable/selectable_defaults.js
tests/unit/slider/slider_defaults.js
tests/unit/sortable/sortable_defaults.js
tests/unit/spinner/spinner_defaults.js
tests/unit/tabs/tabs_defaults.js
tests/unit/tabs/tabs_defaults_deprecated.js
tests/unit/testsuite.js
tests/unit/tooltip/tooltip_defaults.js

index e0a085a387f973720818eb1e2565eb5f445ad371..82e7fe1e86975312ebee85b7761a10f4bd3c4316 100644 (file)
--- a/grunt.js
+++ b/grunt.js
@@ -350,7 +350,6 @@ grunt.initConfig({
                                globals: {
                                        addMonths: true,
                                        asyncTest: true,
-                                       commonWidgetTests: true,
                                        container: true,
                                        deepEqual: true,
                                        d1: true,
index 9ad85bbce51fcc651566dc6a25873cac4cfb1036..ef24cf25ec5178678dfe471d495bb626f8c2c3eb 100644 (file)
@@ -1,4 +1,4 @@
-commonWidgetTests( "accordion", {
+TestHelpers.commonWidgetTests( "accordion", {
        defaults: {
                active: 0,
                animate: {},
index 99f5ac8273c0920f0a9d8d61fca06a8527769705..22d5e1289947fc2f6895c31167a165c155971e2b 100644 (file)
@@ -1,4 +1,4 @@
-commonWidgetTests( "accordion", {
+TestHelpers.commonWidgetTests( "accordion", {
        defaults: {
                active: 0,
                animate: null,
index ac83eaea49141b888bb42c7937c5296302902798..c090ce4dfb517bafae31be6fd6e01992b5886e6b 100644 (file)
@@ -1,4 +1,4 @@
-commonWidgetTests( "autocomplete", {
+TestHelpers.commonWidgetTests( "autocomplete", {
        defaults: {
                appendTo: "body",
                autoFocus: false,
index 96c7e5bfaa19f69a8f9909b2effec4e2eff9e163..ef22d30114fa6b663fac6a617fe5e36780f21887 100644 (file)
@@ -1,4 +1,4 @@
-commonWidgetTests( "button", {
+TestHelpers.commonWidgetTests( "button", {
        defaults: {
                disabled: null,
                icons: {
index 4243cf187d830ab3175d18790685bc7ac04fda18..28e150791c350c0c7d879a553b0304245746247f 100644 (file)
@@ -6,4 +6,4 @@ var datepicker_defaults = {
        disabled: false
 };
 
-//commonWidgetTests('datepicker', { defaults: datepicker_defaults });
+//TestHelpers.commonWidgetTests('datepicker', { defaults: datepicker_defaults });
index 9f2e4c6a82cd049f83385c5a32b56d1a20e7d941..623908da72277362fa40a35dc4bad5e4b3a34b87 100644 (file)
@@ -1,4 +1,4 @@
-commonWidgetTests( "dialog", {
+TestHelpers.commonWidgetTests( "dialog", {
        defaults: {
                autoOpen: true,
                buttons: {},
index 4b0aaca19248d7fe76638740f9c57012f0c20b2c..b47b139cd2f4f80590fe9aefdccf886ce02d81bc 100644 (file)
@@ -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
+       }
+});
index 5a1a4198c4af20ec18bc54867cdda3f58f4eb462..985dba06de8fffb8e81233cd0a0b25ca190ec456 100644 (file)
@@ -1,4 +1,4 @@
-commonWidgetTests( "droppable", {
+TestHelpers.commonWidgetTests( "droppable", {
        defaults: {
                accept: "*",
                activeClass: false,
index 018ac8ccfa6200f10f6665ba2796b1f258b7831e..ddcdbebf2d21899189fbd57d8ca63aaa0d9bf271 100644 (file)
@@ -1,4 +1,4 @@
-commonWidgetTests( "menu", {
+TestHelpers.commonWidgetTests( "menu", {
        defaults: {
                disabled: false,
                menus: "ul",
index 3856e31a0120e3e544546a4859d0ed70448a1efb..2f97a78bb705c753c5322409fff0edaa60d72cb7 100644 (file)
@@ -1,4 +1,4 @@
-commonWidgetTests( "progressbar", {
+TestHelpers.commonWidgetTests( "progressbar", {
        defaults: {
                disabled: false,
                value: 0,
index f69e5217cb970c413e7ab1122da660dca192058f..c46e1078197fa9468a25a7ac74412921db4e0447 100644 (file)
@@ -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
+       }
+});
index dbf799a43d9e7eb257f4f5b73d86b24da9882a43..27714d0ae875c6ce20812f20e3aefd8716eb29b4 100644 (file)
@@ -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'
+       }
+});
index 8049fe969469b01e0a525fa3a360e30023d6b3b7..8a0b347f3a21f6917e8d2c8c500f84bfc9a51760 100644 (file)
@@ -1,4 +1,4 @@
-commonWidgetTests( "slider", {
+TestHelpers.commonWidgetTests( "slider", {
        defaults: {
                animate: false,
                cancel: ':input,option',
index 7681addad11d59ea2bb687aeb64d79c6abbd2695..b5fc05a5de222ada42e0f2373f22ca1bc30510bd 100644 (file)
@@ -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
+       }
+});
index 0a4e7c2360a06c4002545b6972c0c794cbd21f40..4f05b1e63cd8175727a8be85e3437b2c060508a2 100644 (file)
@@ -1,4 +1,4 @@
-commonWidgetTests( "spinner", {
+TestHelpers.commonWidgetTests( "spinner", {
        defaults: {
                culture: null,
                disabled: false,
index 52b6f8a718b17355e5c8eeca0da3253ff7fb882a..7ffb05da495a8a21980fda23be1a45cd601a2d19 100644 (file)
@@ -1,4 +1,4 @@
-commonWidgetTests( "tabs", {
+TestHelpers.commonWidgetTests( "tabs", {
        defaults: {
                active: null,
                collapsible: false,
index 1a56297e9b7e726a2a2dd3562c7d730954ef4451..fdcff21b337de06203cc03a35d9e27758d25580d 100644 (file)
@@ -1,4 +1,4 @@
-commonWidgetTests( "tabs", {
+TestHelpers.commonWidgetTests( "tabs", {
        defaults: {
                active: null,
                ajaxOptions: null,
index 648b302ee160a33bbe7cb4a28457ca65849583e8..a877e38af6ebc5f6287ab67fa0ee8cf1bcb3d16c 100644 (file)
@@ -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 );
index b8b41bf47a6c4bd5953dbde23396e607b771ad24..d12ee9519ffb440007ff4728dbf21d5c17427889 100644 (file)
@@ -1,4 +1,4 @@
-commonWidgetTests( "tooltip", {
+TestHelpers.commonWidgetTests( "tooltip", {
        defaults: {
                content: function() {},
                disabled: false,