1
0
Fork 0
mirror of https://github.com/koalyptus/TableFilter.git synced 2024-05-19 14:56:40 +02:00
TableFilter/test/test.js

22 lines
649 B
JavaScript
Raw Normal View History

2015-05-10 13:12:31 +02:00
(function(win, TableFilter) {
2014-11-08 13:37:24 +01:00
var tf = new TableFilter('demo', {
base_path: '../dist/tablefilter/'
});
2014-11-08 13:37:24 +01:00
tf.init();
2014-11-09 06:12:03 +01:00
module("Sanity checks");
2014-11-08 13:37:24 +01:00
test("TableFilter object", function() {
equal(tf.id, 'demo', 'id check');
equal(tf.filtersRowIndex, 0, 'Filters row index');
deepEqual(tf.fltCol.length, 5, 'filters type collection length');
});
module('DOM tests');
test('Filters row', function() {
equal(tf.tbl.rows[0].className, 'fltrow', 'Filters row CSS class name');
equal(tf.getFilterElement(0).nodeName, 'INPUT', 'Filter DOM element');
2014-11-08 13:37:24 +01:00
});
2015-05-10 13:12:31 +02:00
})(window, TableFilter);