mirror of
https://github.com/django/django.git
synced 2025-07-28 23:54:02 +00:00
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:
parent
3bbaf84d65
commit
2d0dead224
19 changed files with 4716 additions and 2 deletions
18
js_tests/admin/actions.test.js
Normal file
18
js_tests/admin/actions.test.js
Normal 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'));
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue