summaryrefslogtreecommitdiff
path: root/spec/javascripts
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2018-11-02 12:09:03 +0000
committerKamil Trzciński <ayufan@ayufan.eu>2018-11-02 12:09:03 +0000
commit473262a04b098396c0633436c0e9572561d332c7 (patch)
tree392cac6c51f754327b58cca0d020c9360bda9114 /spec/javascripts
parent87140a922b86e8f37eb3c029ba874f4b11035a99 (diff)
parent87444fb6eda755a0340ab2e38ad83bb8edc67f6f (diff)
downloadgitlab-ce-473262a04b098396c0633436c0e9572561d332c7.tar.gz
Merge branch '28249-add-pagination' into 'master'
Adds pagination to pipelines table in merge request & commit page Closes #28249 See merge request gitlab-org/gitlab-ce!22696
Diffstat (limited to 'spec/javascripts')
-rw-r--r--spec/javascripts/commit/pipelines/pipelines_spec.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/spec/javascripts/commit/pipelines/pipelines_spec.js b/spec/javascripts/commit/pipelines/pipelines_spec.js
index b797cc44ae7..04c8ab44405 100644
--- a/spec/javascripts/commit/pipelines/pipelines_spec.js
+++ b/spec/javascripts/commit/pipelines/pipelines_spec.js
@@ -72,6 +72,29 @@ describe('Pipelines table in Commits and Merge requests', function() {
done();
}, 0);
});
+
+ describe('with pagination', () => {
+ it('should make an API request when using pagination', done => {
+ setTimeout(() => {
+ spyOn(vm, 'updateContent');
+
+ vm.store.state.pageInfo = {
+ page: 1,
+ total: 10,
+ perPage: 2,
+ nextPage: 2,
+ totalPages: 5,
+ };
+
+ vm.$nextTick(() => {
+ vm.$el.querySelector('.js-next-button a').click();
+
+ expect(vm.updateContent).toHaveBeenCalledWith({ page: '2' });
+ done();
+ });
+ });
+ });
+ });
});
describe('pipeline badge counts', () => {