test("Popcorn tagthisperson Plugin", function () {
var popped = Popcorn("#video"),
- expects = 6,
+ expects = 7,
count = 0,
interval,
interval2,
start: 0, // seconds
end: 5, // seconds
person: 'Anna Sob',
+ image: 'http://newshour.s3.amazonaws.com/photos%2Fspeeches%2Fguests%2FRichardNSmith_thumbnail.jpg',
target: 'tagdiv'
} )
.tagthisperson({
interval = setInterval( function() {
if( popped.currentTime() > 0 && popped.currentTime() <= 5 ) {
- equals ( tagdiv.innerHTML.trim() , "Anna Sob" ,"tagdiv shows the first tag" );
+ equals (tagdiv.childElementCount, 1, "tagdiv now contains one child elements" );
+ plus();
+ equals ( tagdiv.textContent.trim() , "Anna Sob" ,"tagdiv shows the first tag" );
plus();
clearInterval( interval );
}
interval2 = setInterval( function() {
if( popped.currentTime() > 3 && popped.currentTime() < 5 ) {
- equals ( tagdiv.innerHTML.trim() , "Anna Sob, Scott", "tagdiv shows the first & second tag" );
+ equals ( tagdiv.textContent.trim() , "Anna Sob, Scott", "tagdiv shows the first & second tag" );
plus();
clearInterval( interval2 );
}