equal
deleted
inserted
replaced
28 test("test widget initialization", function() { |
28 test("test widget initialization", function() { |
29 var widget = new IriSP.SegmentsWidget(this.Popcorn, this.config, this.ser); |
29 var widget = new IriSP.SegmentsWidget(this.Popcorn, this.config, this.ser); |
30 widget.draw(); |
30 widget.draw(); |
31 |
31 |
32 equal(IriSP.jQuery("#widget-div").length, 1, "test if the div has been added correctly"); |
32 equal(IriSP.jQuery("#widget-div").length, 1, "test if the div has been added correctly"); |
33 equal(IriSP.jQuery("#widget-div").children().length, this.ser._data.annotations.length, "test if children have been added correctly"); |
33 // the + 1 is because we have a z-index div to indicate progress in the video. |
|
34 equal(IriSP.jQuery("#widget-div").children().length, this.ser._data.annotations.length + 1, "test if children have been added correctly"); |
34 }); |
35 }); |
35 |
36 |
36 test("test click on a random segment", function() { |
37 test("test click on a random segment", function() { |
37 var widget = new IriSP.SegmentsWidget(this.Popcorn, this.config, this.ser); |
38 var widget = new IriSP.SegmentsWidget(this.Popcorn, this.config, this.ser); |
38 widget.draw(); |
39 widget.draw(); |