Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
Gitlab-External-Templates
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Adri
Gitlab-External-Templates
Commits
dcbdabbd
Unverified
Commit
dcbdabbd
authored
3 years ago
by
Ezekiel Kigbo
Browse files
Options
Downloads
Patches
Plain Diff
Specify created_at date for VSA stage event
parent
019f4ab6
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ee/spec/features/groups/analytics/cycle_analytics/filters_and_data_spec.rb
+3
-14
3 additions, 14 deletions
...groups/analytics/cycle_analytics/filters_and_data_spec.rb
spec/support/helpers/cycle_analytics_helpers.rb
+3
-2
3 additions, 2 deletions
spec/support/helpers/cycle_analytics_helpers.rb
with
6 additions
and
16 deletions
ee/spec/features/groups/analytics/cycle_analytics/filters_and_data_spec.rb
+
3
−
14
View file @
dcbdabbd
...
...
@@ -15,7 +15,7 @@
let_it_be
(
:custom_value_stream_name
)
{
"First custom value stream"
}
let
(
:milestone
)
{
create
(
:milestone
,
project:
project
)
}
let
(
:mr
)
{
create_merge_request_closing_issue
(
user
,
project
,
issue
,
commit_message:
"References
#{
issue
.
to_reference
}
"
)
}
let
(
:mr
)
{
create_merge_request_closing_issue
(
user
,
project
,
issue
,
commit_message:
"References
#{
issue
.
to_reference
}
"
,
created_at:
2
.
days
.
ago
)
}
let
(
:pipeline
)
{
create
(
:ci_empty_pipeline
,
status:
'created'
,
project:
project
,
ref:
mr
.
source_branch
,
sha:
mr
.
source_branch_sha
,
head_pipeline_of:
mr
)
}
let
(
:path_nav_selector
)
{
'[data-testid="vsa-path-navigation"]'
}
...
...
@@ -37,19 +37,6 @@ def select_stage(name)
wait_for_requests
end
def
create_merge_request
(
id
,
extra_params
=
{})
params
=
{
id:
id
,
target_branch:
'master'
,
source_project:
project2
,
source_branch:
"feature-branch-
#{
id
}
"
,
title:
"mr name
#{
id
}
"
,
created_at:
2
.
days
.
ago
}.
merge
(
extra_params
)
create
(
:merge_request
,
params
)
end
before
do
stub_licensed_features
(
cycle_analytics_for_groups:
true
,
type_of_work_analytics:
true
,
dora4_analytics:
true
)
...
...
@@ -318,6 +305,8 @@ def vsa_stages(selected_group)
expect
(
page
).
not_to
have_selector
(
'[data-testid="vsa-stage-event"]'
)
end
binding
.
pry
stages_with_data
.
each
do
|
stage
|
select_stage
(
stage
[
:title
])
expect
(
page
).
to
have_selector
(
'[data-testid="vsa-stage-table"]'
)
...
...
This diff is collapsed.
Click to expand it.
spec/support/helpers/cycle_analytics_helpers.rb
+
3
−
2
View file @
dcbdabbd
...
...
@@ -165,7 +165,7 @@ def create_cycle(user, project, issue, mr, milestone, pipeline)
ci_build
end
def
create_merge_request_closing_issue
(
user
,
project
,
issue
,
message:
nil
,
source_branch:
nil
,
commit_message:
'commit message'
)
def
create_merge_request_closing_issue
(
user
,
project
,
issue
,
message:
nil
,
source_branch:
nil
,
commit_message:
'commit message'
,
created_at:
nil
)
if
!
source_branch
||
project
.
repository
.
commit
(
source_branch
).
blank?
source_branch
=
generate
(
:branch
)
project
.
repository
.
add_branch
(
user
,
source_branch
,
'master'
)
...
...
@@ -181,7 +181,8 @@ def create_merge_request_closing_issue(user, project, issue, message: nil, sourc
title:
'Awesome merge_request'
,
description:
message
||
"Fixes
#{
issue
.
to_reference
}
"
,
source_branch:
source_branch
,
target_branch:
'master'
target_branch:
'master'
,
created_at:
created_at
||
Time
.
now
+
1
.
second
}
mr
=
MergeRequests
::
CreateService
.
new
(
project:
project
,
current_user:
user
,
params:
opts
).
execute
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment