diff options
author | Samantha Ming <sming@gitlab.com> | 2019-06-28 07:32:03 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2019-06-28 07:32:03 +0000 |
commit | 4bf043435906db75fa9543db96991b8cc7171f46 (patch) | |
tree | 12d2e52d8de2ee0d174f225c0b64ea1c43c6beea /spec/javascripts/notes | |
parent | ae68c7ea142b12fe179a4027b17d31ac6fb2649c (diff) | |
download | gitlab-ce-4bf043435906db75fa9543db96991b8cc7171f46.tar.gz |
Rearrange discussion resolve buttons & update button display
- next-discuss button is always show unless there is only 1 discussion
- regroup buttons arrangements
Diffstat (limited to 'spec/javascripts/notes')
-rw-r--r-- | spec/javascripts/notes/stores/getters_spec.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/javascripts/notes/stores/getters_spec.js b/spec/javascripts/notes/stores/getters_spec.js index 8f3c493dd4c..c3ed079e33b 100644 --- a/spec/javascripts/notes/stores/getters_spec.js +++ b/spec/javascripts/notes/stores/getters_spec.js @@ -32,6 +32,26 @@ describe('Getters Notes Store', () => { }; }); + describe('showJumpToNextDiscussion', () => { + it('should return true if there are 2 or more unresolved discussions', () => { + const localGetters = { + unresolvedDiscussionsIdsByDate: ['123', '456'], + allResolvableDiscussions: [], + }; + + expect(getters.showJumpToNextDiscussion(state, localGetters)()).toBe(true); + }); + + it('should return false if there are 1 or less unresolved discussions', () => { + const localGetters = { + unresolvedDiscussionsIdsByDate: ['123'], + allResolvableDiscussions: [], + }; + + expect(getters.showJumpToNextDiscussion(state, localGetters)()).toBe(false); + }); + }); + describe('discussions', () => { it('should return all discussions in the store', () => { expect(getters.discussions(state)).toEqual([individualNote]); |