Commit e4093c89 authored by Albert Salim's avatar Albert Salim

Add JSON file extension to fixtures

parent cdff3a38
......@@ -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);
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment