Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
ac4da0bc
Commit
ac4da0bc
authored
Aug 13, 2020
by
Nicolò Maria Mezzopera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable delete button on package view
- components - tests update
parent
f2c46d34
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
12 deletions
+8
-12
app/assets/javascripts/packages/shared/components/package_list_row.vue
...vascripts/packages/shared/components/package_list_row.vue
+2
-5
changelogs/unreleased/227714-delete-packages-from-your-group-level-package-registry-view.yml
...-packages-from-your-group-level-package-registry-view.yml
+5
-0
spec/frontend/packages/shared/components/package_list_row_spec.js
...ntend/packages/shared/components/package_list_row_spec.js
+1
-7
No files found.
app/assets/javascripts/packages/shared/components/package_list_row.vue
View file @
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=
"
!deleteAvailabl
e ? 'section-50' : 'section-40'"
:class=
"
disableDelet
e ? 'section-50' : 'section-40'"
>
<publish-method
:package-entity=
"packageEntity"
:is-group=
"isGroup"
/>
...
...
@@ -126,7 +123,7 @@ export default {
</div>
</div>
<div
v-if=
"
deleteAvailabl
e"
class=
"table-section section-10 d-flex justify-content-end"
>
<div
v-if=
"
!disableDelet
e"
class=
"table-section section-10 d-flex justify-content-end"
>
<gl-button
data-testid=
"action-delete"
icon=
"remove"
...
...
changelogs/unreleased/227714-delete-packages-from-your-group-level-package-registry-view.yml
0 → 100644
View file @
ac4da0bc
---
title
:
Enable delete button on Package group level view list
merge_request
:
39430
author
:
type
:
changed
spec/frontend/packages/shared/components/package_list_row_spec.js
View file @
ac4da0bc
...
...
@@ -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
'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment