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
9cafd899
Commit
9cafd899
authored
Feb 28, 2022
by
mfluharty
Committed by
Enrique Alcántara
Mar 03, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make gl-button the main element
Move modal inside of button so that button can be grouped
parent
00c6a02d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
8 deletions
+5
-8
ee/app/assets/javascripts/repository/components/lock_button.vue
.../assets/javascripts/repository/components/lock_button.vue
+3
-6
ee/spec/frontend/repository/components/lock_button_spec.js
ee/spec/frontend/repository/components/lock_button_spec.js
+2
-2
No files found.
ee/app/assets/javascripts/repository/components/lock_button.vue
View file @
9cafd899
...
...
@@ -90,11 +90,8 @@ export default {
</
script
>
<
template
>
<span>
<gl-button
:disabled=
"!canLock"
:loading=
"lockLoading"
@
click=
"showModal"
>
{{
lockButtonTitle
}}
</gl-button>
<gl-button
:disabled=
"!canLock"
:loading=
"lockLoading"
@
click=
"showModal"
>
{{
lockButtonTitle
}}
<gl-modal
modal-id=
"lock-file-modal"
:visible=
"isModalVisible"
...
...
@@ -108,5 +105,5 @@ export default {
{{
lockConfirmText
}}
</p>
</gl-modal>
</
spa
n>
</
gl-butto
n>
</
template
>
ee/spec/frontend/repository/components/lock_button_spec.js
View file @
9cafd899
...
...
@@ -59,10 +59,10 @@ describe('LockButton component', () => {
isLocked | label
${
false
}
|
${
'
Lock
'
}
${
true
}
|
${
'
Unlock
'
}
`
(
'
renders the
correct button labels
'
,
({
isLocked
,
label
})
=>
{
`
(
'
renders the
$label button label
'
,
({
isLocked
,
label
})
=>
{
createComponent
({
isLocked
});
expect
(
findLockButton
().
text
()).
to
Be
(
label
);
expect
(
findLockButton
().
text
()).
to
Contain
(
label
);
});
it
(
'
passes the correct prop if lockLoading is set to true
'
,
async
()
=>
{
...
...
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