2
0

actions.test.js 631 B

1234567891011121314151617181920212223
  1. /* global QUnit, Actions */
  2. 'use strict';
  3. QUnit.module('admin.actions', {
  4. beforeEach: function() {
  5. // Number of results shown on page
  6. /* eslint-disable */
  7. window._actions_icnt = '100';
  8. /* eslint-enable */
  9. const $ = django.jQuery;
  10. $('#qunit-fixture').append($('#result-table').text());
  11. Actions(document.querySelectorAll('tr input.action-select'));
  12. }
  13. });
  14. QUnit.test('check', function(assert) {
  15. const $ = django.jQuery;
  16. assert.notOk($('.action-select').is(':checked'));
  17. $('#action-toggle').click();
  18. assert.ok($('.action-select').is(':checked'));
  19. });