diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-18 08:17:02 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-18 08:17:02 +0000 |
commit | b39512ed755239198a9c294b6a45e65c05900235 (patch) | |
tree | d234a3efade1de67c46b9e5a38ce813627726aa7 /qa/qa/page/project | |
parent | d31474cf3b17ece37939d20082b07f6657cc79a9 (diff) | |
download | gitlab-ce-b39512ed755239198a9c294b6a45e65c05900235.tar.gz |
Add latest changes from gitlab-org/gitlab@15-3-stable-eev15.3.0-rc42
Diffstat (limited to 'qa/qa/page/project')
-rw-r--r-- | qa/qa/page/project/new.rb | 6 | ||||
-rw-r--r-- | qa/qa/page/project/pipeline_editor/show.rb | 25 | ||||
-rw-r--r-- | qa/qa/page/project/settings/advanced.rb | 6 | ||||
-rw-r--r-- | qa/qa/page/project/settings/integrations.rb | 7 | ||||
-rw-r--r-- | qa/qa/page/project/settings/pages.rb | 25 | ||||
-rw-r--r-- | qa/qa/page/project/settings/protected_branches.rb | 4 | ||||
-rw-r--r-- | qa/qa/page/project/settings/services/jenkins.rb | 6 | ||||
-rw-r--r-- | qa/qa/page/project/show.rb | 6 | ||||
-rw-r--r-- | qa/qa/page/project/sub_menus/settings.rb | 8 | ||||
-rw-r--r-- | qa/qa/page/project/web_ide/edit.rb | 12 |
10 files changed, 78 insertions, 27 deletions
diff --git a/qa/qa/page/project/new.rb b/qa/qa/page/project/new.rb index 7864e664429..bb4fb84f2d2 100644 --- a/qa/qa/page/project/new.rb +++ b/qa/qa/page/project/new.rb @@ -81,9 +81,9 @@ module QA # Disable experiment for SAST at project creation https://gitlab.com/gitlab-org/gitlab/-/issues/333196 def disable_initialize_with_sast - return unless has_element?(:initialize_with_sast_checkbox) + return unless has_element?(:initialize_with_sast_checkbox, visible: false) - uncheck_element(:initialize_with_sast_checkbox) + uncheck_element(:initialize_with_sast_checkbox, true) end def click_github_link @@ -95,7 +95,7 @@ module QA end def disable_initialize_with_readme - uncheck_element(:initialize_with_readme_checkbox) + uncheck_element(:initialize_with_readme_checkbox, true) end end end diff --git a/qa/qa/page/project/pipeline_editor/show.rb b/qa/qa/page/project/pipeline_editor/show.rb index 78f16a8a65c..70c0c5abb52 100644 --- a/qa/qa/page/project/pipeline_editor/show.rb +++ b/qa/qa/page/project/pipeline_editor/show.rb @@ -54,7 +54,12 @@ module QA element :file_tree_popover end + view 'app/assets/javascripts/pipeline_editor/components/validate/ci_validate.vue' do + element :simulate_pipeline_button + end + def initialize + wait_for_requests(skip_finished_loading_check: true) dismiss_file_tree_popover if has_element?(:file_tree_popover) super @@ -89,7 +94,7 @@ module QA end def submit_changes - Support::Waiter.wait_until { !find_element(:commit_changes_button).disabled? } + wait_until(reload: false) { !find_element(:commit_changes_button).disabled? } click_element(:commit_changes_button) wait_for_requests @@ -115,14 +120,14 @@ module QA go_to_tab('Visualize') end - def go_to_lint_tab - go_to_tab('Lint') - end - def go_to_view_merged_yaml_tab go_to_tab('View merged YAML') end + def go_to_validate_tab + go_to_tab('Validate') + end + def has_source_editor? has_element?(:source_editor_container) end @@ -141,6 +146,12 @@ module QA end end + def tab_alert_title + within_element(:file_editor_container) do + find('.gl-alert-title').text + end + end + def has_new_mr_checkbox? has_element?(:new_mr_checkbox, visible: true) end @@ -153,6 +164,10 @@ module QA check_element(:new_mr_checkbox, true) end + def simulate_pipeline + click_element(:simulate_pipeline_button) + end + private def go_to_tab(name) diff --git a/qa/qa/page/project/settings/advanced.rb b/qa/qa/page/project/settings/advanced.rb index fd9cc8a13e7..9d8ed132ffd 100644 --- a/qa/qa/page/project/settings/advanced.rb +++ b/qa/qa/page/project/settings/advanced.rb @@ -8,6 +8,10 @@ module QA include QA::Page::Component::ConfirmModal include Component::NamespaceSelect + view 'app/assets/javascripts/vue_shared/components/confirm_danger/confirm_danger.vue' do + element :confirm_danger_button + end + view 'app/views/projects/edit.html.haml' do element :project_path_field element :change_path_button @@ -47,7 +51,7 @@ module QA # https://gitlab.com/gitlab-org/gitlab/-/issues/218965 select_namespace(namespace.gsub(%r{([^\s])/([^\s])}, '\1 / \2')) - click_element(:transfer_button) + click_element(:confirm_danger_button) fill_confirmation_text(project_name) confirm_transfer end diff --git a/qa/qa/page/project/settings/integrations.rb b/qa/qa/page/project/settings/integrations.rb index 0d5515aacdf..58b3badbb22 100644 --- a/qa/qa/page/project/settings/integrations.rb +++ b/qa/qa/page/project/settings/integrations.rb @@ -6,6 +6,7 @@ module QA module Settings class Integrations < QA::Page::Base view 'app/assets/javascripts/integrations/index/components/integrations_table.vue' do + element :jenkins_link, %q(:data-qa-selector="`${item.name}_link`") # rubocop:disable QA/ElementWithPattern element :prometheus_link, %q(:data-qa-selector="`${item.name}_link`") # rubocop:disable QA/ElementWithPattern element :jira_link, %q(:data-qa-selector="`${item.name}_link`") # rubocop:disable QA/ElementWithPattern element :pipelines_email_link, %q(:data-qa-selector="`${item.name}_link`") # rubocop:disable QA/ElementWithPattern @@ -22,10 +23,12 @@ module QA def click_jira_link click_element :jira_link end + + def click_jenkins_ci_link + click_element :jenkins_link + end end end end end end - -QA::Page::Project::Settings::Integrations.prepend_mod_with('Page::Project::Settings::Integrations', namespace: QA) diff --git a/qa/qa/page/project/settings/pages.rb b/qa/qa/page/project/settings/pages.rb new file mode 100644 index 00000000000..1417f7ec1b5 --- /dev/null +++ b/qa/qa/page/project/settings/pages.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +module QA + module Page + module Project + module Settings + class Pages < Page::Base + include QA::Page::Settings::Common + + view 'app/views/projects/pages/_access.html.haml' do + element :access_page_container + end + + def go_to_access_page + within_element(:access_page_container) do + find('a').click + end + end + end + end + end + end +end + +QA::Page::Project::Settings::Pages.prepend_mod_with("Page::Project::Settings::Pages", namespace: QA) diff --git a/qa/qa/page/project/settings/protected_branches.rb b/qa/qa/page/project/settings/protected_branches.rb index 308cf6366a7..35fc87f717c 100644 --- a/qa/qa/page/project/settings/protected_branches.rb +++ b/qa/qa/page/project/settings/protected_branches.rb @@ -17,10 +17,6 @@ module QA element :allowed_to_merge_dropdown end - view 'app/views/shared/projects/protected_branches/_update_protected_branch.html.haml' do - element :allowed_to_merge - end - view 'app/views/projects/protected_branches/shared/_branches_list.html.haml' do element :protected_branches_list end diff --git a/qa/qa/page/project/settings/services/jenkins.rb b/qa/qa/page/project/settings/services/jenkins.rb index 8e092371491..39403995ce8 100644 --- a/qa/qa/page/project/settings/services/jenkins.rb +++ b/qa/qa/page/project/settings/services/jenkins.rb @@ -17,11 +17,11 @@ module QA element :save_changes_button end - def setup_service_with(jenkins_url:, project_name:) + def setup_service_with(jenkins_url:, project_name:, username:, password:) set_jenkins_url(jenkins_url) set_project_name(project_name) - set_username('admin') - set_password('password') + set_username(username) + set_password(password) click_save_changes_button end diff --git a/qa/qa/page/project/show.rb b/qa/qa/page/project/show.rb index 022e08215be..e048afee8b3 100644 --- a/qa/qa/page/project/show.rb +++ b/qa/qa/page/project/show.rb @@ -67,8 +67,8 @@ module QA end view 'app/views/shared/_ref_switcher.html.haml' do - element :branches_select element :branches_dropdown + element :branches_dropdown_content end view 'app/views/projects/blob/viewers/_loading.html.haml' do @@ -176,9 +176,9 @@ module QA end def switch_to_branch(branch_name) - find_element(:branches_select).click + find_element(:branches_dropdown).click - within_element(:branches_dropdown) do + within_element(:branches_dropdown_content) do click_on branch_name end end diff --git a/qa/qa/page/project/sub_menus/settings.rb b/qa/qa/page/project/sub_menus/settings.rb index f35d27e658d..53a5eaf60c5 100644 --- a/qa/qa/page/project/sub_menus/settings.rb +++ b/qa/qa/page/project/sub_menus/settings.rb @@ -69,6 +69,14 @@ module QA end end + def go_to_pages_settings + hover_settings do + within_submenu do + click_element(:sidebar_menu_item_link, menu_item: 'Pages') + end + end + end + private def hover_settings diff --git a/qa/qa/page/project/web_ide/edit.rb b/qa/qa/page/project/web_ide/edit.rb index bc6c839bfe2..e572569e496 100644 --- a/qa/qa/page/project/web_ide/edit.rb +++ b/qa/qa/page/project/web_ide/edit.rb @@ -24,11 +24,11 @@ module QA end view 'app/assets/javascripts/ide/components/ide_tree_list.vue' do - element :file_list + element :file_list_container end view 'app/assets/javascripts/ide/components/file_templates/bar.vue' do - element :file_templates_bar + element :file_templates_container element :file_template_dropdown end @@ -110,7 +110,7 @@ module QA end def has_file?(file_name) - within_element(:file_list) do + within_element(:file_list_container) do has_element?(:file_name_content, file_name: file_name) end end @@ -173,7 +173,7 @@ module QA has_no_element?(:new_file_modal) wait_until(reload: false) do - within_element(:file_templates_bar) do + within_element(:file_templates_container) do click_element :file_template_dropdown fill_element :dropdown_filter_input, template @@ -291,12 +291,12 @@ module QA click_element(:fork_project_button) # wait for the fork to be created wait_until(reload: true) do - has_element?(:file_list) + has_element?(:file_list_container) end end def upload_file(file_path) - within_element(:file_list) do + within_element(:file_list_container) do find_element(:file_upload_field, visible: false).send_keys(file_path) end end |