1 $(document).ready(function () {
3 * Tests a jQuery collection against a selector ("ands" the .is() of each
4 * member of the collection, instead of "or"-ing them)
6 * @param {jQuery} $c a jQuery collection object
7 * @param {String} selector the selector to test the collection against
9 var are = function ($c, selector) {
10 return ($c.filter(function () { return $(this).is(selector); }).length
14 var fvg = {fields_view: {
24 openerp = window.openerp.init(true);
25 window.openerp.base.chrome(openerp);
27 window.openerp.base.views(openerp);
28 window.openerp.base.list(openerp);
32 asyncTest('render selection checkboxes', 2, function () {
33 var listview = new openerp.base.ListView(
35 'qunit-fixture', {model: null});
37 listview.on_loaded(fvg);
39 listview.do_fill_table([{}, {}, {}]).then(function () {
40 ok(are(listview.$element.find('tbody th'),
41 '.oe-record-selector'));
42 ok(are(listview.$element.find('tbody th input'),
43 ':checkbox:not([name])'));