Welcome to mirror list, hosted at ThFree Co, Russian Federation.

issuable_spec.js « frontend « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9c8f1e046097049dc7b2c06cc66d98b710f27a51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import IssuableIndex from '~/issuable_index';
import issuableInitBulkUpdateSidebar from '~/issuable_init_bulk_update_sidebar';

describe('Issuable', () => {
  describe('initBulkUpdate', () => {
    it('should not set bulkUpdateSidebar', () => {
      new IssuableIndex('issue_'); // eslint-disable-line no-new

      expect(issuableInitBulkUpdateSidebar.bulkUpdateSidebar).toBeNull();
    });

    it('should set bulkUpdateSidebar', () => {
      const element = document.createElement('div');
      element.classList.add('issues-bulk-update');
      document.body.appendChild(element);

      new IssuableIndex('issue_'); // eslint-disable-line no-new

      expect(issuableInitBulkUpdateSidebar.bulkUpdateSidebar).toBeDefined();
    });
  });
});