blob: 867c54102ae31dce7f94a74fb59f7819cdf4863c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
# frozen_string_literal: true
module QA
RSpec.describe 'Analytics' do
describe 'Performance bar display', :requires_admin, :skip_live_env do
context 'when logged in as an admin user' do
# performance metrics: pg, gitaly, redis, rugged (feature flagged), total (not always provided)
let(:minimum_metrics_count) { 3 }
before do
Flow::Login.sign_in_as_admin
Page::Main::Menu.perform(&:go_to_admin_area)
Page::Admin::Menu.perform(&:go_to_metrics_and_profiling_settings)
Page::Admin::Settings::MetricsAndProfiling.perform do |setting|
setting.expand_performance_bar do |page|
page.enable_performance_bar
page.save_settings
end
end
end
it(
'shows results for the original request and AJAX requests',
testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/348030'
) do
# Issue pages always make AJAX requests
Resource::Issue.fabricate_via_browser_ui! do |issue|
issue.title = 'Performance bar test'
end
Page::Layout::PerformanceBar.perform do |bar_component|
expect(bar_component).to have_performance_bar
expect(bar_component).to have_detailed_metrics(minimum_metrics_count)
expect(bar_component).to have_request_for('realtime_changes') # Always requested on issue pages
end
end
end
end
end
end
|