datatable-body-tests.js revision 3e63b4e9babde3f923098e5ea86fa645a7029a7a
name: "datatable-body",
"test non-DataTable construction": function () {
});
},
"DataTable.Base default bodyView should be DataTable.BodyView": function () {
columns: ['a'],
data: [{ a: 1 }]
});
},
"DataTable default bodyView should be DataTable.BodyView": function () {
columns: ['a'],
data: [{ a: 1 }]
});
},
"Shared ModelList should not generate duplicate ids": function () {
columns: ['a'],
data: [{ a: 1 }]
}).render(),
columns: ['a'],
}).render(),
dups = 0;
function (id) {
dups++;
}
});
}
}));
name: "getCell",
setUp: function () {
columns: [
'b',
'c'
],
data: [
{ a: 1, b: 1, c: 1 },
{ a: 2, b: 2, c: 2 },
{ a: 3, b: 3, c: 3 }
]
}).render();
},
tearDown: function () {
},
"getCell([row, col]) should return <td>": function () {
},
"getCell(tdNode) should return <td>": function () {
},
"getCell(childNode) should return <td>": function () {
},
"getCell([row, col], shiftString) should return relative <td>": function () {
},
"getCell(tdNode, shiftString) should return the relative <td>": function () {
'above')));
},
"getCell(childNode, shiftString) should return the relative <td>": function () {
'above')));
},
"getCell([row, col], shiftArray) should return relative <td>": function () {
},
"getCell(tdNode, shiftArray) should return the relative <td>": function () {
},
"getCell(childNode, shiftArray) should return the relative <td>": function () {
}
}));
name: "getRow",
setUp: function () {
columns: [
'b',
'c'
],
data: [
{ a: 1, b: 1, c: 1 },
{ a: 2, b: 2, c: 2 },
{ a: 3, b: 3, c: 3 }
]
}).render();
},
tearDown: function () {
},
"getRow(index) should return <tr>": function () {
},
"getRow(model) should return the <tr>": function () {
},
"getRow(model.clientId) should return the <tr>": function () {
}
}));
name: "getRecord",
setUp: function () {
columns: [
'b',
'c'
],
data: [
{ a: 'a1', b: 1, c: 1 },
{ a: 'a2', b: 2, c: 2 },
{ a: 'a3', b: 3, c: 3 }
]
}).render();
},
tearDown: function () {
},
"getRecord(index) should return modelList.item(index)": function () {
},
"getRecord(node) should return the corresponding Model": function () {
},
"getRecord(childNode) should return the corresponding Model": function () {
},
"getRecord(model.id) should return the corresponding Model": function () {
idAttribute: 'a'
}, {
ATTRS: {
a: {},
b: {},
c: {}
}
}),
data: [
{ a: 'a1', b: 1, c: 1 },
{ a: 'a2', b: 2, c: 2 },
{ a: 'a3', b: 3, c: 3 }
],
recordType: M
});
// For proper cleanup
},
"getRecord(model.clientId) should return the corresponding Model": function () {
},
"getRecord(rowId) should return the corresponding Model": function () {
},
"getRecord(childElId) should return the corresponding Model": function () {
}
}));
name: "columns attribute",
setUp: function () {
columns: [
{ key: 'b',
formatter: function (o) {
o.rowClass += 'testRowClass';
o.className += 'testCellClass';
}
},
o.cell
.addClass('testCellClass')
.setContent(o.value)
.ancestor()
.addClass('testRowClass2');
return false;
}
}
]
},
'd'
],
data: [
{ a: 'a1', b: 'b1', c: 'c1', d: 'd1' }
]
}).render();
},
tearDown: function () {
},
"formatter adding to o.className should add to cell classes": function () {
},
"formatter adding to o.rowClass should add to row classes": function () {
},
"nodeFormatter should be able to add classes to o.cell": function () {
},
"nodeFormatter should be able to add row classes from o.cell.ancestor()": function () {
},
"changing columns config propagates to the UI": function () {
}
}));
name: "destroy",
tearDown: function () {
if (this.table) {
}
},
"destroying the bodyView instance should prevent further changes propagating to the UI": function () {
columns: [ 'a' ],
}).render();
}
}));