diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-21 07:08:36 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-21 07:08:36 +0000 |
commit | 48aff82709769b098321c738f3444b9bdaa694c6 (patch) | |
tree | e00c7c43e2d9b603a5a6af576b1685e400410dee /qa/qa/page/project | |
parent | 879f5329ee916a948223f8f43d77fba4da6cd028 (diff) | |
download | gitlab-ce-48aff82709769b098321c738f3444b9bdaa694c6.tar.gz |
Add latest changes from gitlab-org/gitlab@13-5-stable-eev13.5.0-rc42
Diffstat (limited to 'qa/qa/page/project')
-rw-r--r-- | qa/qa/page/project/issue/show.rb | 12 | ||||
-rw-r--r-- | qa/qa/page/project/job/show.rb | 6 | ||||
-rw-r--r-- | qa/qa/page/project/new.rb | 6 | ||||
-rw-r--r-- | qa/qa/page/project/operations/kubernetes/index.rb | 4 | ||||
-rw-r--r-- | qa/qa/page/project/packages/index.rb | 2 | ||||
-rw-r--r-- | qa/qa/page/project/pipeline/index.rb | 14 | ||||
-rw-r--r-- | qa/qa/page/project/pipeline/new.rb | 19 | ||||
-rw-r--r-- | qa/qa/page/project/pipeline/show.rb | 19 | ||||
-rw-r--r-- | qa/qa/page/project/settings/ci_variables.rb | 4 | ||||
-rw-r--r-- | qa/qa/page/project/show.rb | 2 | ||||
-rw-r--r-- | qa/qa/page/project/snippet/index.rb | 29 | ||||
-rw-r--r-- | qa/qa/page/project/web_ide/edit.rb | 14 | ||||
-rw-r--r-- | qa/qa/page/project/wiki/show.rb | 2 |
13 files changed, 114 insertions, 19 deletions
diff --git a/qa/qa/page/project/issue/show.rb b/qa/qa/page/project/issue/show.rb index 826acaa2e0a..a02617def9e 100644 --- a/qa/qa/page/project/issue/show.rb +++ b/qa/qa/page/project/issue/show.rb @@ -12,7 +12,7 @@ module QA view 'app/assets/javascripts/notes/components/comment_form.vue' do element :comment_button - element :comment_input + element :comment_field end view 'app/assets/javascripts/notes/components/discussion_filter.vue' do @@ -43,7 +43,7 @@ module QA end view 'app/assets/javascripts/related_issues/components/related_issuable_input.vue' do - element :add_issue_input + element :add_issue_field end view 'app/assets/javascripts/related_issues/components/related_issues_block.vue' do @@ -57,8 +57,8 @@ module QA def relate_issue(issue) click_element(:related_issues_plus_button) - fill_element(:add_issue_input, issue.web_url) - send_keys_to_element(:add_issue_input, :enter) + fill_element(:add_issue_field, issue.web_url) + send_keys_to_element(:add_issue_field, :enter) end def related_issuable_item @@ -84,7 +84,7 @@ module QA # attachment option should be an absolute path def comment(text, attachment: nil, filter: :all_activities) method("select_#{filter}_filter").call - fill_element :comment_input, "#{text}\n" + fill_element :comment_field, "#{text}\n" unless attachment.nil? QA::Page::Component::Dropzone.new(self, '.new-note') @@ -125,6 +125,8 @@ module QA click_element(:title) click_element :discussion_filter find_element(:filter_options, text: text).click + + wait_for_loading end end end diff --git a/qa/qa/page/project/job/show.rb b/qa/qa/page/project/job/show.rb index 6a657b4ab39..2ecb27e05b2 100644 --- a/qa/qa/page/project/job/show.rb +++ b/qa/qa/page/project/job/show.rb @@ -58,6 +58,10 @@ module QA click_element :retry_button end + def has_job_log? + has_element? :job_log_content + end + private def loaded?(wait: 60) @@ -70,3 +74,5 @@ module QA end end end + +QA::Page::Project::Job::Show.prepend_if_ee('QA::EE::Page::Project::Job::Show') diff --git a/qa/qa/page/project/new.rb b/qa/qa/page/project/new.rb index f6c015f64ea..7e296528795 100644 --- a/qa/qa/page/project/new.rb +++ b/qa/qa/page/project/new.rb @@ -23,11 +23,7 @@ module QA element :visibility_radios, 'visibility_level:' # rubocop:disable QA/ElementWithPattern end - view 'app/views/projects/_import_project_pane.html.haml' do - element :import_github, "icon('github', text: 'GitHub')" # rubocop:disable QA/ElementWithPattern - end - - view 'app/views/projects/project_templates/_built_in_templates.html.haml' do + view 'app/views/projects/project_templates/_template.html.haml' do element :use_template_button element :template_option_row end diff --git a/qa/qa/page/project/operations/kubernetes/index.rb b/qa/qa/page/project/operations/kubernetes/index.rb index 0c92f9a9f28..114e3ddd46a 100644 --- a/qa/qa/page/project/operations/kubernetes/index.rb +++ b/qa/qa/page/project/operations/kubernetes/index.rb @@ -7,11 +7,11 @@ module QA module Kubernetes class Index < Page::Base view 'app/views/clusters/clusters/_empty_state.html.haml' do - element :add_kubernetes_cluster_button, "link_to s_('ClusterIntegration|Add Kubernetes cluster')" # rubocop:disable QA/ElementWithPattern + element :add_kubernetes_cluster_button, "link_to s_('ClusterIntegration|Integrate with a cluster certificate')" # rubocop:disable QA/ElementWithPattern end def add_kubernetes_cluster - click_on 'Add Kubernetes cluster' + click_on 'Connect cluster with certificate' end def has_cluster?(cluster) diff --git a/qa/qa/page/project/packages/index.rb b/qa/qa/page/project/packages/index.rb index 6d55d1d04b6..396d3373b8a 100644 --- a/qa/qa/page/project/packages/index.rb +++ b/qa/qa/page/project/packages/index.rb @@ -26,3 +26,5 @@ module QA end end end + +QA::Page::Project::Packages::Index.prepend_if_ee('QA::EE::Page::Project::Packages::Index') diff --git a/qa/qa/page/project/pipeline/index.rb b/qa/qa/page/project/pipeline/index.rb index aa2ef2f058f..aff2378330a 100644 --- a/qa/qa/page/project/pipeline/index.rb +++ b/qa/qa/page/project/pipeline/index.rb @@ -14,6 +14,10 @@ module QA element :pipeline_retry_button end + view 'app/assets/javascripts/pipelines/components/pipelines_list/nav_controls.vue' do + element :run_pipeline_button + end + def click_on_latest_pipeline all_elements(:pipeline_url_link, minimum: 1, wait: QA::Support::Repeater::DEFAULT_MAX_WAIT_TIME).first.click end @@ -40,8 +44,18 @@ module QA wait_for_latest_pipeline_success end end + + def has_pipeline? + has_element? :pipeline_url_link + end + + def click_run_pipeline_button + click_element :run_pipeline_button, Page::Project::Pipeline::New + end end end end end end + +QA::Page::Project::Pipeline::Index.prepend_if_ee('QA::EE::Page::Project::Pipeline::Index') diff --git a/qa/qa/page/project/pipeline/new.rb b/qa/qa/page/project/pipeline/new.rb new file mode 100644 index 00000000000..644a21b46e9 --- /dev/null +++ b/qa/qa/page/project/pipeline/new.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +module QA + module Page + module Project + module Pipeline + class New < QA::Page::Base + view 'app/assets/javascripts/pipeline_new/components/pipeline_new_form.vue' do + element :run_pipeline_button, required: true + end + + def click_run_pipeline_button + click_element :run_pipeline_button + end + end + end + end + end +end diff --git a/qa/qa/page/project/pipeline/show.rb b/qa/qa/page/project/pipeline/show.rb index 57ab7fb4480..0fb5238a308 100644 --- a/qa/qa/page/project/pipeline/show.rb +++ b/qa/qa/page/project/pipeline/show.rb @@ -8,7 +8,7 @@ module QA include Component::CiBadgeLink view 'app/assets/javascripts/vue_shared/components/header_ci_component.vue' do - element :pipeline_header, /header class.*ci-header-container.*/ # rubocop:disable QA/ElementWithPattern + element :pipeline_header end view 'app/assets/javascripts/pipelines/components/graph/graph_component.vue' do @@ -16,8 +16,9 @@ module QA end view 'app/assets/javascripts/pipelines/components/graph/job_item.vue' do - element :job_component, /class.*ci-job-component.*/ # rubocop:disable QA/ElementWithPattern + element :job_item_container element :job_link + element :action_button end view 'app/assets/javascripts/pipelines/components/graph/linked_pipeline.vue' do @@ -34,16 +35,18 @@ module QA end def running?(wait: 0) - within('.ci-header-container') do + within_element(:pipeline_header) do page.has_content?('running', wait: wait) end end def has_build?(name, status: :success, wait: nil) - within('.pipeline-graph') do - within('.ci-job-component', text: name) do + if status + within_element(:job_item_container, text: name) do has_selector?(".ci-status-icon-#{status}", { wait: wait }.compact) end + else + has_element?(:job_item_container, text: name) end end @@ -78,6 +81,12 @@ module QA def click_on_first_job first('.js-pipeline-graph-job-link', wait: QA::Support::Repeater::DEFAULT_MAX_WAIT_TIME).click end + + def click_job_action(job_name) + within_element(:job_item_container, text: job_name) do + click_element(:action_button) + end + end end end end diff --git a/qa/qa/page/project/settings/ci_variables.rb b/qa/qa/page/project/settings/ci_variables.rb index aef9800e876..f2ced668a60 100644 --- a/qa/qa/page/project/settings/ci_variables.rb +++ b/qa/qa/page/project/settings/ci_variables.rb @@ -26,6 +26,10 @@ module QA within_element(:ci_variable_key_field) { find('input').set key } fill_element :ci_variable_value_field, value click_ci_variable_save_button + + wait_until(reload: false) do + within_element(:ci_variable_table_content) { has_element?(:edit_ci_variable_button) } + end end def click_add_variable diff --git a/qa/qa/page/project/show.rb b/qa/qa/page/project/show.rb index c607b35005e..d81be2803bd 100644 --- a/qa/qa/page/project/show.rb +++ b/qa/qa/page/project/show.rb @@ -103,6 +103,8 @@ module QA end def click_commit(commit_msg) + wait_for_requests + within_element(:file_tree_table) do click_on commit_msg end diff --git a/qa/qa/page/project/snippet/index.rb b/qa/qa/page/project/snippet/index.rb new file mode 100644 index 00000000000..a221abc4196 --- /dev/null +++ b/qa/qa/page/project/snippet/index.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true + +module QA + module Page + module Project + module Snippet + class Index < Page::Base + include Page::Component::Snippet + + view 'app/views/shared/snippets/_snippet.html.haml' do + element :snippet_link + end + + def has_project_snippet?(title) + has_element?(:snippet_link, snippet_title: title) + end + + def click_snippet_link(title) + within_element(:snippet_link, text: title) do + click_link(title) + end + end + end + end + end + end +end + +QA::Page::Project::Snippet::Index.prepend_if_ee('QA::EE::Page::Project::Snippet::Index') diff --git a/qa/qa/page/project/web_ide/edit.rb b/qa/qa/page/project/web_ide/edit.rb index 56c8d343cf5..fc33c753230 100644 --- a/qa/qa/page/project/web_ide/edit.rb +++ b/qa/qa/page/project/web_ide/edit.rb @@ -73,6 +73,10 @@ module QA element :project_path_content end + view 'app/assets/javascripts/ide/components/commit_sidebar/message_field.vue' do + element :ide_commit_message_field + end + def has_file?(file_name) within_element(:file_list) do page.has_content? file_name @@ -83,6 +87,10 @@ module QA has_element?(:project_path_content, project_path: project_path) end + def go_to_project + click_element(:project_path_content, Page::Project::Show) + end + def create_new_file_from_template(file_name, template) click_element(:new_file, Page::Component::WebIDE::Modal::CreateNewFile) @@ -115,7 +123,7 @@ module QA find_element(:commit_sha_content).text end - def commit_changes(open_merge_request: false) + def commit_changes(commit_message = nil, open_merge_request: false) # Clicking :begin_commit_button switches from the # edit to the commit view click_element(:begin_commit_button) @@ -133,6 +141,10 @@ module QA has_element?(:commit_button) end + if commit_message + fill_element(:ide_commit_message_field, commit_message) + end + if open_merge_request click_element(:commit_button, Page::MergeRequest::New) else diff --git a/qa/qa/page/project/wiki/show.rb b/qa/qa/page/project/wiki/show.rb index cdd18e420d1..61b0d202a76 100644 --- a/qa/qa/page/project/wiki/show.rb +++ b/qa/qa/page/project/wiki/show.rb @@ -11,12 +11,12 @@ module QA view 'app/views/shared/wikis/show.html.haml' do element :wiki_page_title element :wiki_page_content + element :edit_page_button end view 'app/views/shared/wikis/_main_links.html.haml' do element :new_page_button element :page_history_button - element :edit_page_button end view 'app/views/shared/empty_states/_wikis.html.haml' do |