diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2017-07-08 00:23:13 +0300 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2017-07-08 00:23:13 +0300 |
commit | b2b527a6906613fbdab693a897de4a4681fab3bf (patch) | |
tree | 00e92bacc24cdcb26b76f0da13bfc68dae85e0bc /app/assets/javascripts/vue_shared/components/table_pagination.vue | |
parent | e354b6d3b58f322255264beff9112c2b59c7881d (diff) |
Update tests to test what the component renders and what the clicks calls
Diffstat (limited to 'app/assets/javascripts/vue_shared/components/table_pagination.vue')
-rw-r--r-- | app/assets/javascripts/vue_shared/components/table_pagination.vue | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/app/assets/javascripts/vue_shared/components/table_pagination.vue b/app/assets/javascripts/vue_shared/components/table_pagination.vue index 6effa7a8b71..c9dbc048345 100644 --- a/app/assets/javascripts/vue_shared/components/table_pagination.vue +++ b/app/assets/javascripts/vue_shared/components/table_pagination.vue @@ -84,7 +84,9 @@ export default { const page = this.pageInfo.page; const items = []; - if (page > 1) items.push({ title: FIRST }); + if (page > 1) { + items.push({ title: FIRST, first: true }); + } if (page > 1) { items.push({ title: PREV, prev: true }); @@ -112,7 +114,9 @@ export default { items.push({ title: NEXT, next: true }); } - if (total - page >= 1) items.push({ title: LAST, last: true }); + if (total - page >= 1) { + items.push({ title: LAST, last: true }); + } return items; }, @@ -126,8 +130,10 @@ export default { v-for="item in getItems" :class="{ page: item.page, - prev: item.prev, - next: item.next, + 'js-previous-button': item.prev, + 'js-next-button': item.next, + 'js-last-button': item.last, + 'js-first-button': item.first, separator: item.separator, active: item.active, disabled: item.disabled |