summaryrefslogtreecommitdiff
path: root/qa/qa/page/project/settings
diff options
context:
space:
mode:
Diffstat (limited to 'qa/qa/page/project/settings')
-rw-r--r--qa/qa/page/project/settings/advanced.rb4
-rw-r--r--qa/qa/page/project/settings/ci_cd.rb9
-rw-r--r--qa/qa/page/project/settings/ci_variables.rb2
-rw-r--r--qa/qa/page/project/settings/common.rb13
-rw-r--r--qa/qa/page/project/settings/deploy_keys.rb2
-rw-r--r--qa/qa/page/project/settings/general_pipelines.rb23
-rw-r--r--qa/qa/page/project/settings/incidents.rb37
-rw-r--r--qa/qa/page/project/settings/integrations.rb19
-rw-r--r--qa/qa/page/project/settings/main.rb2
-rw-r--r--qa/qa/page/project/settings/merge_request.rb2
-rw-r--r--qa/qa/page/project/settings/operations.rb23
-rw-r--r--qa/qa/page/project/settings/repository.rb4
-rw-r--r--qa/qa/page/project/settings/services/prometheus.rb36
13 files changed, 156 insertions, 20 deletions
diff --git a/qa/qa/page/project/settings/advanced.rb b/qa/qa/page/project/settings/advanced.rb
index c95c47fa560..3bb5181a31c 100644
--- a/qa/qa/page/project/settings/advanced.rb
+++ b/qa/qa/page/project/settings/advanced.rb
@@ -57,6 +57,10 @@ module QA
click_element :download_export_link
end
+ def has_download_export_link?
+ has_element? :download_export_link
+ end
+
def archive_project
page.accept_alert("Are you sure that you want to archive this project?") do
click_element :archive_project_link
diff --git a/qa/qa/page/project/settings/ci_cd.rb b/qa/qa/page/project/settings/ci_cd.rb
index 46f93fad61e..aa27c030b78 100644
--- a/qa/qa/page/project/settings/ci_cd.rb
+++ b/qa/qa/page/project/settings/ci_cd.rb
@@ -5,12 +5,19 @@ module QA
module Project
module Settings
class CICD < Page::Base
- include Common
+ include QA::Page::Settings::Common
view 'app/views/projects/settings/ci_cd/show.html.haml' do
element :autodevops_settings_content
element :runners_settings_content
element :variables_settings_content
+ element :general_pipelines_settings_content
+ end
+
+ def expand_general_pipelines(&block)
+ expand_section(:general_pipelines_settings_content) do
+ Settings::GeneralPipelines.perform(&block)
+ end
end
def expand_runners_settings(&block)
diff --git a/qa/qa/page/project/settings/ci_variables.rb b/qa/qa/page/project/settings/ci_variables.rb
index 6cdf40cd1da..de268b14aa2 100644
--- a/qa/qa/page/project/settings/ci_variables.rb
+++ b/qa/qa/page/project/settings/ci_variables.rb
@@ -5,7 +5,7 @@ module QA
module Project
module Settings
class CiVariables < Page::Base
- include Common
+ include QA::Page::Settings::Common
view 'app/assets/javascripts/ci_variable_list/components/ci_variable_modal.vue' do
element :ci_variable_key_field
diff --git a/qa/qa/page/project/settings/common.rb b/qa/qa/page/project/settings/common.rb
deleted file mode 100644
index f5f22623060..00000000000
--- a/qa/qa/page/project/settings/common.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-module QA
- module Page
- module Project
- module Settings
- module Common
- include QA::Page::Settings::Common
- end
- end
- end
- end
-end
diff --git a/qa/qa/page/project/settings/deploy_keys.rb b/qa/qa/page/project/settings/deploy_keys.rb
index c330d090ce6..8d655b0684e 100644
--- a/qa/qa/page/project/settings/deploy_keys.rb
+++ b/qa/qa/page/project/settings/deploy_keys.rb
@@ -5,7 +5,7 @@ module QA
module Project
module Settings
class DeployKeys < Page::Base
- view 'app/views/projects/deploy_keys/_form.html.haml' do
+ view 'app/views/shared/deploy_keys/_form.html.haml' do
element :deploy_key_title, 'text_field :title' # rubocop:disable QA/ElementWithPattern
element :deploy_key_key, 'text_area :key' # rubocop:disable QA/ElementWithPattern
end
diff --git a/qa/qa/page/project/settings/general_pipelines.rb b/qa/qa/page/project/settings/general_pipelines.rb
new file mode 100644
index 00000000000..5a98849a41d
--- /dev/null
+++ b/qa/qa/page/project/settings/general_pipelines.rb
@@ -0,0 +1,23 @@
+# frozen_string_literal: true
+
+module QA
+ module Page
+ module Project
+ module Settings
+ class GeneralPipelines < Page::Base
+ include QA::Page::Settings::Common
+
+ view 'app/views/projects/settings/ci_cd/_form.html.haml' do
+ element :build_coverage_regex_field
+ element :save_general_pipelines_changes_button
+ end
+
+ def configure_coverage_regex(pattern)
+ fill_element :build_coverage_regex_field, pattern
+ click_element :save_general_pipelines_changes_button
+ end
+ end
+ end
+ end
+ end
+end
diff --git a/qa/qa/page/project/settings/incidents.rb b/qa/qa/page/project/settings/incidents.rb
new file mode 100644
index 00000000000..94d5fc369ad
--- /dev/null
+++ b/qa/qa/page/project/settings/incidents.rb
@@ -0,0 +1,37 @@
+# frozen_string_literal: true
+
+module QA
+ module Page
+ module Project
+ module Settings
+ class Incidents < Page::Base
+ view 'app/views/projects/settings/operations/_incidents.html.haml' do
+ element :create_issue_checkbox
+ element :incident_templates_dropdown
+ element :save_changes_button
+ end
+
+ def enable_issues_for_incidents
+ check_element :create_issue_checkbox
+ end
+
+ def select_issue_template(template)
+ within_element :incident_templates_dropdown do
+ find(:option, template).select_option
+ end
+ end
+
+ def save_incident_settings
+ click_element :save_changes_button
+ end
+
+ def has_template?(template)
+ within_element :incident_templates_dropdown do
+ has_text?(template)
+ end
+ end
+ end
+ end
+ end
+ end
+end
diff --git a/qa/qa/page/project/settings/integrations.rb b/qa/qa/page/project/settings/integrations.rb
new file mode 100644
index 00000000000..436a42fb093
--- /dev/null
+++ b/qa/qa/page/project/settings/integrations.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+module QA
+ module Page
+ module Project
+ module Settings
+ class Integrations < QA::Page::Base
+ view 'app/views/shared/integrations/_index.html.haml' do
+ element :prometheus_link, '{ data: { qa_selector: "#{integration.to_param' # rubocop:disable QA/ElementWithPattern
+ end
+
+ def click_on_prometheus_integration
+ click_element :prometheus_link
+ end
+ end
+ end
+ end
+ end
+end
diff --git a/qa/qa/page/project/settings/main.rb b/qa/qa/page/project/settings/main.rb
index 18d55598d90..efae497b6ba 100644
--- a/qa/qa/page/project/settings/main.rb
+++ b/qa/qa/page/project/settings/main.rb
@@ -5,7 +5,7 @@ module QA
module Project
module Settings
class Main < Page::Base
- include Common
+ include QA::Page::Settings::Common
include Component::Select2
include SubMenus::Project
diff --git a/qa/qa/page/project/settings/merge_request.rb b/qa/qa/page/project/settings/merge_request.rb
index 7da2c9d168c..0092426b31f 100644
--- a/qa/qa/page/project/settings/merge_request.rb
+++ b/qa/qa/page/project/settings/merge_request.rb
@@ -5,7 +5,7 @@ module QA
module Project
module Settings
class MergeRequest < QA::Page::Base
- include Common
+ include QA::Page::Settings::Common
view 'app/views/projects/edit.html.haml' do
element :save_merge_request_changes
diff --git a/qa/qa/page/project/settings/operations.rb b/qa/qa/page/project/settings/operations.rb
new file mode 100644
index 00000000000..f6e005d3189
--- /dev/null
+++ b/qa/qa/page/project/settings/operations.rb
@@ -0,0 +1,23 @@
+# frozen_string_literal: true
+
+module QA
+ module Page
+ module Project
+ module Settings
+ class Operations < Page::Base
+ include QA::Page::Settings::Common
+
+ view 'app/views/projects/settings/operations/_incidents.html.haml' do
+ element :incidents_settings_content
+ end
+
+ def expand_incidents(&block)
+ expand_section(:incidents_settings_content) do
+ Settings::Incidents.perform(&block)
+ end
+ end
+ end
+ end
+ end
+ end
+end
diff --git a/qa/qa/page/project/settings/repository.rb b/qa/qa/page/project/settings/repository.rb
index 8810b971fda..8e9a24a4741 100644
--- a/qa/qa/page/project/settings/repository.rb
+++ b/qa/qa/page/project/settings/repository.rb
@@ -5,7 +5,7 @@ module QA
module Project
module Settings
class Repository < Page::Base
- include Common
+ include QA::Page::Settings::Common
view 'app/views/projects/protected_branches/shared/_index.html.haml' do
element :protected_branches_settings
@@ -19,7 +19,7 @@ module QA
element :deploy_tokens_settings
end
- view 'app/views/projects/deploy_keys/_index.html.haml' do
+ view 'app/views/shared/deploy_keys/_index.html.haml' do
element :deploy_keys_settings
end
diff --git a/qa/qa/page/project/settings/services/prometheus.rb b/qa/qa/page/project/settings/services/prometheus.rb
new file mode 100644
index 00000000000..8ae4ded535e
--- /dev/null
+++ b/qa/qa/page/project/settings/services/prometheus.rb
@@ -0,0 +1,36 @@
+# frozen_string_literal: true
+
+module QA
+ module Page
+ module Project
+ module Settings
+ module Services
+ class Prometheus < Page::Base
+ include Page::Component::CustomMetric
+
+ view 'app/views/projects/services/prometheus/_custom_metrics.html.haml' do
+ element :custom_metrics_container
+ element :new_metric_button
+ end
+
+ def click_on_custom_metric(custom_metric)
+ within_element :custom_metrics_container do
+ click_on custom_metric
+ end
+ end
+
+ def click_on_new_metric
+ click_element :new_metric_button
+ end
+
+ def has_custom_metric?(custom_metric)
+ within_element :custom_metrics_container do
+ has_text? custom_metric
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+end