diff options
Diffstat (limited to 'spec/javascripts/boards/issue_card_spec.js')
-rw-r--r-- | spec/javascripts/boards/issue_card_spec.js | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/spec/javascripts/boards/issue_card_spec.js b/spec/javascripts/boards/issue_card_spec.js index 8a20911cc66..314e051665e 100644 --- a/spec/javascripts/boards/issue_card_spec.js +++ b/spec/javascripts/boards/issue_card_spec.js @@ -32,7 +32,10 @@ describe('Issue card component', () => { beforeEach(() => { setFixtures('<div class="test-container"></div>'); - list = listObj; + list = { + ...listObj, + type: 'label', + }; issue = new ListIssue({ title: 'Testing', id: 1, @@ -42,6 +45,7 @@ describe('Issue card component', () => { assignees: [], reference_path: '#1', real_path: '/test/1', + weight: 1, }); component = new Vue({ @@ -240,8 +244,8 @@ describe('Issue card component', () => { Vue.nextTick(() => done()); }); - it('renders list label', () => { - expect(component.$el.querySelectorAll('.badge').length).toBe(2); + it('does not render list label but renders all other labels', () => { + expect(component.$el.querySelectorAll('.badge').length).toBe(1); }); it('renders label', () => { @@ -277,7 +281,7 @@ describe('Issue card component', () => { Vue.nextTick() .then(() => { - expect(component.$el.querySelectorAll('.badge').length).toBe(2); + expect(component.$el.querySelectorAll('.badge').length).toBe(1); expect(component.$el.textContent).not.toContain('closed'); done(); @@ -285,10 +289,4 @@ describe('Issue card component', () => { .catch(done.fail); }); }); - - describe('weights', () => { - it('not shows weight component', () => { - expect(component.$el.querySelector('.board-card-weight')).toBeNull(); - }); - }); }); |