diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-12 18:09:23 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-12 18:09:23 +0000 |
commit | ee4105895ebffdc6185d20f4592031723a76fedc (patch) | |
tree | 2c723287e54f4131ccb95ad0e8b1e0609311621b /qa | |
parent | 006000e366ad5dc61966770d33e3afd4c07e728d (diff) | |
download | gitlab-ce-ee4105895ebffdc6185d20f4592031723a76fedc.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa')
-rw-r--r-- | qa/qa/page/admin/settings/component/ip_limits.rb | 6 | ||||
-rw-r--r-- | qa/qa/page/admin/settings/component/outbound_requests.rb | 2 | ||||
-rw-r--r-- | qa/qa/page/admin/settings/component/performance_bar.rb | 2 | ||||
-rw-r--r-- | qa/qa/page/admin/settings/component/sign_up_restrictions.rb | 8 | ||||
-rw-r--r-- | qa/qa/page/base.rb | 23 | ||||
-rw-r--r-- | qa/qa/page/group/settings/general.rb | 48 | ||||
-rw-r--r-- | qa/qa/page/merge_request/show.rb | 1 | ||||
-rw-r--r-- | qa/qa/page/project/new.rb | 2 | ||||
-rw-r--r-- | qa/qa/page/project/operations/kubernetes/add_existing.rb | 2 | ||||
-rw-r--r-- | qa/qa/page/project/settings/auto_devops.rb | 4 | ||||
-rw-r--r-- | qa/qa/page/project/settings/ci_variables.rb | 1 | ||||
-rw-r--r-- | qa/qa/page/project/settings/incidents.rb | 2 | ||||
-rw-r--r-- | qa/qa/page/project/settings/merge_request.rb | 2 | ||||
-rw-r--r-- | qa/qa/page/project/web_ide/edit.rb | 4 |
14 files changed, 59 insertions, 48 deletions
diff --git a/qa/qa/page/admin/settings/component/ip_limits.rb b/qa/qa/page/admin/settings/component/ip_limits.rb index 9db2ae8ba58..1f9bd113cab 100644 --- a/qa/qa/page/admin/settings/component/ip_limits.rb +++ b/qa/qa/page/admin/settings/component/ip_limits.rb @@ -14,9 +14,9 @@ module QA end def enable_throttles - check_element :throttle_unauthenticated_checkbox - check_element :throttle_authenticated_api_checkbox - check_element :throttle_authenticated_web_checkbox + check_element(:throttle_unauthenticated_checkbox) + check_element(:throttle_authenticated_api_checkbox) + check_element(:throttle_authenticated_web_checkbox) end def save_settings diff --git a/qa/qa/page/admin/settings/component/outbound_requests.rb b/qa/qa/page/admin/settings/component/outbound_requests.rb index 248ea5b6715..c812c05f9c1 100644 --- a/qa/qa/page/admin/settings/component/outbound_requests.rb +++ b/qa/qa/page/admin/settings/component/outbound_requests.rb @@ -19,7 +19,7 @@ module QA private def check_allow_requests_to_local_network_from_services_checkbox - check_element :allow_requests_from_services_checkbox + check_element(:allow_requests_from_services_checkbox) end def click_save_changes_button diff --git a/qa/qa/page/admin/settings/component/performance_bar.rb b/qa/qa/page/admin/settings/component/performance_bar.rb index bc29efb64c0..9e92fa362fb 100644 --- a/qa/qa/page/admin/settings/component/performance_bar.rb +++ b/qa/qa/page/admin/settings/component/performance_bar.rb @@ -12,7 +12,7 @@ module QA end def enable_performance_bar - click_element :enable_performance_bar_checkbox + check_element(:enable_performance_bar_checkbox) Capybara.current_session.driver.browser.manage.add_cookie(name: 'perf_bar_enabled', value: 'true') end diff --git a/qa/qa/page/admin/settings/component/sign_up_restrictions.rb b/qa/qa/page/admin/settings/component/sign_up_restrictions.rb index 9526faf4126..9909155641f 100644 --- a/qa/qa/page/admin/settings/component/sign_up_restrictions.rb +++ b/qa/qa/page/admin/settings/component/sign_up_restrictions.rb @@ -13,13 +13,13 @@ module QA end def require_admin_approval_after_user_signup - check_element :require_admin_approval_after_user_signup_checkbox - click_element :save_changes_button + check_element(:require_admin_approval_after_user_signup_checkbox) + click_element(:save_changes_button) end def disable_signups - uncheck_element :signup_enabled_checkbox - click_element :save_changes_button + uncheck_element(:signup_enabled_checkbox) + click_element(:save_changes_button) end end end diff --git a/qa/qa/page/base.rb b/qa/qa/page/base.rb index 99f73bbba48..d1b556b58fb 100644 --- a/qa/qa/page/base.rb +++ b/qa/qa/page/base.rb @@ -133,9 +133,15 @@ module QA end def check_element(name) + if find_element(name, visible: false).checked? + QA::Runtime::Logger.debug("#{name} is already checked") + + return + end + retry_until(sleep_interval: 1) do - find_element(name).set(true) - checked = find_element(name).checked? + find_element(name, visible: false).click + checked = find_element(name, visible: false).checked? QA::Runtime::Logger.debug(checked ? "#{name} was checked" : "#{name} was not checked") @@ -144,10 +150,19 @@ module QA end def uncheck_element(name) + unless find_element(name, visible: false).checked? + QA::Runtime::Logger.debug("#{name} is already unchecked") + + return + end + retry_until(sleep_interval: 1) do - find_element(name).set(false) + find_element(name, visible: false).click + unchecked = !find_element(name, visible: false).checked? + + QA::Runtime::Logger.debug(unchecked ? "#{name} was unchecked" : "#{name} was not unchecked") - !find_element(name).checked? + unchecked end end diff --git a/qa/qa/page/group/settings/general.rb b/qa/qa/page/group/settings/general.rb index 8f5267c3362..ced8bd5c812 100644 --- a/qa/qa/page/group/settings/general.rb +++ b/qa/qa/page/group/settings/general.rb @@ -54,57 +54,57 @@ module QA end def set_lfs_enabled - expand_content :permission_lfs_2fa_content - check_element :lfs_checkbox - click_element :save_permissions_changes_button + expand_content(:permission_lfs_2fa_content) + check_element(:lfs_checkbox) + click_element(:save_permissions_changes_button) end def set_lfs_disabled - expand_content :permission_lfs_2fa_content - uncheck_element :lfs_checkbox - click_element :save_permissions_changes_button + expand_content(:permission_lfs_2fa_content) + uncheck_element(:lfs_checkbox) + click_element(:save_permissions_changes_button) end def set_request_access_enabled - expand_content :permission_lfs_2fa_content - check_element :request_access_checkbox - click_element :save_permissions_changes_button + expand_content(:permission_lfs_2fa_content) + check_element(:request_access_checkbox) + click_element(:save_permissions_changes_button) end def set_request_access_disabled - expand_content :permission_lfs_2fa_content - uncheck_element :request_access_checkbox - click_element :save_permissions_changes_button + expand_content(:permission_lfs_2fa_content) + uncheck_element(:request_access_checkbox) + click_element(:save_permissions_changes_button) end def set_require_2fa_enabled - expand_content :permission_lfs_2fa_content - check_element :require_2fa_checkbox - click_element :save_permissions_changes_button + expand_content(:permission_lfs_2fa_content) + check_element(:require_2fa_checkbox) + click_element(:save_permissions_changes_button) end def set_require_2fa_disabled - expand_content :permission_lfs_2fa_content - uncheck_element :require_2fa_checkbox - click_element :save_permissions_changes_button + expand_content(:permission_lfs_2fa_content) + uncheck_element(:require_2fa_checkbox) + click_element(:save_permissions_changes_button) end def set_project_creation_level(value) - expand_content :permission_lfs_2fa_content + expand_content(:permission_lfs_2fa_content) select_element(:project_creation_level_dropdown, value) - click_element :save_permissions_changes_button + click_element(:save_permissions_changes_button) end def toggle_request_access - expand_content :permission_lfs_2fa_content + expand_content(:permission_lfs_2fa_content) if find_element(:request_access_checkbox).checked? - uncheck_element :request_access_checkbox + uncheck_element(:request_access_checkbox) else - check_element :request_access_checkbox + check_element(:request_access_checkbox) end - click_element :save_permissions_changes_button + click_element(:save_permissions_changes_button) end end end diff --git a/qa/qa/page/merge_request/show.rb b/qa/qa/page/merge_request/show.rb index 056942d0eaf..89b6effcad7 100644 --- a/qa/qa/page/merge_request/show.rb +++ b/qa/qa/page/merge_request/show.rb @@ -228,6 +228,7 @@ module QA !find_element(:squash_checkbox).disabled? end + # TODO: Fix workaround for data-qa-selector failure click_element(:squash_checkbox) end diff --git a/qa/qa/page/project/new.rb b/qa/qa/page/project/new.rb index 7e296528795..d1033dbfca9 100644 --- a/qa/qa/page/project/new.rb +++ b/qa/qa/page/project/new.rb @@ -68,7 +68,7 @@ module QA end def enable_initialize_with_readme - check_element :initialize_with_readme_checkbox + check_element(:initialize_with_readme_checkbox) end end end diff --git a/qa/qa/page/project/operations/kubernetes/add_existing.rb b/qa/qa/page/project/operations/kubernetes/add_existing.rb index 1b9a451c47d..59f59ca9966 100644 --- a/qa/qa/page/project/operations/kubernetes/add_existing.rb +++ b/qa/qa/page/project/operations/kubernetes/add_existing.rb @@ -36,7 +36,7 @@ module QA end def uncheck_rbac! - uncheck_element :rbac_checkbox + uncheck_element(:rbac_checkbox) end end end diff --git a/qa/qa/page/project/settings/auto_devops.rb b/qa/qa/page/project/settings/auto_devops.rb index 827d5b072c3..9dffa010805 100644 --- a/qa/qa/page/project/settings/auto_devops.rb +++ b/qa/qa/page/project/settings/auto_devops.rb @@ -11,8 +11,8 @@ module QA end def enable_autodevops - check_element :enable_autodevops_checkbox - click_element :save_changes_button + check_element(:enable_autodevops_checkbox) + click_element(:save_changes_button) end end end diff --git a/qa/qa/page/project/settings/ci_variables.rb b/qa/qa/page/project/settings/ci_variables.rb index f2ced668a60..2b8fad64afb 100644 --- a/qa/qa/page/project/settings/ci_variables.rb +++ b/qa/qa/page/project/settings/ci_variables.rb @@ -10,7 +10,6 @@ module QA view 'app/assets/javascripts/ci_variable_list/components/ci_variable_modal.vue' do element :ci_variable_key_field element :ci_variable_value_field - element :ci_variable_masked_checkbox element :ci_variable_save_button element :ci_variable_delete_button end diff --git a/qa/qa/page/project/settings/incidents.rb b/qa/qa/page/project/settings/incidents.rb index 9b523e2aa9e..610129851d9 100644 --- a/qa/qa/page/project/settings/incidents.rb +++ b/qa/qa/page/project/settings/incidents.rb @@ -13,7 +13,7 @@ module QA end def enable_issues_for_incidents - check_element :create_issue_checkbox + check_element(:create_issue_checkbox) end def select_issue_template(template) diff --git a/qa/qa/page/project/settings/merge_request.rb b/qa/qa/page/project/settings/merge_request.rb index 34754124931..fe5d629effe 100644 --- a/qa/qa/page/project/settings/merge_request.rb +++ b/qa/qa/page/project/settings/merge_request.rb @@ -29,7 +29,7 @@ module QA end def enable_merge_if_all_disscussions_are_resolved - click_element :allow_merge_if_all_discussions_are_resolved_checkbox + check_element(:allow_merge_if_all_discussions_are_resolved_checkbox) click_save_changes end end diff --git a/qa/qa/page/project/web_ide/edit.rb b/qa/qa/page/project/web_ide/edit.rb index 45c46004790..fd68ac0de16 100644 --- a/qa/qa/page/project/web_ide/edit.rb +++ b/qa/qa/page/project/web_ide/edit.rb @@ -44,10 +44,6 @@ module QA element :commit_button end - view 'app/assets/javascripts/ide/components/commit_sidebar/new_merge_request_option.vue' do - element :start_new_mr_checkbox - end - view 'app/assets/javascripts/ide/components/repo_editor.vue' do element :editor_container end |