Commit 88ed3d28 authored by Nicolò Maria Mezzopera's avatar Nicolò Maria Mezzopera

Merge branch '227714-delete-packages-from-your-group-level-package-registry-view' into 'master'

Enable delete button on Package group level view list

Closes #227714

See merge request gitlab-org/gitlab!39430
parents 793f55c0 ac4da0bc
......@@ -54,9 +54,6 @@ export default {
hasProjectLink() {
return Boolean(this.packageEntity.project_path);
},
deleteAvailable() {
return !this.disableDelete && !this.isGroup;
},
},
};
</script>
......@@ -111,7 +108,7 @@ export default {
<div
class="table-section d-flex flex-md-column justify-content-between align-items-md-end"
:class="!deleteAvailable ? 'section-50' : 'section-40'"
:class="disableDelete ? 'section-50' : 'section-40'"
>
<publish-method :package-entity="packageEntity" :is-group="isGroup" />
......@@ -126,7 +123,7 @@ export default {
</div>
</div>
<div v-if="deleteAvailable" class="table-section section-10 d-flex justify-content-end">
<div v-if="!disableDelete" class="table-section section-10 d-flex justify-content-end">
<gl-button
data-testid="action-delete"
icon="remove"
......
---
title: Enable delete button on Package group level view list
merge_request: 39430
author:
type: changed
......@@ -67,10 +67,6 @@ describe('packages_list_row', () => {
it('has project field', () => {
expect(findProjectLink().exists()).toBe(true);
});
it('does not show the delete button', () => {
expect(findDeleteButton().exists()).toBe(false);
});
});
describe('showPackageType', () => {
......@@ -96,9 +92,7 @@ describe('packages_list_row', () => {
});
describe('delete event', () => {
beforeEach(() =>
mountComponent({ isGroup: false, packageEntity: packageWithoutTags, shallow: false }),
);
beforeEach(() => mountComponent({ packageEntity: packageWithoutTags, shallow: false }));
it('emits the packageToDelete event when the delete button is clicked', () => {
findDeleteButton().trigger('click');
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment