summaryrefslogtreecommitdiff
path: root/qa/qa/page/project
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-10-20 09:40:42 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-10-20 09:40:42 +0000
commitee664acb356f8123f4f6b00b73c1e1cf0866c7fb (patch)
treef8479f94a28f66654c6a4f6fb99bad6b4e86a40e /qa/qa/page/project
parent62f7d5c5b69180e82ae8196b7b429eeffc8e7b4f (diff)
downloadgitlab-ce-ee664acb356f8123f4f6b00b73c1e1cf0866c7fb.tar.gz
Add latest changes from gitlab-org/gitlab@15-5-stable-eev15.5.0-rc42
Diffstat (limited to 'qa/qa/page/project')
-rw-r--r--qa/qa/page/project/secure/configuration_form.rb26
-rw-r--r--qa/qa/page/project/settings/default_branch.rb14
-rw-r--r--qa/qa/page/project/settings/mirroring_repositories.rb2
-rw-r--r--qa/qa/page/project/settings/services/jira.rb14
-rw-r--r--qa/qa/page/project/tag/new.rb12
5 files changed, 47 insertions, 21 deletions
diff --git a/qa/qa/page/project/secure/configuration_form.rb b/qa/qa/page/project/secure/configuration_form.rb
index fa1fad44273..20999f7c92a 100644
--- a/qa/qa/page/project/secure/configuration_form.rb
+++ b/qa/qa/page/project/secure/configuration_form.rb
@@ -9,6 +9,7 @@ module QA
include QA::Page::Settings::Common
view 'app/assets/javascripts/security_configuration/components/app.vue' do
+ element :security_configuration_container
element :security_configuration_history_link
end
@@ -17,6 +18,7 @@ module QA
element :sast_status, "`${feature.type}_status`" # rubocop:disable QA/ElementWithPattern
element :sast_enable_button, "`${feature.type}_enable_button`" # rubocop:disable QA/ElementWithPattern
element :dependency_scanning_mr_button, "`${feature.type}_mr_button`" # rubocop:disable QA/ElementWithPattern
+ element :license_scanning_status, "`${feature.type}_status`" # rubocop:disable QA/ElementWithPattern
end
view 'app/assets/javascripts/security_configuration/components/auto_dev_ops_alert.vue' do
@@ -67,6 +69,18 @@ module QA
end
end
+ def has_license_compliance_status?(status_text)
+ within_element(:license_scanning_status) do
+ has_text?(status_text)
+ end
+ end
+
+ def has_no_license_compliance_status?(status_text)
+ within_element(:license_scanning_status) do
+ has_no_text?(status_text)
+ end
+ end
+
def has_auto_devops_container?
has_element?(:autodevops_container)
end
@@ -80,6 +94,18 @@ module QA
has_text?('Quickly enable all continuous testing and compliance tools by enabling Auto DevOps')
end
end
+
+ def go_to_compliance_tab
+ go_to_tab('Compliance')
+ end
+
+ private
+
+ def go_to_tab(name)
+ within_element(:security_configuration_container) do
+ find('.nav-item', text: name).click
+ end
+ end
end
end
end
diff --git a/qa/qa/page/project/settings/default_branch.rb b/qa/qa/page/project/settings/default_branch.rb
index cc28b37b88f..575f9006c84 100644
--- a/qa/qa/page/project/settings/default_branch.rb
+++ b/qa/qa/page/project/settings/default_branch.rb
@@ -5,16 +5,22 @@ module QA
module Project
module Settings
class DefaultBranch < Page::Base
- include Page::Component::Select2
-
view 'app/views/projects/default_branch/_show.html.haml' do
element :save_changes_button
+ end
+
+ view 'app/assets/javascripts/projects/settings/components/default_branch_selector.vue' do
element :default_branch_dropdown
end
+ view 'app/assets/javascripts/ref/components/ref_selector.vue' do
+ element :ref_selector_searchbox
+ end
+
def set_default_branch(branch)
- find('.select2-chosen').click
- search_and_select(branch)
+ click_button :default_branch_dropdown
+ fill_in :ref_selector_searchbox, with: branch
+ click_button branch
end
def click_save_changes_button
diff --git a/qa/qa/page/project/settings/mirroring_repositories.rb b/qa/qa/page/project/settings/mirroring_repositories.rb
index 7eeeeefdae6..f55faff19e7 100644
--- a/qa/qa/page/project/settings/mirroring_repositories.rb
+++ b/qa/qa/page/project/settings/mirroring_repositories.rb
@@ -62,7 +62,7 @@ module QA
end
def authentication_method=(value)
- unless %w[Password None SSH\ public\ key].include?(value)
+ unless ['Password', 'None', 'SSH public key'].include?(value)
raise ArgumentError, "Authentication method must be 'SSH public key', 'Password', or 'None'"
end
diff --git a/qa/qa/page/project/settings/services/jira.rb b/qa/qa/page/project/settings/services/jira.rb
index 827508e488c..41034bbd897 100644
--- a/qa/qa/page/project/settings/services/jira.rb
+++ b/qa/qa/page/project/settings/services/jira.rb
@@ -41,10 +41,7 @@ module QA
yield self if block_given?
- click_save_changes_button
- wait_until(reload: false) do
- has_element?(:save_changes_button, wait: 1) ? !find_element(:save_changes_button).disabled? : true
- end
+ click_save_changes_and_wait
end
def enable_jira_issues
@@ -55,6 +52,13 @@ module QA
fill_element(:service_jira_project_key_field, key)
end
+ def click_save_changes_and_wait
+ click_save_changes_button
+ wait_until(reload: false) do
+ has_element?(:save_changes_button, wait: 1) ? !find_element(:save_changes_button).disabled? : true
+ end
+ end
+
private
def set_jira_server_url(url)
@@ -94,3 +98,5 @@ module QA
end
end
end
+
+QA::Page::Project::Settings::Services::Jira.prepend_mod_with('Page::Project::Settings::Services::Jira', namespace: QA)
diff --git a/qa/qa/page/project/tag/new.rb b/qa/qa/page/project/tag/new.rb
index dc59c07ec98..50e11acd94a 100644
--- a/qa/qa/page/project/tag/new.rb
+++ b/qa/qa/page/project/tag/new.rb
@@ -8,17 +8,9 @@ module QA
view 'app/views/projects/tags/new.html.haml' do
element :tag_name_field
element :tag_message_field
- element :release_notes_field
element :create_tag_button
end
- view 'app/views/shared/_zen.html.haml' do
- # This partial adds the `release_notes_field` selector passed from 'app/views/projects/tags/new.html.haml'
- # The checks below ensure that required lines are not removed without updating this page object
- element :_, "qa_selector = local_assigns.fetch(:qa_selector, '')" # rubocop:disable QA/ElementWithPattern
- element :_, "text_area_tag attr, current_text, data: { qa_selector: qa_selector }" # rubocop:disable QA/ElementWithPattern
- end
-
def fill_tag_name(text)
fill_element(:tag_name_field, text)
end
@@ -27,10 +19,6 @@ module QA
fill_element(:tag_message_field, text)
end
- def fill_release_notes(text)
- fill_element(:release_notes_field, text)
- end
-
def click_create_tag_button
click_element :create_tag_button
end