From 97f08c651e0c95e33dee4a529ff80472e7d3bbe4 Mon Sep 17 00:00:00 2001 From: Shah El-Rahman Date: Tue, 6 Feb 2018 21:05:54 -0600 Subject: Add modal for stopping and retrying pipelines Fix tests Address code review feedback Fix tests --- spec/javascripts/pipelines/async_button_spec.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'spec/javascripts/pipelines/async_button_spec.js') diff --git a/spec/javascripts/pipelines/async_button_spec.js b/spec/javascripts/pipelines/async_button_spec.js index d010d897642..8ce33d410a7 100644 --- a/spec/javascripts/pipelines/async_button_spec.js +++ b/spec/javascripts/pipelines/async_button_spec.js @@ -15,6 +15,7 @@ describe('Pipelines Async Button', () => { title: 'Foo', icon: 'repeat', cssClass: 'bar', + id: 123, }, }).$mount(); }); @@ -38,9 +39,8 @@ describe('Pipelines Async Button', () => { describe('With confirm dialog', () => { it('should call the service when confimation is positive', () => { - spyOn(window, 'confirm').and.returnValue(true); - eventHub.$on('postAction', (endpoint) => { - expect(endpoint).toEqual('/foo'); + eventHub.$on('actionConfirmationModal', (data) => { + expect(data.id).toEqual(123); }); component = new AsyncButtonComponent({ @@ -49,7 +49,7 @@ describe('Pipelines Async Button', () => { title: 'Foo', icon: 'fa fa-foo', cssClass: 'bar', - confirmActionMessage: 'bar', + id: 123, }, }).$mount(); -- cgit v1.2.1