draggable unit tests: cleanup

This commit is contained in:
Richard Worth 2009-02-02 06:34:44 +00:00
parent c3046b9d79
commit c42164097c
5 changed files with 31 additions and 79 deletions

View File

@ -1,61 +0,0 @@
/*
* draggable_defaults.js
*/
var draggable_defaults = {
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
};

View File

@ -12,8 +12,7 @@
<script type="text/javascript" src="../../../external/qunit/testrunner.js"></script>
<script type="text/javascript" src="../../../external/simulate/jquery.simulate.js"></script>
<script type="text/javascript" src="defaults.js"></script>
<script type="text/javascript" src="draggable.js"></script>
<script type="text/javascript" src="draggable_core.js"></script>
<script type="text/javascript" src="draggable_defaults.js"></script>
<script type="text/javascript" src="draggable_events.js"></script>
<script type="text/javascript" src="draggable_methods.js"></script>

View File

@ -1,17 +1,35 @@
/*
* draggable_defaults.js
*/
(function($) {
module("draggable: defaults");
var draggable_defaults = {
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
};
test("defaults", function() {
el = $('<div></div>').draggable();
$.each(draggable_defaults, function(key, val) {
var actual = el.data(key + ".draggable"), expected = val;
same(actual, expected, key);
});
el.remove();
});
})(jQuery);
commonWidgetTests('draggable', { defaults: draggable_defaults });

View File

@ -5,8 +5,4 @@
module("draggable: tickets");
test("#1234", function() {
});
})(jQuery);