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
325ee0d8
Commit
325ee0d8
authored
Oct 11, 2021
by
Nicolò Maria Mezzopera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjust alignment of disabled button
- source - tests
parent
9266531e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
9 deletions
+12
-9
app/assets/javascripts/registry/explorer/components/details_page/tags_list_row.vue
...gistry/explorer/components/details_page/tags_list_row.vue
+2
-1
spec/frontend/registry/explorer/components/details_page/tags_list_row_spec.js
...ry/explorer/components/details_page/tags_list_row_spec.js
+10
-8
No files found.
app/assets/javascripts/registry/explorer/components/details_page/tags_list_row.vue
View file @
325ee0d8
...
@@ -181,13 +181,14 @@ export default {
...
@@ -181,13 +181,14 @@ export default {
</template>
</template>
<
template
#right-action
>
<
template
#right-action
>
<gl-dropdown
<gl-dropdown
v-if=
"!
isDeleteDisabled"
:disabled=
"
isDeleteDisabled"
icon=
"ellipsis_v"
icon=
"ellipsis_v"
:text=
"$options.i18n.MORE_ACTIONS_TEXT"
:text=
"$options.i18n.MORE_ACTIONS_TEXT"
:text-sr-only=
"true"
:text-sr-only=
"true"
category=
"tertiary"
category=
"tertiary"
no-caret
no-caret
right
right
:class=
"
{ 'gl-opacity-0 gl-pointer-events-none': isDeleteDisabled }"
data-testid="additional-actions"
data-testid="additional-actions"
data-qa-selector="more_actions_menu"
data-qa-selector="more_actions_menu"
>
>
...
...
spec/frontend/registry/explorer/components/details_page/tags_list_row_spec.js
View file @
325ee0d8
...
@@ -283,18 +283,20 @@ describe('tags list row', () => {
...
@@ -283,18 +283,20 @@ describe('tags list row', () => {
});
});
it
.
each
`
it
.
each
`
canDelete | digest | disabled |
visible
canDelete | digest | disabled |
buttonDisabled
${
true
}
|
${
null
}
|
${
true
}
|
${
fals
e
}
${
true
}
|
${
null
}
|
${
true
}
|
${
tru
e
}
${
false
}
|
${
'
foo
'
}
|
${
true
}
|
${
fals
e
}
${
false
}
|
${
'
foo
'
}
|
${
true
}
|
${
tru
e
}
${
false
}
|
${
null
}
|
${
true
}
|
${
fals
e
}
${
false
}
|
${
null
}
|
${
true
}
|
${
tru
e
}
${
true
}
|
${
'
foo
'
}
|
${
true
}
|
${
fals
e
}
${
true
}
|
${
'
foo
'
}
|
${
true
}
|
${
tru
e
}
${
true
}
|
${
'
foo
'
}
|
${
false
}
|
${
tru
e
}
${
true
}
|
${
'
foo
'
}
|
${
false
}
|
${
fals
e
}
`
(
`
(
'
is $visible that is visible when canDelete is $canDelete and digest is $digest and disabled is $disabled
'
,
'
is $visible that is visible when canDelete is $canDelete and digest is $digest and disabled is $disabled
'
,
({
canDelete
,
digest
,
disabled
,
visible
})
=>
{
({
canDelete
,
digest
,
disabled
,
buttonDisabled
})
=>
{
mountComponent
({
...
defaultProps
,
tag
:
{
...
tag
,
canDelete
,
digest
},
disabled
});
mountComponent
({
...
defaultProps
,
tag
:
{
...
tag
,
canDelete
,
digest
},
disabled
});
expect
(
findAdditionalActionsMenu
().
exists
()).
toBe
(
visible
);
expect
(
findAdditionalActionsMenu
().
props
(
'
disabled
'
)).
toBe
(
buttonDisabled
);
expect
(
findAdditionalActionsMenu
().
classes
(
'
gl-opacity-0
'
)).
toBe
(
buttonDisabled
);
expect
(
findAdditionalActionsMenu
().
classes
(
'
gl-pointer-events-none
'
)).
toBe
(
buttonDisabled
);
},
},
);
);
...
...
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