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>2021-11-25 18:09:54 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-11-25 18:09:54 +0300
commitd03aeb1110374d140a42622716597ccfa8e4ba57 (patch)
tree2f915a4c8935af179cb81c646a8e4a3f65c78c0d /qa
parent85a825bbbfe51615f447d632a5f53c297ec1b33a (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa')
-rw-r--r--qa/qa/flow/settings.rb25
-rw-r--r--qa/qa/page/admin/settings/component/snowplow.rb49
2 files changed, 74 insertions, 0 deletions
diff --git a/qa/qa/flow/settings.rb b/qa/qa/flow/settings.rb
new file mode 100644
index 00000000000..775b7686c10
--- /dev/null
+++ b/qa/qa/flow/settings.rb
@@ -0,0 +1,25 @@
+# frozen_string_literal: true
+
+module QA
+ module Flow
+ module Settings
+ module_function
+
+ def disable_snowplow
+ Flow::Login.while_signed_in_as_admin do
+ QA::Page::Main::Menu.perform(&:go_to_admin_area)
+ QA::Page::Admin::Menu.perform(&:go_to_general_settings)
+ QA::Page::Admin::Settings::Component::Snowplow.perform(&:disable_snowplow_tracking)
+ end
+ end
+
+ def enable_snowplow
+ Flow::Login.while_signed_in_as_admin do
+ QA::Page::Main::Menu.perform(&:go_to_admin_area)
+ QA::Page::Admin::Menu.perform(&:go_to_general_settings)
+ QA::Page::Admin::Settings::Component::Snowplow.perform(&:enable_snowplow_tracking)
+ end
+ end
+ end
+ end
+end
diff --git a/qa/qa/page/admin/settings/component/snowplow.rb b/qa/qa/page/admin/settings/component/snowplow.rb
new file mode 100644
index 00000000000..e05679feac3
--- /dev/null
+++ b/qa/qa/page/admin/settings/component/snowplow.rb
@@ -0,0 +1,49 @@
+# frozen_string_literal: true
+
+module QA
+ module Page
+ module Admin
+ module Settings
+ module Component
+ class Snowplow < Page::Base
+ include QA::Page::Settings::Common
+
+ view 'app/views/admin/application_settings/_snowplow.html.haml' do
+ element :snowplow_settings_content
+ element :snowplow_enabled_checkbox
+ element :save_changes_button
+ end
+
+ def enable_snowplow_tracking
+ expand_content(:snowplow_settings_content) do
+ check_snowplow_enabled_checkbox
+ click_save_changes_button
+ end
+ end
+
+ def disable_snowplow_tracking
+ expand_content(:snowplow_settings_content) do
+ uncheck_snowplow_enabled_checkbox
+ click_save_changes_button
+ end
+ end
+
+ private
+
+ def check_snowplow_enabled_checkbox
+ check_element(:snowplow_enabled_checkbox)
+ end
+
+ def uncheck_snowplow_enabled_checkbox
+ uncheck_element(:snowplow_enabled_checkbox)
+ end
+
+ def click_save_changes_button
+ click_element :save_changes_button
+ end
+ end
+ end
+ end
+ end
+ end
+end