From: Salvatore Iovene Date: Wed, 16 Jan 2013 09:06:32 +0000 (+0200) Subject: Adds unit tests for scrollable widget. X-Git-Tag: 0.1~66 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8b4c93f5211ec29a6748beae829bf499d2f4bde6;p=profile%2Fivi%2Fcowhide.git Adds unit tests for scrollable widget. --- diff --git a/tests/index.html b/tests/index.html index f88140c..0efe8c6 100644 --- a/tests/index.html +++ b/tests/index.html @@ -5,7 +5,8 @@ - + + @@ -39,6 +40,7 @@ + @@ -61,6 +63,7 @@ +
diff --git a/tests/unit/cowhide-scrollable.js b/tests/unit/cowhide-scrollable.js new file mode 100644 index 0000000..7bf0e33 --- /dev/null +++ b/tests/unit/cowhide-scrollable.js @@ -0,0 +1,14 @@ +$(function () { + + module("cowhide-scrollable") + + test("widget has been made scrollable", function () { + var page = $('
') + var scrollable = $('
') + + scrollable.appendTo(page) + scrollable.ch_scrollable('enable') + + ok(scrollable.hasClass('mCustomScrollbar'), "element has mCustomScrollbar class") + }) +})