diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-02 15:08:31 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-02 15:08:31 +0300 |
commit | 082a21ddd4d13dd00fc443ecc29c6cc5c1229423 (patch) | |
tree | a5e18db615d097574f6aa932ab1d5a1782f854e5 /spec/frontend/error_tracking | |
parent | 6c4491e9365c6749fb7f2fb9826c450c3035a417 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/error_tracking')
-rw-r--r-- | spec/frontend/error_tracking/components/error_tracking_list_spec.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/frontend/error_tracking/components/error_tracking_list_spec.js b/spec/frontend/error_tracking/components/error_tracking_list_spec.js index 5e0f0ca9bef..23d448f3964 100644 --- a/spec/frontend/error_tracking/components/error_tracking_list_spec.js +++ b/spec/frontend/error_tracking/components/error_tracking_list_spec.js @@ -398,6 +398,30 @@ describe('ErrorTrackingList', () => { }); describe('When pagination is required', () => { + describe('and previous cursor is not available', () => { + beforeEach(async () => { + store.state.list.loading = false; + delete store.state.list.pagination.previous; + mountComponent(); + }); + + it('disables Prev button in the pagination', async () => { + expect(findPagination().props('prevPage')).toBe(null); + expect(findPagination().props('nextPage')).not.toBe(null); + }); + }); + describe('and next cursor is not available', () => { + beforeEach(async () => { + store.state.list.loading = false; + delete store.state.list.pagination.next; + mountComponent(); + }); + + it('disables Next button in the pagination', async () => { + expect(findPagination().props('prevPage')).not.toBe(null); + expect(findPagination().props('nextPage')).toBe(null); + }); + }); describe('and the user is not on the first page', () => { describe('and the previous button is clicked', () => { beforeEach(async () => { |