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
1a12d008
Commit
1a12d008
authored
Sep 02, 2020
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab master
parents
d211e77f
6dbe3e63
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
46 additions
and
8 deletions
+46
-8
ee/app/assets/javascripts/analytics/cycle_analytics/components/stage_table_nav.vue
.../analytics/cycle_analytics/components/stage_table_nav.vue
+1
-1
ee/app/assets/javascripts/analytics/cycle_analytics/constants.js
...assets/javascripts/analytics/cycle_analytics/constants.js
+1
-0
ee/app/finders/security/pipeline_vulnerabilities_finder.rb
ee/app/finders/security/pipeline_vulnerabilities_finder.rb
+4
-4
ee/spec/frontend/analytics/cycle_analytics/components/base_spec.js
...rontend/analytics/cycle_analytics/components/base_spec.js
+28
-0
ee/spec/frontend/analytics/cycle_analytics/components/stage_table_nav_spec.js
...lytics/cycle_analytics/components/stage_table_nav_spec.js
+12
-3
No files found.
ee/app/assets/javascripts/analytics/cycle_analytics/components/stage_table_nav.vue
View file @
1a12d008
...
@@ -102,7 +102,7 @@ export default {
...
@@ -102,7 +102,7 @@ export default {
<add-stage-button
<add-stage-button
:class=
"$options.noDragClass"
:class=
"$options.noDragClass"
:active=
"isCreatingCustomStage"
:active=
"isCreatingCustomStage"
@
showform=
"$emit(
'show-add-stage-form'
)"
@
showform=
"$emit(
$options.STAGE_ACTIONS.ADD_STAGE
)"
/>
/>
</ul>
</ul>
</
template
>
</
template
>
ee/app/assets/javascripts/analytics/cycle_analytics/constants.js
View file @
1a12d008
...
@@ -56,6 +56,7 @@ export const STAGE_ACTIONS = {
...
@@ -56,6 +56,7 @@ export const STAGE_ACTIONS = {
HIDE
:
'
hideStage
'
,
HIDE
:
'
hideStage
'
,
CREATE
:
'
createStage
'
,
CREATE
:
'
createStage
'
,
UPDATE
:
'
updateStage
'
,
UPDATE
:
'
updateStage
'
,
ADD_STAGE
:
'
showAddStageForm
'
,
};
};
export
const
STAGE_NAME
=
{
export
const
STAGE_NAME
=
{
...
...
ee/app/finders/security/pipeline_vulnerabilities_finder.rb
View file @
1a12d008
...
@@ -113,10 +113,10 @@ module Security
...
@@ -113,10 +113,10 @@ module Security
def
dismissal_feedback_by_fingerprint
def
dismissal_feedback_by_fingerprint
strong_memoize
(
:dismissal_feedback_by_fingerprint
)
do
strong_memoize
(
:dismissal_feedback_by_fingerprint
)
do
pipeline
.
project
.
vulnerability_feedback
pipeline
.
project
.
with_associations
.
vulnerability_feedback
.
where
(
feedback_type:
'dismissal'
)
# rubocop:disable CodeReuse/ActiveRecord
.
for_dismissal
.
group_by
(
&
:project_fingerprint
)
.
group_by
(
&
:project_fingerprint
)
end
end
end
end
...
...
ee/spec/frontend/analytics/cycle_analytics/components/base_spec.js
View file @
1a12d008
...
@@ -13,6 +13,7 @@ import StageTable from 'ee/analytics/cycle_analytics/components/stage_table.vue'
...
@@ -13,6 +13,7 @@ import StageTable from 'ee/analytics/cycle_analytics/components/stage_table.vue'
import
StageTableNav
from
'
ee/analytics/cycle_analytics/components/stage_table_nav.vue
'
;
import
StageTableNav
from
'
ee/analytics/cycle_analytics/components/stage_table_nav.vue
'
;
import
StageNavItem
from
'
ee/analytics/cycle_analytics/components/stage_nav_item.vue
'
;
import
StageNavItem
from
'
ee/analytics/cycle_analytics/components/stage_nav_item.vue
'
;
import
AddStageButton
from
'
ee/analytics/cycle_analytics/components/add_stage_button.vue
'
;
import
AddStageButton
from
'
ee/analytics/cycle_analytics/components/add_stage_button.vue
'
;
import
CustomStageForm
from
'
ee/analytics/cycle_analytics/components/custom_stage_form.vue
'
;
import
FilterBar
from
'
ee/analytics/cycle_analytics/components/filter_bar.vue
'
;
import
FilterBar
from
'
ee/analytics/cycle_analytics/components/filter_bar.vue
'
;
import
DurationChart
from
'
ee/analytics/cycle_analytics/components/duration_chart.vue
'
;
import
DurationChart
from
'
ee/analytics/cycle_analytics/components/duration_chart.vue
'
;
import
Daterange
from
'
ee/analytics/shared/components/daterange.vue
'
;
import
Daterange
from
'
ee/analytics/shared/components/daterange.vue
'
;
...
@@ -137,6 +138,8 @@ describe('Cycle Analytics component', () => {
...
@@ -137,6 +138,8 @@ describe('Cycle Analytics component', () => {
.
findAll
(
StageNavItem
)
.
findAll
(
StageNavItem
)
.
at
(
index
);
.
at
(
index
);
const
findAddStageButton
=
()
=>
wrapper
.
find
(
AddStageButton
);
const
displaysProjectsDropdownFilter
=
flag
=>
{
const
displaysProjectsDropdownFilter
=
flag
=>
{
expect
(
wrapper
.
find
(
ProjectsDropdownFilter
).
exists
()).
toBe
(
flag
);
expect
(
wrapper
.
find
(
ProjectsDropdownFilter
).
exists
()).
toBe
(
flag
);
};
};
...
@@ -429,6 +432,31 @@ describe('Cycle Analytics component', () => {
...
@@ -429,6 +432,31 @@ describe('Cycle Analytics component', () => {
expect
(
first
.
props
(
'
isActive
'
)).
toBe
(
false
);
expect
(
first
.
props
(
'
isActive
'
)).
toBe
(
false
);
});
});
});
});
describe
(
'
Add stage button
'
,
()
=>
{
beforeEach
(()
=>
{
wrapper
=
createComponent
({
opts
:
{
stubs
:
{
StageTable
,
StageTableNav
,
AddStageButton
,
},
},
withStageSelected
:
true
,
});
});
it
(
'
can navigate to the custom stage form
'
,
()
=>
{
expect
(
wrapper
.
find
(
CustomStageForm
).
exists
()).
toBe
(
false
);
findAddStageButton
().
trigger
(
'
click
'
);
return
wrapper
.
vm
.
$nextTick
().
then
(()
=>
{
expect
(
wrapper
.
find
(
CustomStageForm
).
exists
()).
toBe
(
true
);
});
});
});
});
});
});
});
...
...
ee/spec/frontend/analytics/cycle_analytics/components/stage_table_nav_spec.js
View file @
1a12d008
...
@@ -60,9 +60,18 @@ describe('StageTableNav', () => {
...
@@ -60,9 +60,18 @@ describe('StageTableNav', () => {
});
});
});
});
it
(
'
will render the add a stage button
'
,
()
=>
{
describe
(
'
Add stage button
'
,
()
=>
{
wrapper
=
createComponent
();
it
(
'
will render
'
,
()
=>
{
expect
(
wrapper
.
find
(
AddStageButton
).
exists
()).
toBe
(
true
);
wrapper
=
createComponent
();
expect
(
wrapper
.
find
(
AddStageButton
).
exists
()).
toBe
(
true
);
});
it
(
'
will emit showAddStageForm action when clicked
'
,
()
=>
{
wrapper
=
createComponent
({
mountFn
:
mount
});
wrapper
.
find
(
AddStageButton
).
trigger
(
'
click
'
);
expect
(
wrapper
.
emitted
(
'
showAddStageForm
'
)).
toHaveLength
(
1
);
});
});
});
describe
.
each
`
describe
.
each
`
...
...
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