diff -r caefb8b4218f -r 2b962708dff6 unittests/tests/init.js --- a/unittests/tests/init.js Tue Oct 25 14:33:31 2011 +0200 +++ b/unittests/tests/init.js Tue Oct 25 15:43:25 2011 +0200 @@ -2,9 +2,9 @@ module("test initialization routines", { setup: function() { - IriSP.jQuery("#widget-div").append("
"); + IriSP.jQuery("#widget-div").append(""); this.popcornOptions = { - container: "player_container", + container: "widget-div", type: "jwplayer", file : "video/franceculture/franceculture_retourdudimanche20100620.flv", streamer: "rtmp://media.iri.centrepompidou.fr/ddc_player/", flashplayer : '../libs/player.swf', @@ -57,10 +57,10 @@ test("test the instantiation of a bunch of widgets", function() { var pop = IriSP.configurePopcorn(this.popcornOptions); var widgets = IriSP.configureWidgets(pop, this.widgetOptions); - - ok(widgets[0] instanceof IriSP.PlayerWidget, "first widget is a player widget"); - equal(widgets[0].selector.length, 1, "the first widget has a created a dom element"); + + ok(widgets[0] instanceof IriSP.PlayerWidget, "first widget is a player widget"); ok(widgets[1] instanceof IriSP.SegmentsWidget, "second widget is a segments widget"); ok(widgets[2] instanceof IriSP.AnnotationsWidget, "third widget is an annotation widget"); + equal(IriSP.jQuery("#" + this.widgetOptions.container).length, 1, "a new dom element has been created"); }); } \ No newline at end of file