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
e4093c89
Commit
e4093c89
authored
Oct 18, 2021
by
Albert Salim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add JSON file extension to fixtures
parent
cdff3a38
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
spec/frontend/cycle_analytics/mock_data.js
spec/frontend/cycle_analytics/mock_data.js
+4
-3
spec/frontend/fixtures/analytics.rb
spec/frontend/fixtures/analytics.rb
+3
-3
No files found.
spec/frontend/cycle_analytics/mock_data.js
View file @
e4093c89
...
...
@@ -21,9 +21,10 @@ export const getStageByTitle = (stages, title) =>
stages
.
find
((
stage
)
=>
stage
.
title
&&
stage
.
title
.
toLowerCase
().
trim
()
===
title
)
||
{};
const
fixtureEndpoints
=
{
customizableCycleAnalyticsStagesAndEvents
:
'
projects/analytics/value_stream_analytics/stages
'
,
stageEvents
:
(
stage
)
=>
`projects/analytics/value_stream_analytics/events/
${
stage
}
`
,
metricsData
:
'
projects/analytics/value_stream_analytics/summary
'
,
customizableCycleAnalyticsStagesAndEvents
:
'
projects/analytics/value_stream_analytics/stages.json
'
,
stageEvents
:
(
stage
)
=>
`projects/analytics/value_stream_analytics/events/
${
stage
}
.json`
,
metricsData
:
'
projects/analytics/value_stream_analytics/summary.json
'
,
};
export
const
metricsData
=
getJSONFixture
(
fixtureEndpoints
.
metricsData
);
...
...
spec/frontend/fixtures/analytics.rb
View file @
e4093c89
...
...
@@ -22,7 +22,7 @@ RSpec.describe 'Analytics (JavaScript fixtures)', :sidekiq_inline do
sign_in
(
user
)
end
it
'projects/analytics/value_stream_analytics/stages'
do
it
'projects/analytics/value_stream_analytics/stages
.json
'
do
get
(
:index
,
params:
params
,
format: :json
)
expect
(
response
).
to
be_successful
...
...
@@ -40,7 +40,7 @@ RSpec.describe 'Analytics (JavaScript fixtures)', :sidekiq_inline do
end
Gitlab
::
Analytics
::
CycleAnalytics
::
DefaultStages
.
all
.
each
do
|
stage
|
it
"projects/analytics/value_stream_analytics/events/
#{
stage
[
:name
]
}
"
do
it
"projects/analytics/value_stream_analytics/events/
#{
stage
[
:name
]
}
.json
"
do
get
(
stage
[
:name
],
params:
params
,
format: :json
)
expect
(
response
).
to
be_successful
...
...
@@ -58,7 +58,7 @@ RSpec.describe 'Analytics (JavaScript fixtures)', :sidekiq_inline do
sign_in
(
user
)
end
it
"projects/analytics/value_stream_analytics/summary"
do
it
"projects/analytics/value_stream_analytics/summary
.json
"
do
get
(
:show
,
params:
params
,
format: :json
)
expect
(
response
).
to
be_successful
...
...
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