Commit d3500998 authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre

Merge branch 'fix-no-stats-in-vsa' into 'master'

Eliminate no_stats in value stream analytics

See merge request gitlab-org/gitlab!49936
parents dbae9d73 334b8c0b
......@@ -17,8 +17,6 @@ class Projects::CycleAnalyticsController < Projects::ApplicationController
def show
@cycle_analytics = ::CycleAnalytics::ProjectLevel.new(@project, options: options(cycle_analytics_project_params))
@cycle_analytics_no_data = @cycle_analytics.no_stats?
respond_to do |format|
format.html do
Gitlab::UsageDataCounters::CycleAnalyticsCounter.count(:views)
......
......@@ -59,10 +59,6 @@ module CycleAnalytics
end
end
def no_stats?
stats.all? { |hash| hash[:value].nil? }
end
def [](stage_name)
if Feature.enabled?(:new_project_level_vsa_backend, resource_parent)
StageAdapter.new(build_stage(stage_name), options)
......
......@@ -2,13 +2,6 @@
- add_page_specific_style 'page_bundles/cycle_analytics'
#cycle-analytics{ "v-cloak" => "true", data: { request_path: project_cycle_analytics_path(@project) } }
- if @cycle_analytics_no_data
%banner{ "v-if" => "!isOverviewDialogDismissed",
"documentation-link": help_page_path('user/analytics/value_stream_analytics.md'),
"v-on:dismiss-overview-dialog" => "dismissOverviewDialog()" }
.mb-3
%h3
= _("Value Stream Analytics")
%gl-loading-icon{ "v-show" => "isLoading", "size" => "lg" }
.wrapper{ "v-show" => "!isLoading && !hasError" }
.card
......
---
title: Remove initial data check on project level value stream page
merge_request: 49936
author:
type: performance
......@@ -30,17 +30,6 @@ RSpec.describe Analytics::CycleAnalytics::GroupLevel do
end
end
describe '#stats' do
before do
create_cycle(user, project, issue, mr, milestone, pipeline)
deploy_master(user, project)
end
it 'returns medians for each stage for a specific group' do
expect(subject.no_stats?).to eq(false)
end
end
describe '#summary' do
before do
create_cycle(user, project, issue, mr, milestone, pipeline)
......
......@@ -32,41 +32,5 @@ RSpec.describe Projects::CycleAnalyticsController do
end
end
describe 'value stream analytics not set up flag' do
context 'with no data' do
it 'is true' do
get(:show,
params: {
namespace_id: project.namespace,
project_id: project
})
expect(response).to be_successful
expect(assigns(:cycle_analytics_no_data)).to eq(true)
end
end
context 'with data' do
before do
issue = create(:issue, project: project, created_at: 4.days.ago)
milestone = create(:milestone, project: project, created_at: 5.days.ago)
issue.update(milestone: milestone)
create_merge_request_closing_issue(user, project, issue)
end
it 'is false' do
get(:show,
params: {
namespace_id: project.namespace,
project_id: project
})
expect(response).to be_successful
expect(assigns(:cycle_analytics_no_data)).to eq(false)
end
end
end
include_examples GracefulTimeoutHandling
end
......@@ -24,10 +24,6 @@ RSpec.describe 'Value Stream Analytics', :js do
wait_for_requests
end
it 'shows introductory message' do
expect(page).to have_content('Introducing Value Stream Analytics')
end
it 'shows pipeline summary' do
expect(new_issues_counter).to have_content('-')
expect(commits_counter).to have_content('-')
......
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