Commit d30cceba authored by Ivan Tyagov's avatar Ivan Tyagov

Extend test for TabularGadget so no API regressions happens silently.

Clean up.
parent 2aaacd10
......@@ -609,7 +609,7 @@ var RenderJs = (function () {
* Read this list from data structure created in HTML5 local
* storage by updateGadgetIndexFromURL
*/
// XXX: get from Cache stored index and itterate over it
// get from Cache stored index and itterate over it
// to find matching ones
var gadget_list = [];
$.each(RenderJs.GadgetCatalog.getGadgetIndexUrlList(),
......@@ -728,9 +728,4 @@ var RenderJs = (function () {
};
}())
};
}());
// impliticly call RenderJs bootstrap
// $(document).ready(function () {
// RenderJs.init();
// });
}());
\ No newline at end of file
......@@ -105,6 +105,21 @@ function setupRenderJSTest(){
});
});
module("TabularGadget");
test('addTabularGadget', function () {
cleanUp();
equal(RenderJs.GadgetIndex.getGadgetList().length, 0);
RenderJs.TabbularGadget.addNewTabGadget("qunit-fixture", "new_added", "loading/test-gadget.html", "", "");
stop();
RenderJs.bindReady(function (){
start();
equal($("#qunit-fixture").children("#new_added").length, 1);
equal(RenderJs.GadgetIndex.getGadgetList().length, 1);
equal(RenderJs.GadgetIndex.getRootGadget().getDom().attr("id"), "new_added");
});
});
module("GadgetInitialization");
test('GadgetInitialization', function () {
cleanUp();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment