diff options
author | Nick Kipling <nkipling@gitlab.com> | 2019-07-26 19:42:49 +0100 |
---|---|---|
committer | Nathan Friend <nathan@gitlab.com> | 2019-07-30 13:49:49 -0300 |
commit | 918e7d43dfe614475ee2dd2b6f4c765726db6ef4 (patch) | |
tree | e76709006133602ecd904827346e21021d8a37da /spec/javascripts | |
parent | a37d672ff5c4c102a5b507ad744919748cbdcb34 (diff) | |
download | gitlab-ce-918e7d43dfe614475ee2dd2b6f4c765726db6ef4.tar.gz |
Reworked how deletion works with multi vs single
Single deletion no longer requires a prop
Modal description is now generated on demand
Added dedicated functions for deleting
Updated tests to match new function naming
Updated css class name to be more specific
Diffstat (limited to 'spec/javascripts')
-rw-r--r-- | spec/javascripts/registry/components/table_registry_spec.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/javascripts/registry/components/table_registry_spec.js b/spec/javascripts/registry/components/table_registry_spec.js index 2ca7aa30c0e..b6a37abe4f7 100644 --- a/spec/javascripts/registry/components/table_registry_spec.js +++ b/spec/javascripts/registry/components/table_registry_spec.js @@ -101,7 +101,7 @@ describe('table registry', () => { expect(findDeleteBtn().disabled).toBe(false); findDeleteBtn().click(); - spyOn(vm, 'deleteItems').and.returnValue(Promise.resolve()); + spyOn(vm, 'multiDeleteItems').and.returnValue(Promise.resolve()); Vue.nextTick(() => { const modal = confirmationModal(); @@ -111,7 +111,7 @@ describe('table registry', () => { Vue.nextTick(() => { expect(vm.itemsToBeDeleted).toEqual([]); - expect(vm.deleteItems).toHaveBeenCalledWith({ + expect(vm.multiDeleteItems).toHaveBeenCalledWith({ path: bulkDeletePath, items: [firstImage.tag, secondImage.tag], }); @@ -142,13 +142,13 @@ describe('table registry', () => { expect(vm.itemsToBeDeleted).toEqual([0]); expect(findDeleteBtn().disabled).toBe(false); findDeleteBtn().click(); - spyOn(vm, 'deleteItems').and.returnValue(Promise.resolve()); + spyOn(vm, 'multiDeleteItems').and.returnValue(Promise.resolve()); Vue.nextTick(() => { confirmationModal('.btn-danger').click(); expect(vm.itemsToBeDeleted).toEqual([]); - expect(vm.deleteItems).toHaveBeenCalledWith({ + expect(vm.multiDeleteItems).toHaveBeenCalledWith({ path: bulkDeletePath, items: [firstImage.tag], }); |