Merge branch 'sdk'
[platform/framework/web/web-ui-fw.git] / tests / unit-tests / shortcutscroll / shortcutscroll-tests.js
1 /*
2  * Unit Test: Shortcut Scroll
3  *
4  * Minkyu Kang <mk7.kang@samsung.com>
5  */
6
7 (function ($) {
8         module("Shortcut Scroll");
9
10         var unit_shortcutscroll = function ( list ) {
11                 var widget,
12                         shortcut,
13                         divider;
14
15                 widget = list.parentsUntil(".ui-content").parent().find(".ui-shortcutscroll");
16
17                 /* Create */
18                 ok( widget.hasClass("ui-shortcutscroll"), "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_shortcutscroll( $("#shortcut") );
31         });
32
33 }( jQuery ));