DEP 0003 -- Added JavaScript unit tests.

Setup QUnit, added tests, and measured test coverage.

Thanks to Nick Sanford for the initial tests.
This commit is contained in:
Trey Hunner 2015-04-14 10:55:57 -04:00 committed by Tim Graham
parent 3bbaf84d65
commit 2d0dead224
19 changed files with 4716 additions and 2 deletions

View file

@ -0,0 +1,18 @@
module('admin.actions', {
beforeEach: function() {
// Number of results shown on page
window._actions_icnt = '100';
var $ = django.jQuery;
$('#qunit-fixture').append($('#result-table').text());
$('tr input.action-select').actions();
}
});
test('check', function(assert) {
var $ = django.jQuery;
assert.notOk($('.action-select').is(':checked'));
$('#action-toggle').click();
assert.ok($('.action-select').is(':checked'));
});