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
d5364c3c
Commit
d5364c3c
authored
Dec 22, 2020
by
Fernando
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrate dropdown to gl-dropdown for fuzzing artifacts
* Udpate unit tests
parent
cbe15fff
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
11 deletions
+8
-11
ee/app/assets/javascripts/security_dashboard/components/fuzzing_artifacts_download.vue
...urity_dashboard/components/fuzzing_artifacts_download.vue
+5
-8
ee/spec/frontend/security_dashboard/components/fuzzing_artifacts_download_spec.js
...y_dashboard/components/fuzzing_artifacts_download_spec.js
+3
-3
No files found.
ee/app/assets/javascripts/security_dashboard/components/fuzzing_artifacts_download.vue
View file @
d5364c3c
<
script
>
import
{
GlButton
,
GlDropdown
,
GlD
eprecatedD
ropdownItem
}
from
'
@gitlab/ui
'
;
import
{
GlButton
,
GlDropdown
,
GlDropdownItem
}
from
'
@gitlab/ui
'
;
import
{
s__
}
from
'
~/locale
'
;
export
default
{
...
...
@@ -9,7 +9,7 @@ export default {
components
:
{
GlButton
,
GlDropdown
,
GlD
eprecatedD
ropdownItem
,
GlDropdownItem
,
},
props
:
{
jobs
:
{
...
...
@@ -46,12 +46,9 @@ export default {
category=
"secondary"
size=
"small"
>
<gl-deprecated-dropdown-item
v-for=
"job in jobs"
:key=
"job.id"
:href=
"artifactDownloadUrl(job)"
>
{{
job
.
name
}}
</gl-deprecated-dropdown-item
>
<gl-dropdown-item
v-for=
"job in jobs"
:key=
"job.id"
:href=
"artifactDownloadUrl(job)"
>
{{
job
.
name
}}
</gl-dropdown-item>
</gl-dropdown>
<gl-button
v-else
...
...
ee/spec/frontend/security_dashboard/components/fuzzing_artifacts_download_spec.js
View file @
d5364c3c
import
{
GlButton
,
GlDropdown
,
GlD
eprecatedD
ropdownItem
}
from
'
@gitlab/ui
'
;
import
{
GlButton
,
GlDropdown
,
GlDropdownItem
}
from
'
@gitlab/ui
'
;
import
{
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
Vuex
from
'
vuex
'
;
import
FuzzingArtifactsDownload
from
'
ee/security_dashboard/components/fuzzing_artifacts_download.vue
'
;
...
...
@@ -60,11 +60,11 @@ describe('Filter component', () => {
it
(
'
should render a dropdown button with several items
'
,
()
=>
{
expect
(
wrapper
.
find
(
GlButton
).
exists
()).
toBe
(
false
);
expect
(
wrapper
.
find
(
GlDropdown
).
exists
()).
toBe
(
true
);
expect
(
wrapper
.
findAll
(
GlD
eprecatedD
ropdownItem
).
length
).
toBe
(
2
);
expect
(
wrapper
.
findAll
(
GlDropdownItem
).
length
).
toBe
(
2
);
});
it
(
'
should render with href set to the correct filepath for every element
'
,
()
=>
{
const
wrapperArray
=
wrapper
.
findAll
(
GlD
eprecatedD
ropdownItem
);
const
wrapperArray
=
wrapper
.
findAll
(
GlDropdownItem
);
wrapperArray
.
wrappers
.
forEach
((
_
,
index
)
=>
{
const
href
=
`/api/v4/projects/
${
projectId
}
/jobs/artifacts/
${
jobs
[
index
].
ref
...
...
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