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
diff options
context:
space:
mode:
Diffstat (limited to 'qa/qa/page/admin')
-rw-r--r--qa/qa/page/admin/menu.rb9
-rw-r--r--qa/qa/page/admin/settings/component/performance_bar.rb27
-rw-r--r--qa/qa/page/admin/settings/metrics_and_profiling.rb23
3 files changed, 59 insertions, 0 deletions
diff --git a/qa/qa/page/admin/menu.rb b/qa/qa/page/admin/menu.rb
index 25564f2dc6e..eea5717f5a7 100644
--- a/qa/qa/page/admin/menu.rb
+++ b/qa/qa/page/admin/menu.rb
@@ -10,6 +10,7 @@ module QA
element :admin_settings_item
element :admin_settings_repository_item
element :admin_settings_general_item
+ element :admin_settings_metrics_and_profiling_item
end
def go_to_repository_settings
@@ -28,6 +29,14 @@ module QA
end
end
+ def go_to_metrics_and_profiling_settings
+ hover_settings do
+ within_submenu do
+ click_element :admin_settings_metrics_and_profiling_item
+ end
+ end
+ end
+
private
def hover_settings
diff --git a/qa/qa/page/admin/settings/component/performance_bar.rb b/qa/qa/page/admin/settings/component/performance_bar.rb
new file mode 100644
index 00000000000..bc29efb64c0
--- /dev/null
+++ b/qa/qa/page/admin/settings/component/performance_bar.rb
@@ -0,0 +1,27 @@
+# frozen_string_literal: true
+
+module QA
+ module Page
+ module Admin
+ module Settings
+ module Component
+ class PerformanceBar < Page::Base
+ view 'app/views/admin/application_settings/_performance_bar.html.haml' do
+ element :enable_performance_bar_checkbox
+ element :save_changes_button
+ end
+
+ def enable_performance_bar
+ click_element :enable_performance_bar_checkbox
+ Capybara.current_session.driver.browser.manage.add_cookie(name: 'perf_bar_enabled', value: 'true')
+ end
+
+ def save_settings
+ click_element :save_changes_button
+ end
+ end
+ end
+ end
+ end
+ end
+end
diff --git a/qa/qa/page/admin/settings/metrics_and_profiling.rb b/qa/qa/page/admin/settings/metrics_and_profiling.rb
new file mode 100644
index 00000000000..e10a92d7a54
--- /dev/null
+++ b/qa/qa/page/admin/settings/metrics_and_profiling.rb
@@ -0,0 +1,23 @@
+# frozen_string_literal: true
+
+module QA
+ module Page
+ module Admin
+ module Settings
+ class MetricsAndProfiling < Page::Base
+ include QA::Page::Settings::Common
+
+ view 'app/views/admin/application_settings/metrics_and_profiling.html.haml' do
+ element :performance_bar_settings
+ end
+
+ def expand_performance_bar(&block)
+ expand_section(:performance_bar_settings) do
+ Component::PerformanceBar.perform(&block)
+ end
+ end
+ end
+ end
+ end
+ end
+end