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
Show 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 {
...
@@ -123,7 +123,7 @@ export default {
<gl-button
<gl-button
data-testid=
"action-delete"
data-testid=
"action-delete"
icon=
"remove"
icon=
"remove"
category=
"
prim
ary"
category=
"
second
ary"
variant=
"danger"
variant=
"danger"
:title=
"s__('PackageRegistry|Remove package')"
:title=
"s__('PackageRegistry|Remove package')"
:aria-label=
"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 {
...
@@ -48,6 +48,7 @@ export default {
:title=
"title"
:title=
"title"
:aria-label=
"title"
:aria-label=
"title"
variant=
"danger"
variant=
"danger"
category=
"secondary"
icon=
"remove"
icon=
"remove"
@
click=
"$emit('delete')"
@
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`] = `
...
@@ -102,7 +102,7 @@ exports[`packages_list_row renders 1`] = `
<gl-button-stub
<gl-button-stub
aria-label="Remove package"
aria-label="Remove package"
buttontextclasses=""
buttontextclasses=""
category="
prim
ary"
category="
second
ary"
data-testid="action-delete"
data-testid="action-delete"
icon="remove"
icon="remove"
size="medium"
size="medium"
...
...
spec/frontend/packages/shared/components/package_list_row_spec.js
View file @
491ac523
...
@@ -60,11 +60,9 @@ describe('packages_list_row', () => {
...
@@ -60,11 +60,9 @@ describe('packages_list_row', () => {
});
});
describe
(
'
when is is group
'
,
()
=>
{
describe
(
'
when is is group
'
,
()
=>
{
beforeEach
(
()
=>
{
it
(
'
has a package path component
'
,
()
=>
{
mountComponent
({
isGroup
:
true
});
mountComponent
({
isGroup
:
true
});
});
it
(
'
has a package path component
'
,
()
=>
{
expect
(
findPackagePath
().
exists
()).
toBe
(
true
);
expect
(
findPackagePath
().
exists
()).
toBe
(
true
);
expect
(
findPackagePath
().
props
()).
toMatchObject
({
path
:
'
foo/bar/baz
'
});
expect
(
findPackagePath
().
props
()).
toMatchObject
({
path
:
'
foo/bar/baz
'
});
});
});
...
@@ -92,10 +90,22 @@ describe('packages_list_row', () => {
...
@@ -92,10 +90,22 @@ describe('packages_list_row', () => {
});
});
});
});
describe
(
'
delete event
'
,
()
=>
{
describe
(
'
delete button
'
,
()
=>
{
beforeEach
(()
=>
mountComponent
({
packageEntity
:
packageWithoutTags
}));
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
()
=>
{
it
(
'
emits the packageToDelete event when the delete button is clicked
'
,
async
()
=>
{
mountComponent
({
packageEntity
:
packageWithoutTags
});
findDeleteButton
().
vm
.
$emit
(
'
click
'
);
findDeleteButton
().
vm
.
$emit
(
'
click
'
);
await
wrapper
.
vm
.
$nextTick
();
await
wrapper
.
vm
.
$nextTick
();
...
...
spec/frontend/registry/explorer/components/delete_button_spec.js
View file @
491ac523
...
@@ -58,6 +58,7 @@ describe('delete_button', () => {
...
@@ -58,6 +58,7 @@ describe('delete_button', () => {
title
:
'
Foo title
'
,
title
:
'
Foo title
'
,
variant
:
'
danger
'
,
variant
:
'
danger
'
,
disabled
:
'
true
'
,
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