Commit 49feaa8c authored by Michael Lunøe's avatar Michael Lunøe Committed by Sean McGivern

Fix(Instance VSA): reinstate sidebar templates

When this MR merged:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/39368

It removed templates that are still in use on the
instance level Value Stream Analytics page.

This MR re-introduces those templates.

MR:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/39368

Issues:
https://gitlab.com/gitlab-org/gitlab/-/issues/233833
https://gitlab.com/gitlab-org/gitlab/-/issues/205909
https://gitlab.com/gitlab-org/gitlab/-/issues/224716
parent 27270f13
...@@ -4,7 +4,6 @@ namespace :analytics do ...@@ -4,7 +4,6 @@ namespace :analytics do
root to: redirect('admin/dev_ops_score') root to: redirect('admin/dev_ops_score')
constraints(-> (req) { Gitlab::Analytics.cycle_analytics_enabled? }) do constraints(-> (req) { Gitlab::Analytics.cycle_analytics_enabled? }) do
resource :cycle_analytics, only: :show, path: 'value_stream_analytics'
scope module: :cycle_analytics, as: 'cycle_analytics', path: 'value_stream_analytics' do scope module: :cycle_analytics, as: 'cycle_analytics', path: 'value_stream_analytics' do
resources :stages, only: [:index, :create, :update, :destroy] do resources :stages, only: [:index, :create, :update, :destroy] do
member do member do
......
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe Analytics::CycleAnalyticsController do
let(:user) { create(:user) }
before do
sign_in(user)
end
describe 'usage counter' do
it 'increments usage counter' do
expect(Gitlab::UsageDataCounters::CycleAnalyticsCounter).to receive(:count).with(:views)
get(:show)
expect(response).to be_successful
end
end
describe 'GET show' do
it 'renders `show` template' do
stub_feature_flags(Gitlab::Analytics::CYCLE_ANALYTICS_FEATURE_FLAG => true)
get :show
expect(response).to render_template :show
end
it 'renders `404` when feature flag is disabled' do
stub_feature_flags(Gitlab::Analytics::CYCLE_ANALYTICS_FEATURE_FLAG => false)
get :show
expect(response).to have_gitlab_http_status(:not_found)
end
end
end
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