summaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-03-29 21:09:08 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-03-29 21:09:08 +0000
commit12c766c77475bb96d18846546d5af909c648830d (patch)
tree3f76983dfe47f001cd5eb48fe9fedc017120200b /qa
parent5b2abea8db1916c96027ce3a48e797003316e557 (diff)
downloadgitlab-ce-12c766c77475bb96d18846546d5af909c648830d.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa')
-rw-r--r--qa/qa/page/base.rb4
-rw-r--r--qa/qa/page/project/settings/services/jira.rb31
-rw-r--r--qa/qa/support/page/logging.rb2
3 files changed, 29 insertions, 8 deletions
diff --git a/qa/qa/page/base.rb b/qa/qa/page/base.rb
index d1b556b58fb..a0b394562de 100644
--- a/qa/qa/page/base.rb
+++ b/qa/qa/page/base.rb
@@ -171,8 +171,8 @@ module QA
# This is a helpful workaround when there is a transparent element overlapping
# the target element and so, normal `click_element` on target would raise
# Selenium::WebDriver::Error::ElementClickInterceptedError
- def click_element_coordinates(name)
- page.driver.browser.action.move_to(find_element(name).native).click.perform
+ def click_element_coordinates(name, **kwargs)
+ page.driver.browser.action.move_to(find_element(name, **kwargs).native).click.perform
end
# replace with (..., page = self.class)
diff --git a/qa/qa/page/project/settings/services/jira.rb b/qa/qa/page/project/settings/services/jira.rb
index eaa3e90db78..bbf1ef14dba 100644
--- a/qa/qa/page/project/settings/services/jira.rb
+++ b/qa/qa/page/project/settings/services/jira.rb
@@ -10,7 +10,13 @@ module QA
element :service_url_field, ':data-qa-selector="`${fieldId}_field`"' # rubocop:disable QA/ElementWithPattern
element :service_username_field, ':data-qa-selector="`${fieldId}_field`"' # rubocop:disable QA/ElementWithPattern
element :service_password_field, ':data-qa-selector="`${fieldId}_field`"' # rubocop:disable QA/ElementWithPattern
- element :service_jira_issue_transition_id_field, ':data-qa-selector="`${fieldId}_field`"' # rubocop:disable QA/ElementWithPattern
+ end
+
+ view 'app/assets/javascripts/integrations/edit/components/jira_trigger_fields.vue' do
+ element :service_jira_issue_transition_enabled
+ element :service_jira_issue_transition_automatic_true, ':data-qa-selector="`service_jira_issue_transition_automatic_${issueTransitionOption.value}`"' # rubocop:disable QA/ElementWithPattern
+ element :service_jira_issue_transition_automatic_false, ':data-qa-selector="`service_jira_issue_transition_automatic_${issueTransitionOption.value}`"' # rubocop:disable QA/ElementWithPattern
+ element :service_jira_issue_transition_id_field
end
view 'app/assets/javascripts/integrations/edit/components/integration_form.vue' do
@@ -23,7 +29,10 @@ module QA
set_jira_server_url(url)
set_username(Runtime::Env.jira_admin_username)
set_password(Runtime::Env.jira_admin_password)
- set_transaction_ids('11,21,31,41')
+
+ enable_transitions
+ use_custom_transitions
+ set_transition_ids('11,21,31,41')
click_save_changes_button
wait_until(reload: false) do
@@ -45,12 +54,24 @@ module QA
fill_element(:service_password_field, password)
end
- def set_transaction_ids(transaction_ids)
- fill_element(:service_jira_issue_transition_id_field, transaction_ids)
+ def enable_transitions
+ click_element_coordinates(:service_jira_issue_transition_enabled, visible: false)
+ end
+
+ def use_automatic_transitions
+ click_element_coordinates(:service_jira_issue_transition_automatic_true, visible: false)
+ end
+
+ def use_custom_transitions
+ click_element_coordinates(:service_jira_issue_transition_automatic_false, visible: false)
+ end
+
+ def set_transition_ids(transition_ids)
+ fill_element(:service_jira_issue_transition_id_field, transition_ids)
end
def click_save_changes_button
- click_element :save_changes_button
+ click_element(:save_changes_button)
end
end
end
diff --git a/qa/qa/support/page/logging.rb b/qa/qa/support/page/logging.rb
index e183d711b30..b27a8192a64 100644
--- a/qa/qa/support/page/logging.rb
+++ b/qa/qa/support/page/logging.rb
@@ -64,7 +64,7 @@ module QA
super
end
- def click_element_coordinates(name)
+ def click_element_coordinates(name, **kwargs)
log(%Q(clicking the coordinates of :#{name}))
super