diff options
author | shampton <shampton@gitlab.com> | 2019-06-29 01:36:56 +0300 |
---|---|---|
committer | shampton <shampton@gitlab.com> | 2019-06-29 01:36:56 +0300 |
commit | cfa0c6592a882f0792240ba70b5ce8fff2b46130 (patch) | |
tree | 3e3e02e2e9f7be8609b66fe518dacb1faea2f5f2 /spec/javascripts/pipelines | |
parent | 1cd8fb49f9b9150faf50767edbdfb564fde8576b (diff) |
Fix pipelines table update after action
The pipelines table was showing the loading icon
after the user cancelled or retried a pipeline.
This fixes that so the pipeline updates without
removing the table from the DOM.
Diffstat (limited to 'spec/javascripts/pipelines')
-rw-r--r-- | spec/javascripts/pipelines/pipelines_spec.js | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/spec/javascripts/pipelines/pipelines_spec.js b/spec/javascripts/pipelines/pipelines_spec.js index 78187b69563..daa898ca687 100644 --- a/spec/javascripts/pipelines/pipelines_spec.js +++ b/spec/javascripts/pipelines/pipelines_spec.js @@ -736,10 +736,9 @@ describe('Pipelines', () => { }); describe('when a request is being made', () => { - it('stops polling, cancels the request, fetches pipelines & restarts polling', done => { + it('stops polling, cancels the request, & restarts polling', done => { spyOn(vm.poll, 'stop'); spyOn(vm.poll, 'restart'); - spyOn(vm, 'getPipelines').and.returnValue(Promise.resolve()); spyOn(vm.service.cancelationSource, 'cancel').and.callThrough(); setTimeout(() => { @@ -754,7 +753,6 @@ describe('Pipelines', () => { expect(vm.poll.stop).toHaveBeenCalled(); setTimeout(() => { - expect(vm.getPipelines).toHaveBeenCalled(); expect(vm.poll.restart).toHaveBeenCalled(); done(); }, 0); @@ -765,10 +763,9 @@ describe('Pipelines', () => { }); describe('when no request is being made', () => { - it('stops polling, fetches pipelines & restarts polling', done => { + it('stops polling & restarts polling', done => { spyOn(vm.poll, 'stop'); spyOn(vm.poll, 'restart'); - spyOn(vm, 'getPipelines').and.returnValue(Promise.resolve()); setTimeout(() => { vm.$el.querySelector('.js-builds-dropdown-button').click(); @@ -776,7 +773,6 @@ describe('Pipelines', () => { expect(vm.poll.stop).toHaveBeenCalled(); setTimeout(() => { - expect(vm.getPipelines).toHaveBeenCalled(); expect(vm.poll.restart).toHaveBeenCalled(); done(); }, 0); |