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
21d83a10
Commit
21d83a10
authored
Sep 17, 2020
by
Neil McCorrison
Committed by
Vitaly Slobodin
Sep 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replaced GlDeprecatedDropdown with GlDropdown on dependencies page
parent
4f028edc
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
27 deletions
+39
-27
ee/app/assets/javascripts/dependencies/components/dependencies_actions.vue
...ascripts/dependencies/components/dependencies_actions.vue
+7
-17
ee/spec/frontend/dependencies/components/__snapshots__/dependencies_actions_spec.js.snap
...omponents/__snapshots__/dependencies_actions_spec.js.snap
+30
-8
ee/spec/frontend/dependencies/components/dependencies_actions_spec.js
...tend/dependencies/components/dependencies_actions_spec.js
+2
-2
No files found.
ee/app/assets/javascripts/dependencies/components/dependencies_actions.vue
View file @
21d83a10
<
script
>
import
{
mapActions
,
mapState
}
from
'
vuex
'
;
import
{
GlButton
,
GlDeprecatedDropdown
,
GlDeprecatedDropdownItem
,
GlIcon
,
GlTooltipDirective
,
}
from
'
@gitlab/ui
'
;
import
{
GlButton
,
GlDropdown
,
GlDropdownItem
,
GlIcon
,
GlTooltipDirective
}
from
'
@gitlab/ui
'
;
import
{
DEPENDENCY_LIST_TYPES
}
from
'
../store/constants
'
;
import
{
SORT_FIELDS
,
SORT_ORDER
}
from
'
../store/modules/list/constants
'
;
...
...
@@ -14,8 +8,8 @@ export default {
name
:
'
DependenciesActions
'
,
components
:
{
GlButton
,
GlD
eprecatedD
ropdown
,
GlD
eprecatedD
ropdownItem
,
GlDropdown
,
GlDropdownItem
,
GlIcon
,
},
directives
:
{
...
...
@@ -72,12 +66,8 @@ export default {
<
template
>
<div
class=
"btn-toolbar"
>
<div
class=
"btn-group flex-grow-1 mr-2"
>
<gl-deprecated-dropdown
:text=
"sortFieldName"
class=
"flex-grow-1 text-center"
right
>
<gl-deprecated-dropdown-item
v-for=
"(name, id) in sortFields"
:key=
"id"
@
click=
"setSortField(id)"
>
<gl-dropdown
:text=
"sortFieldName"
class=
"flex-grow-1 text-center"
right
>
<gl-dropdown-item
v-for=
"(name, id) in sortFields"
:key=
"id"
@
click=
"setSortField(id)"
>
<span
class=
"d-flex"
>
<gl-icon
class=
"flex-shrink-0 gl-mr-2"
...
...
@@ -86,8 +76,8 @@ export default {
/>
{{
name
}}
</span>
</gl-d
eprecated-d
ropdown-item>
</gl-d
eprecated-d
ropdown>
</gl-dropdown-item>
</gl-dropdown>
<gl-button
v-gl-tooltip
:title=
"__('Sort direction')"
...
...
ee/spec/frontend/dependencies/components/__snapshots__/dependencies_actions_spec.js.snap
View file @
21d83a10
...
...
@@ -7,12 +7,22 @@ exports[`DependenciesActions component matches the snapshot 1`] = `
<div
class="btn-group flex-grow-1 mr-2"
>
<gl-deprecated-dropdown-stub
<gl-dropdown-stub
category="tertiary"
class="flex-grow-1 text-center"
headertext=""
right=""
size="medium"
text="Severity"
variant="default"
>
<gl-dropdown-item-stub
avatarurl=""
iconcolor=""
iconname=""
iconrightname=""
secondarytext=""
>
<gl-deprecated-dropdown-item-stub>
<span
class="d-flex"
>
...
...
@@ -25,8 +35,14 @@ exports[`DependenciesActions component matches the snapshot 1`] = `
Component name
</span>
</gl-deprecated-dropdown-item-stub>
<gl-deprecated-dropdown-item-stub>
</gl-dropdown-item-stub>
<gl-dropdown-item-stub
avatarurl=""
iconcolor=""
iconname=""
iconrightname=""
secondarytext=""
>
<span
class="d-flex"
>
...
...
@@ -39,8 +55,14 @@ exports[`DependenciesActions component matches the snapshot 1`] = `
Packager
</span>
</gl-deprecated-dropdown-item-stub>
<gl-deprecated-dropdown-item-stub>
</gl-dropdown-item-stub>
<gl-dropdown-item-stub
avatarurl=""
iconcolor=""
iconname=""
iconrightname=""
secondarytext=""
>
<span
class="d-flex"
>
...
...
@@ -53,8 +75,8 @@ exports[`DependenciesActions component matches the snapshot 1`] = `
Severity
</span>
</gl-d
eprecated-d
ropdown-item-stub>
</gl-d
eprecated-d
ropdown-stub>
</gl-dropdown-item-stub>
</gl-dropdown-stub>
<gl-button-stub
category="primary"
...
...
ee/spec/frontend/dependencies/components/dependencies_actions_spec.js
View file @
21d83a10
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
GlD
eprecatedD
ropdownItem
}
from
'
@gitlab/ui
'
;
import
{
GlDropdownItem
}
from
'
@gitlab/ui
'
;
import
{
TEST_HOST
}
from
'
helpers/test_constants
'
;
import
createStore
from
'
ee/dependencies/store
'
;
import
{
DEPENDENCY_LIST_TYPES
}
from
'
ee/dependencies/store/constants
'
;
...
...
@@ -39,7 +39,7 @@ describe('DependenciesActions component', () => {
});
it
(
'
dispatches the right setSortField action on clicking each item in the dropdown
'
,
()
=>
{
const
dropdownItems
=
wrapper
.
findAll
(
GlD
eprecatedD
ropdownItem
).
wrappers
;
const
dropdownItems
=
wrapper
.
findAll
(
GlDropdownItem
).
wrappers
;
dropdownItems
.
forEach
(
item
=>
{
// trigger() does not work on stubbed/shallow mounted components
...
...
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