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
491ac523
Commit
491ac523
authored
Feb 23, 2021
by
Nicolò Maria Mezzopera
Committed by
Andrew Fontaine
Feb 23, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set package delete button to secondary
- source - tests
parent
04da813f
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
7 deletions
+24
-7
app/assets/javascripts/packages/shared/components/package_list_row.vue
...vascripts/packages/shared/components/package_list_row.vue
+1
-1
app/assets/javascripts/registry/explorer/components/delete_button.vue
...avascripts/registry/explorer/components/delete_button.vue
+1
-0
changelogs/unreleased/320746-update-the-package-list-item-ui-make-action-buttons-in-list-items-.yml
...ckage-list-item-ui-make-action-buttons-in-list-items-.yml
+5
-0
spec/frontend/packages/shared/components/__snapshots__/package_list_row_spec.js.snap
...ed/components/__snapshots__/package_list_row_spec.js.snap
+1
-1
spec/frontend/packages/shared/components/package_list_row_spec.js
...ntend/packages/shared/components/package_list_row_spec.js
+15
-5
spec/frontend/registry/explorer/components/delete_button_spec.js
...ontend/registry/explorer/components/delete_button_spec.js
+1
-0
No files found.
app/assets/javascripts/packages/shared/components/package_list_row.vue
View file @
491ac523
...
...
@@ -123,7 +123,7 @@ export default {
<gl-button
data-testid=
"action-delete"
icon=
"remove"
category=
"
prim
ary"
category=
"
second
ary"
variant=
"danger"
:title=
"s__('PackageRegistry|Remove package')"
:aria-label=
"s__('PackageRegistry|Remove package')"
...
...
app/assets/javascripts/registry/explorer/components/delete_button.vue
View file @
491ac523
...
...
@@ -48,6 +48,7 @@ export default {
:title=
"title"
:aria-label=
"title"
variant=
"danger"
category=
"secondary"
icon=
"remove"
@
click=
"$emit('delete')"
/>
...
...
changelogs/unreleased/320746-update-the-package-list-item-ui-make-action-buttons-in-list-items-.yml
0 → 100644
View file @
491ac523
---
title
:
'
Registry:
make
delete
icon
buttons
secondary'
merge_request
:
54545
author
:
type
:
changed
spec/frontend/packages/shared/components/__snapshots__/package_list_row_spec.js.snap
View file @
491ac523
...
...
@@ -102,7 +102,7 @@ exports[`packages_list_row renders 1`] = `
<gl-button-stub
aria-label="Remove package"
buttontextclasses=""
category="
prim
ary"
category="
second
ary"
data-testid="action-delete"
icon="remove"
size="medium"
...
...
spec/frontend/packages/shared/components/package_list_row_spec.js
View file @
491ac523
...
...
@@ -60,11 +60,9 @@ describe('packages_list_row', () => {
});
describe
(
'
when is is group
'
,
()
=>
{
beforeEach
(
()
=>
{
it
(
'
has a package path component
'
,
()
=>
{
mountComponent
({
isGroup
:
true
});
});
it
(
'
has a package path component
'
,
()
=>
{
expect
(
findPackagePath
().
exists
()).
toBe
(
true
);
expect
(
findPackagePath
().
props
()).
toMatchObject
({
path
:
'
foo/bar/baz
'
});
});
...
...
@@ -92,10 +90,22 @@ describe('packages_list_row', () => {
});
});
describe
(
'
delete event
'
,
()
=>
{
beforeEach
(()
=>
mountComponent
({
packageEntity
:
packageWithoutTags
}));
describe
(
'
delete button
'
,
()
=>
{
it
(
'
exists and has the correct props
'
,
()
=>
{
mountComponent
({
packageEntity
:
packageWithoutTags
});
expect
(
findDeleteButton
().
exists
()).
toBe
(
true
);
expect
(
findDeleteButton
().
attributes
()).
toMatchObject
({
icon
:
'
remove
'
,
category
:
'
secondary
'
,
variant
:
'
danger
'
,
title
:
'
Remove package
'
,
});
});
it
(
'
emits the packageToDelete event when the delete button is clicked
'
,
async
()
=>
{
mountComponent
({
packageEntity
:
packageWithoutTags
});
findDeleteButton
().
vm
.
$emit
(
'
click
'
);
await
wrapper
.
vm
.
$nextTick
();
...
...
spec/frontend/registry/explorer/components/delete_button_spec.js
View file @
491ac523
...
...
@@ -58,6 +58,7 @@ describe('delete_button', () => {
title
:
'
Foo title
'
,
variant
:
'
danger
'
,
disabled
:
'
true
'
,
category
:
'
secondary
'
,
});
});
...
...
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