Merge branch 'sdk'
[platform/framework/web/web-ui-fw.git] / tests / unit-tests / fastscroll / fastscroll-tests.js
1 /*
2  * Unit Test: FastScroll
3  *
4  * Minkyu Kang <mk7.kang@samsung.com>
5  */
6
7 (function ($) {
8         module("FastScroll");
9
10         var unit_fastscroll = function ( list ) {
11                 var widget,
12                         shortcut,
13                         divider;
14
15                 widget = list.parentsUntil(".ui-content").parent().find(".ui-fastscroll");
16
17                 /* Create */
18                 ok( widget.hasClass("ui-fastscroll"), "Create" );
19
20                 shortcut = widget.find("li");
21                 divider = list.find(".ui-li-divider");
22
23                 /* Shortcuts */
24                 for ( i = 0; i < divider.length; i++ ) {
25                         equal( $( divider[i] ).text(), $( shortcut[i] ).text(), "Shortcut");
26                 }
27         };
28
29         test( "shortcut", function () {
30                 unit_fastscroll( $("#shortcut") );
31         });
32
33 }( jQuery ));