Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-11 09:07:45 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-11 09:07:45 +0300
commitbac547dc784170c7d0e6a5ae14d0ff5d549c31ee (patch)
tree058a42678ff6f979a45c150c1be23974bce07443 /qa
parent7873bb3c1a2870761c243ea4ebe96f249ad5a319 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa')
-rw-r--r--qa/qa/page/layout/performance_bar.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/non_devops/performance_bar_spec.rb45
2 files changed, 26 insertions, 21 deletions
diff --git a/qa/qa/page/layout/performance_bar.rb b/qa/qa/page/layout/performance_bar.rb
index b35c37fdc34..4e144e67f12 100644
--- a/qa/qa/page/layout/performance_bar.rb
+++ b/qa/qa/page/layout/performance_bar.rb
@@ -21,7 +21,7 @@ module QA
has_element?(:performance_bar)
end
- def has_detailed_metrics?
+ def has_detailed_metrics?(count)
retry_until(sleep_interval: 1) do
all_elements(:detailed_metric_content, count: count).all? do |metric|
metric.has_text?(%r{\d+})
diff --git a/qa/qa/specs/features/browser_ui/non_devops/performance_bar_spec.rb b/qa/qa/specs/features/browser_ui/non_devops/performance_bar_spec.rb
index d78ad6d86d3..a74aa32fabc 100644
--- a/qa/qa/specs/features/browser_ui/non_devops/performance_bar_spec.rb
+++ b/qa/qa/specs/features/browser_ui/non_devops/performance_bar_spec.rb
@@ -1,31 +1,36 @@
# frozen_string_literal: true
module QA
- context 'Performance bar' do
- context 'when logged in as an admin user', :requires_admin, quarantine: 'https://gitlab.com/gitlab-org/gitlab/issues/196141' do
- 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)
+ context 'Non-devops' do
+ describe 'Performance bar display', :requires_admin, quarantine: 'https://gitlab.com/gitlab-org/gitlab/issues/196141' do
+ context 'when logged in as an admin user' do
+ # 4 metrics: pg, gitaly, redis, total
+ let(:metrics_count) { 4 }
- Page::Admin::Settings::MetricsAndProfiling.perform do |setting|
- setting.expand_performance_bar do |page|
- page.enable_performance_bar
- page.save_settings
+ 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
- end
- it 'shows results for the original request and AJAX requests' do
- # Issue pages always make AJAX requests
- Resource::Issue.fabricate_via_browser_ui! do |issue|
- issue.title = 'Performance bar test'
- end
+ it 'shows results for the original request and AJAX requests' 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(4)
- expect(bar_component).to have_request_for('realtime_changes') # Always requested on issue pages
+ Page::Layout::PerformanceBar.perform do |bar_component|
+ expect(bar_component).to have_performance_bar
+ expect(bar_component).to have_detailed_metrics(metrics_count)
+ expect(bar_component).to have_request_for('realtime_changes') # Always requested on issue pages
+ end
end
end
end