diff options
author | Winnie Hellmann <winnie@gitlab.com> | 2019-06-03 16:42:55 +0200 |
---|---|---|
committer | Winnie Hellmann <winnie@gitlab.com> | 2019-06-04 23:42:32 +0200 |
commit | f693c1be04205b99ce91ba0d7b523992418fc575 (patch) | |
tree | 2755caf427740a884cab1169a154da30f79b5ce3 | |
parent | 52b2b32517b3782cd009dc2a209c0eb274ddf3ce (diff) | |
download | gitlab-ce-f693c1be04205b99ce91ba0d7b523992418fc575.tar.gz |
Add setListDetail() to issue boards store
-rw-r--r-- | app/assets/javascripts/boards/stores/boards_store.js | 4 | ||||
-rw-r--r-- | spec/javascripts/boards/boards_store_spec.js | 11 |
2 files changed, 15 insertions, 0 deletions
diff --git a/app/assets/javascripts/boards/stores/boards_store.js b/app/assets/javascripts/boards/stores/boards_store.js index f72ab189015..4b3b44574a8 100644 --- a/app/assets/javascripts/boards/stores/boards_store.js +++ b/app/assets/javascripts/boards/stores/boards_store.js @@ -207,6 +207,10 @@ const boardsStore = { eventHub.$emit('updateTokens'); }, + setListDetail(newList) { + this.detail.list = newList; + }, + updateFiltersUrl() { window.history.pushState(null, null, `?${this.filter.path}`); }, diff --git a/spec/javascripts/boards/boards_store_spec.js b/spec/javascripts/boards/boards_store_spec.js index 68e66346bfd..b5559db8784 100644 --- a/spec/javascripts/boards/boards_store_spec.js +++ b/spec/javascripts/boards/boards_store_spec.js @@ -312,6 +312,17 @@ describe('Store', () => { }); }); + describe('setListDetail', () => { + it('sets the list detail', () => { + boardsStore.detail.list = 'not a list'; + + const dummyValue = 'new list'; + boardsStore.setListDetail(dummyValue); + + expect(boardsStore.detail.list).toEqual(dummyValue); + }); + }); + describe('clearDetailIssue', () => { it('resets issue details', () => { boardsStore.detail.issue = 'something'; |