Fix Jasmine tests

Also, rewrite them to be easier to comprehend, and to not use magic constants (or to use fewer, at least).
This commit is contained in:
Andy Armstrong
2014-05-01 23:04:11 -04:00
committed by cahrens
parent c6b96f32a2
commit e20a7fc53c
4 changed files with 91 additions and 76 deletions

View File

@@ -18,8 +18,6 @@ define(["jquery", "underscore", "js/views/xblock", "js/utils/module", "gettext",
stop: function (event, ui) {
var saving, hideSaving, removeFromParent;
console.log('stop');
if (oldParent === undefined) {
// If no actual change occurred,
// oldParent will never have been set.
@@ -81,8 +79,6 @@ define(["jquery", "underscore", "js/views/xblock", "js/utils/module", "gettext",
reorder: function (targetParent, successCallback) {
var children, childLocators;
console.log('calling reorder for ' + targetParent.data('locator'));
// Find descendants with class "wrapper-xblock" whose parent == targetParent.
// This is necessary to filter our grandchildren, great-grandchildren, etc.
children = targetParent.find('.wrapper-xblock').filter(function () {
@@ -106,7 +102,6 @@ define(["jquery", "underscore", "js/views/xblock", "js/utils/module", "gettext",
}),
success: function () {
// change data-parent on the element moved.
console.log('SAVED! ' + targetParent.data('locator') + " with " + childLocators.length + " children");
if (successCallback) {
successCallback();
}