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
26630149
Commit
26630149
authored
Aug 17, 2020
by
Matej Latin
Committed by
Andrew Fontaine
Aug 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace the weight select deprecated button
parent
48f51b08
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
11 deletions
+6
-11
ee/app/assets/javascripts/boards/components/weight_select.vue
...pp/assets/javascripts/boards/components/weight_select.vue
+4
-9
ee/spec/frontend/boards/components/weight_select_spec.js
ee/spec/frontend/boards/components/weight_select_spec.js
+2
-2
No files found.
ee/app/assets/javascripts/boards/components/weight_select.vue
View file @
26630149
<
script
>
import
{
Gl
Deprecated
Button
,
GlDeprecatedDropdown
,
GlDeprecatedDropdownItem
}
from
'
@gitlab/ui
'
;
import
{
GlButton
,
GlDeprecatedDropdown
,
GlDeprecatedDropdownItem
}
from
'
@gitlab/ui
'
;
const
ANY_WEIGHT
=
'
Any weight
'
;
const
NO_WEIGHT
=
'
None
'
;
export
default
{
components
:
{
Gl
Deprecated
Button
,
GlButton
,
GlDeprecatedDropdown
,
GlDeprecatedDropdownItem
,
},
...
...
@@ -71,14 +71,9 @@ export default {
<div
class=
"block weight"
>
<div
class=
"title gl-mb-3"
>
{{
__
(
'
Weight
'
)
}}
<gl-deprecated-button
v-if=
"canEdit"
variant=
"blank"
class=
"float-right"
@
click=
"showDropdown"
>
<gl-button
v-if=
"canEdit"
variant=
"link"
class=
"float-right"
@
click=
"showDropdown"
>
{{
__
(
'
Edit
'
)
}}
</gl-
deprecated-
button>
</gl-button>
</div>
<div
:class=
"valueClass"
:hidden=
"!dropdownHidden"
class=
"value"
>
{{
valueText
}}
</div>
...
...
ee/spec/frontend/boards/components/weight_select_spec.js
View file @
26630149
import
{
mount
}
from
'
@vue/test-utils
'
;
import
WeightSelect
from
'
ee/boards/components/weight_select.vue
'
;
import
{
Gl
Deprecated
Button
,
GlDeprecatedDropdown
}
from
'
@gitlab/ui
'
;
import
{
GlButton
,
GlDeprecatedDropdown
}
from
'
@gitlab/ui
'
;
describe
(
'
WeightSelect
'
,
()
=>
{
let
wrapper
;
const
editButton
=
()
=>
wrapper
.
find
(
Gl
Deprecated
Button
);
const
editButton
=
()
=>
wrapper
.
find
(
GlButton
);
const
valueContainer
=
()
=>
wrapper
.
find
(
'
.value
'
);
const
weightDropdown
=
()
=>
wrapper
.
find
(
GlDeprecatedDropdown
);
const
weightSelect
=
()
=>
wrapper
.
find
({
ref
:
'
weight-select
'
});
...
...
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