From: Christopher De Cairos Date: Mon, 13 Jun 2011 15:06:09 +0000 (-0400) Subject: modified tests X-Git-Tag: v0.7^2~45^2 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=refs%2Fheads%2Ft542;p=popcorn-js.git modified tests --- diff --git a/plugins/facebook/popcorn.facebook.unit.js b/plugins/facebook/popcorn.facebook.unit.js index 3882b3c..3b8171f 100644 --- a/plugins/facebook/popcorn.facebook.unit.js +++ b/plugins/facebook/popcorn.facebook.unit.js @@ -61,23 +61,26 @@ test("Popcorn Facebook Plugin", function () { ok (document.getElementById('facepilediv'), "facepilediv exists on the page" ); plus(); + // I inspected the html genterated by facebook, and found that there are no uniquely identifying attributes between plug-in types + // so right now, we just check ot make sure that facebook is returning a plugin and displaying it at the correct time. + popped.exec( 2, function() { - ok ( document.getElementById( "likediv" ).innerHTML.length > 0, "No type specified. Like button added to div" ); + ok ( document.getElementById( "likediv" ).innerHTML, "likediv is not empty at 0:02 (expected)" ); plus(); }); popped.exec( 3, function() { - ok ( document.getElementById( "likeboxdiv" ).innerHTML.length > 0, "Incorrect type value defaulted to like button" ); + ok ( document.getElementById( "likeboxdiv" ).innerHTML, "likeboxdiv is not empty at 0:03 (expected)" ); plus(); }); popped.exec( 4, function() { - ok ( document.getElementById( "activitydiv" ).innerHTML.length > 0, "Activity feed is added to div" ); + ok ( document.getElementById( "activitydiv" ).innerHTML, "Activitydiv is not empty at 0:04 (expected)" ); plus(); }); popped.exec( 5, function() { - ok ( document.getElementById( "facepilediv" ).innerHTML.length > 0, "Facepile is added to div" ); + ok ( document.getElementById( "facepilediv" ).innerHTML, "Facepilediv is not empty at 0:05 (expected)" ); plus(); }); });