2 * Unit Test: Notification
4 * Minkyu Kang <mk7.kang@samsung.com>
8 module("Notification");
10 var unit_notification = function ( widget, type ) {
16 widget.notification();
18 notification = widget.children( elem );
19 ok( notification, "Create" );
22 widget.notification("open");
24 notification = widget.children( elem );
25 ok( notification.hasClass("show"), "API: open" );
28 widget.notification("close");
30 notification = widget.children( elem );
31 ok( notification.hasClass("hide"), "API: close" );
34 widget.notification("open");
35 notification = widget.children( elem );
36 notification.trigger("vmouseup");
38 notification = widget.children( elem );
39 ok( notification.hasClass("hide"), "Hide when click the notification" );
41 text = notification.children("p");
44 if ( type === "smallpopup" ) {
45 ok( $( text[0] ).hasClass( "ui-smallpopup-text-bg" ), "Text" );
47 ok( $( text[0] ).hasClass( "ui-ticker-text1-bg" ), "Top Text" );
48 ok( $( text[1] ).hasClass( "ui-ticker-text2-bg" ), "Bottom Text" );
52 test( "smallpopup", function () {
53 unit_notification( $("#smallpopup"), "smallpopup" );
56 test( "tickernoti", function () {
57 unit_notification( $("#tickernoti"), "ticker" );