diff options
author | Phil Hughes <me@iamphill.com> | 2017-01-27 16:49:56 +0000 |
---|---|---|
committer | Fatih Acet <acetfatih@gmail.com> | 2017-02-03 17:02:44 +0300 |
commit | a943241056961c7b820adfd8fd08edd25c3a563a (patch) | |
tree | 4fd0a70fcbb31804748ee6fa7fb928850c206d12 /spec/javascripts/boards | |
parent | 8b977b295e887f7d134cd92ec352a24c0afd5950 (diff) | |
download | gitlab-ce-a943241056961c7b820adfd8fd08edd25c3a563a.tar.gz |
Some styling updates
Does not remove the issue from the selected tab when it it de-selected, it instead gets purged when changing tab
Diffstat (limited to 'spec/javascripts/boards')
-rw-r--r-- | spec/javascripts/boards/modal_store_spec.js.es6 | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/javascripts/boards/modal_store_spec.js.es6 b/spec/javascripts/boards/modal_store_spec.js.es6 index 9c0625357bd..3f44e427201 100644 --- a/spec/javascripts/boards/modal_store_spec.js.es6 +++ b/spec/javascripts/boards/modal_store_spec.js.es6 @@ -81,6 +81,7 @@ describe('Modal store', () => { }); it('adds issue to selected array', () => { + issue.selected = true; Store.addSelectedIssue(issue); expect(Store.selectedCount()).toBe(1); @@ -112,4 +113,22 @@ describe('Modal store', () => { it('does not find a selected issue', () => { expect(Store.findSelectedIssue(issue)).toBe(undefined); }); + + it('does not remove from selected issue if tab is not all', () => { + Store.store.activeTab = 'selected'; + + Store.toggleIssue(issue); + Store.toggleIssue(issue); + + expect(Store.store.selectedIssues.length).toBe(1); + expect(Store.selectedCount()).toBe(0); + }); + + it('gets selected issue array with only selected issues', () => { + Store.toggleIssue(issue); + Store.toggleIssue(issue2); + Store.toggleIssue(issue2); + + expect(Store.getSelectedIssues().length).toBe(1); + }); }); |