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
e3aa28cc
Commit
e3aa28cc
authored
Aug 25, 2020
by
Tom Quirk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bind component attrs to todo_button
parent
dac3a45a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
7 deletions
+2
-7
app/assets/javascripts/vue_shared/components/todo_button.vue
app/assets/javascripts/vue_shared/components/todo_button.vue
+1
-6
spec/frontend/vue_shared/components/todo_button_spec.js
spec/frontend/vue_shared/components/todo_button_spec.js
+1
-1
No files found.
app/assets/javascripts/vue_shared/components/todo_button.vue
View file @
e3aa28cc
...
...
@@ -12,11 +12,6 @@ export default {
required
:
false
,
default
:
true
,
},
loading
:
{
type
:
Boolean
,
required
:
false
,
default
:
false
,
},
},
computed
:
{
buttonLabel
()
{
...
...
@@ -27,7 +22,7 @@ export default {
</
script
>
<
template
>
<gl-button
:loading=
"loading
"
:aria-label=
"buttonLabel"
@
click=
"$emit('click', $event)"
>
<gl-button
v-bind=
"$attrs
"
:aria-label=
"buttonLabel"
@
click=
"$emit('click', $event)"
>
{{
buttonLabel
}}
</gl-button>
</
template
>
spec/frontend/vue_shared/components/todo_button_spec.js
View file @
e3aa28cc
...
...
@@ -40,7 +40,7 @@ describe('Todo Button', () => {
expect
(
wrapper
.
find
(
GlButton
).
text
()).
toBe
(
label
);
});
it
(
'
sets button props correctly when `loading` is true
'
,
()
=>
{
it
(
'
binds additional props to GlButton
'
,
()
=>
{
createComponent
({
loading
:
true
});
expect
(
wrapper
.
find
(
GlButton
).
props
(
'
loading
'
)).
toBe
(
true
);
...
...
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