Revert "Export"
[platform/framework/web/web-ui-fw.git] / tests / unit-tests / nocontents / nocontents-tests.js
1 /*
2  * Unit Test: Nocontents
3  *
4  * Minkyu Kang <mk7.kang@samsung.com>
5  */
6
7 (function ($) {
8         module("Nocontents");
9
10         var unit_nocontents = function ( widget, type ) {
11                 var background,
12                         text,
13                         i;
14
15                 /* Create */
16                 widget.nocontents();
17
18                 ok( widget.hasClass("ui-nocontents"), "Create" );
19
20                 /* Check Background */
21                 background = widget.children( ".ui-nocontents-icon-" + type );
22                 ok( background, "Background" );
23
24                 /* Check Texts */
25                 text = widget.children("p");
26
27                 for ( i = 0; i < text.length; i++ ) {
28                         ok( $( text[i] ).hasClass("ui-nocontents-text"), "Text" + i );
29                 }
30         };
31
32         test( "text type", function () {
33                 unit_nocontents( $("#nocontents_text"), "text" );
34         });
35
36         test( "picture type", function () {
37                 unit_nocontents( $("#nocontents_pic"), "picture" );
38         });
39
40         test( "multimedia type", function () {
41                 unit_nocontents( $("#nocontents_mul"), "multimedia" );
42         });
43
44         test( "unnamed type", function () {
45                 unit_nocontents( $("#nocontents_un"), "unnamed" );
46         });
47 }( jQuery ));