Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/error_tracking/components/error_tracking_list_spec.js')
-rw-r--r--spec/frontend/error_tracking/components/error_tracking_list_spec.js13
1 files changed, 7 insertions, 6 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 d0893c0de01..f00ba884a6c 100644
--- a/spec/frontend/error_tracking/components/error_tracking_list_spec.js
+++ b/spec/frontend/error_tracking/components/error_tracking_list_spec.js
@@ -71,6 +71,7 @@ describe('ErrorTrackingList', () => {
setEndpoint: jest.fn(),
searchByQuery: jest.fn(),
sortByField: jest.fn(),
+ fetchPaginatedResults: jest.fn(),
};
const state = {
@@ -305,10 +306,10 @@ describe('ErrorTrackingList', () => {
it('fetches the previous page of results', () => {
expect(wrapper.find('.prev-page-item').attributes('aria-disabled')).toBe(undefined);
wrapper.vm.goToPrevPage();
- expect(actions.startPolling).toHaveBeenCalledTimes(2);
- expect(actions.startPolling).toHaveBeenLastCalledWith(
+ expect(actions.fetchPaginatedResults).toHaveBeenCalled();
+ expect(actions.fetchPaginatedResults).toHaveBeenLastCalledWith(
expect.anything(),
- '/path?cursor=previousCursor',
+ 'previousCursor',
undefined,
);
});
@@ -324,10 +325,10 @@ describe('ErrorTrackingList', () => {
window.scrollTo = jest.fn();
findPagination().vm.$emit('input', 2);
expect(window.scrollTo).toHaveBeenCalledWith(0, 0);
- expect(actions.startPolling).toHaveBeenCalledTimes(2);
- expect(actions.startPolling).toHaveBeenLastCalledWith(
+ expect(actions.fetchPaginatedResults).toHaveBeenCalled();
+ expect(actions.fetchPaginatedResults).toHaveBeenLastCalledWith(
expect.anything(),
- '/path?cursor=nextCursor',
+ 'nextCursor',
undefined,
);
});