# HG changeset patch # User hamidouk # Date 1319546011 -7200 # Node ID caefb8b4218fa5bf3e104f4b7ac6a05fb9acae28 # Parent becd5f52fa246f563f06113702f5a71d256247d7 fixed div id in test data. diff -r becd5f52fa24 -r caefb8b4218f unittests/tests/init.js --- a/unittests/tests/init.js Tue Oct 25 14:33:18 2011 +0200 +++ b/unittests/tests/init.js Tue Oct 25 14:33:31 2011 +0200 @@ -4,7 +4,7 @@ setup: function() { IriSP.jQuery("#widget-div").append("
"); this.popcornOptions = { - container: "#player_container", + container: "player_container", type: "jwplayer", file : "video/franceculture/franceculture_retourdudimanche20100620.flv", streamer: "rtmp://media.iri.centrepompidou.fr/ddc_player/", flashplayer : '../libs/player.swf', @@ -22,6 +22,7 @@ css:'../../src/css/LdtPlayer.css', widgets: [ {type: "PlayerWidget", + mode: "radio", metadata:{ format:'cinelab', src:'test.json', @@ -58,6 +59,7 @@ 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[1] instanceof IriSP.SegmentsWidget, "second widget is a segments widget"); ok(widgets[2] instanceof IriSP.AnnotationsWidget, "third widget is an annotation widget"); });