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
074cf0b8
Commit
074cf0b8
authored
Aug 25, 2020
by
v_mishra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replacing deprecated button for showing tree items
parent
a805355a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
ee/app/assets/javascripts/related_items_tree/components/tree_item.vue
...s/javascripts/related_items_tree/components/tree_item.vue
+4
-4
ee/spec/frontend/related_items_tree/components/tree_item_spec.js
.../frontend/related_items_tree/components/tree_item_spec.js
+3
-3
No files found.
ee/app/assets/javascripts/related_items_tree/components/tree_item.vue
View file @
074cf0b8
<
script
>
import
{
mapGetters
,
mapActions
,
mapState
}
from
'
vuex
'
;
import
{
GlTooltipDirective
,
GlLoadingIcon
,
Gl
Deprecated
Button
,
GlIcon
}
from
'
@gitlab/ui
'
;
import
{
GlTooltipDirective
,
GlLoadingIcon
,
GlButton
,
GlIcon
}
from
'
@gitlab/ui
'
;
import
{
__
}
from
'
~/locale
'
;
...
...
@@ -15,7 +15,7 @@ export default {
GlIcon
,
TreeItemBody
,
GlLoadingIcon
,
Gl
Deprecated
Button
,
GlButton
,
},
directives
:
{
GlTooltip
:
GlTooltipDirective
,
...
...
@@ -85,7 +85,7 @@ export default {
}"
>
<div
class=
"list-item-body d-flex align-items-center"
>
<gl-
deprecated-
button
<gl-button
v-if=
"!childrenFetchInProgress && hasChildren"
v-gl-tooltip
.
viewport
.
hover
:title=
"chevronTooltip"
...
...
@@ -95,7 +95,7 @@ export default {
@
click=
"handleChevronClick"
>
<gl-icon
:name=
"chevronType"
/>
</gl-
deprecated-
button>
</gl-button>
<gl-loading-icon
v-if=
"childrenFetchInProgress"
class=
"loading-icon"
size=
"sm"
/>
<tree-item-body
class=
"tree-item-row"
...
...
ee/spec/frontend/related_items_tree/components/tree_item_spec.js
View file @
074cf0b8
import
{
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
Vuex
from
'
vuex
'
;
import
{
Gl
Deprecated
Button
,
GlLoadingIcon
,
GlIcon
}
from
'
@gitlab/ui
'
;
import
{
GlButton
,
GlLoadingIcon
,
GlIcon
}
from
'
@gitlab/ui
'
;
import
TreeItem
from
'
ee/related_items_tree/components/tree_item.vue
'
;
import
TreeItemBody
from
'
ee/related_items_tree/components/tree_item_body.vue
'
;
...
...
@@ -132,14 +132,14 @@ describe('RelatedItemsTree', () => {
});
it
(
'
renders expand/collapse button
'
,
()
=>
{
const
chevronButton
=
wrapper
.
find
(
Gl
Deprecated
Button
);
const
chevronButton
=
wrapper
.
find
(
GlButton
);
expect
(
chevronButton
.
isVisible
()).
toBe
(
true
);
expect
(
chevronButton
.
attributes
(
'
title
'
)).
toBe
(
'
Collapse
'
);
});
it
(
'
has the proper class on the expand/collapse button to avoid dragging
'
,
()
=>
{
const
chevronButton
=
wrapper
.
find
(
Gl
Deprecated
Button
);
const
chevronButton
=
wrapper
.
find
(
GlButton
);
expect
(
chevronButton
.
attributes
(
'
class
'
)).
toContain
(
treeItemChevronBtnClassName
);
});
...
...
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