diff options
author | Clement Ho <clemmakesapps@gmail.com> | 2017-12-21 22:53:45 +0300 |
---|---|---|
committer | Clement Ho <clemmakesapps@gmail.com> | 2017-12-21 22:53:45 +0300 |
commit | 539996f7daf9115f713c0802dea85c53c5f6838a (patch) | |
tree | e5dae9eb460081f68f538cbcf1fa2a6ddf0d5679 /spec | |
parent | 4eb5c3a2447409bc5e81349d93f3138bd49f62ae (diff) | |
parent | e1f5c2b194fa8ee898446517f1802c6e28312b0b (diff) |
Merge branch '33609-hide-pagination' into 'master'
Do not show Vue pagination if only one page
Closes #33609
See merge request gitlab-org/gitlab-ce!15999
Diffstat (limited to 'spec')
-rw-r--r-- | spec/javascripts/vue_shared/components/table_pagination_spec.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/javascripts/vue_shared/components/table_pagination_spec.js b/spec/javascripts/vue_shared/components/table_pagination_spec.js index b0b78e34e0f..1465ef5855f 100644 --- a/spec/javascripts/vue_shared/components/table_pagination_spec.js +++ b/spec/javascripts/vue_shared/components/table_pagination_spec.js @@ -19,6 +19,22 @@ describe('Pagination component', () => { }); describe('render', () => { + it('should not render anything', () => { + component = mountComponet({ + pageInfo: { + nextPage: 1, + page: 1, + perPage: 20, + previousPage: null, + total: 15, + totalPages: 1, + }, + change: spy, + }); + + expect(component.$el.innerHTML).not.toBeDefined(); + }); + describe('prev button', () => { it('should be disabled and non clickable', () => { component = mountComponet({ |