$.fn.ch_button = button
})
+ test("should be defined on jquery object", function () {
+ ok($(document.body).ch_button, 'button method is defined')
+ })
+
test("should be disabled when driving", function () {
var page = $('<div class="page"></div>')
var btn = $('<button class="btn">test</button>')
$.fn.ch_checkbox_input = input
})
+ test("should be defined on jquery object", function () {
+ ok($(document.body).ch_checkbox_input, 'checkbox_input method is defined')
+ })
+
test("should be disabled when driving", function () {
var page = $('<div class="page"></div>')
var input = $('<input type="checkbox">test</input>')
$.fn.ch_header = header
})
+ test("should be defined on jquery object", function () {
+ ok($(document.body).ch_header, 'header method is defined')
+ })
+
test("header contains h1 element", function () {
var page = $('<div class="page"></div>')
var header = $('<div class="ch-header">Test title</div>')
module("cowhide-page")
+ test("should be defined on jquery object", function () {
+ ok($(document.body).ch_page, 'page method is defined')
+ })
+
test("pages cannot be nested", function () {
var page = $('<div class="page"></div>')
var nested = $('<div class="page"></div>')
$.fn.ch_radio_input = input
})
+ test("should be defined on jquery object", function () {
+ ok($(document.body).ch_radio_input, 'radio_input method is defined')
+ })
+
test("should be disabled when driving", function () {
var page = $('<div class="page"></div>')
var input = $('<input type="radio">test</input>')
$.fn.ch_select = select
})
+ test("should be defined on jquery object", function () {
+ ok($(document.body).ch_select, 'select method is defined')
+ })
+
test("should be disabled when driving", function () {
var page = $('<div class="page"></div>')
var input = $('<select><option>test</option></select>')
$.fn.ch_simple_scrollable = simple_scrollable
})
+ test("should be defined on jquery object", function () {
+ ok($(document.body).ch_simple_scrollable, 'simple_scrollable method is defined')
+ })
+
test("widget has been made scrollable", function () {
var page = $('<div class="page"></div>')
var scrollable = $('<div class="ch-simple-scrollable"><p>Test</p></div>')