diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2019-05-03 14:25:06 +0000 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2019-05-03 14:25:06 +0000 |
commit | d5c4cb567f970cae7fbafee542480d0a55b0c050 (patch) | |
tree | d6d11fdbf315fbcd9f3e4f8d909f9c60b6343f8e /spec | |
parent | 8f5cf85e0cf4ff1d610f8738ef84ed9a70ebc0ed (diff) | |
parent | 3945e18176db929c758b03510c92b31c6da2bf3b (diff) | |
download | gitlab-ce-d5c4cb567f970cae7fbafee542480d0a55b0c050.tar.gz |
Merge branch '10763-track-uninstall-button-clicks-ce' into 'master'
CE Backport of tracking uninstall button click
See merge request gitlab-org/gitlab-ce!28012
Diffstat (limited to 'spec')
-rw-r--r-- | spec/frontend/clusters/components/uninstall_application_confirmation_modal_spec.js | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/spec/frontend/clusters/components/uninstall_application_confirmation_modal_spec.js b/spec/frontend/clusters/components/uninstall_application_confirmation_modal_spec.js index 6a7126b45cd..04808864fc0 100644 --- a/spec/frontend/clusters/components/uninstall_application_confirmation_modal_spec.js +++ b/spec/frontend/clusters/components/uninstall_application_confirmation_modal_spec.js @@ -29,10 +29,19 @@ describe('UninstallApplicationConfirmationModal', () => { expect(wrapper.find(GlModal).attributes('ok-title')).toEqual(`Uninstall ${appTitle}`); }); - it('triggers confirm event when ok button is clicked', () => { - wrapper.find(GlModal).vm.$emit('ok'); + describe('when ok button is clicked', () => { + beforeEach(() => { + jest.spyOn(wrapper.vm, 'trackUninstallButtonClick'); + wrapper.find(GlModal).vm.$emit('ok'); + }); + + it('emits confirm event', () => { + expect(wrapper.emitted('confirm')).toBeTruthy(); + }); - expect(wrapper.emitted('confirm')).toBeTruthy(); + it('calls track uninstall button click mixin', () => { + expect(wrapper.vm.trackUninstallButtonClick).toHaveBeenCalledWith(INGRESS); + }); }); it('displays a warning text indicating the app will be uninstalled', () => { |