summaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
Diffstat (limited to 'qa')
-rw-r--r--qa/Gemfile3
-rw-r--r--qa/Gemfile.lock37
-rw-r--r--qa/qa.rb6
-rw-r--r--qa/qa/fixtures/metrics_dashboards/templating.yml43
-rw-r--r--qa/qa/git/repository.rb4
-rw-r--r--qa/qa/page/admin/settings/component/repository_storage.rb26
-rw-r--r--qa/qa/page/admin/settings/repository.rb23
-rw-r--r--qa/qa/page/component/issue_board/show.rb2
-rw-r--r--qa/qa/page/component/project_selector.rb3
-rw-r--r--qa/qa/page/component/select2.rb8
-rw-r--r--qa/qa/page/component/snippet.rb14
-rw-r--r--qa/qa/page/dashboard/snippet/edit.rb4
-rw-r--r--qa/qa/page/main/sign_up.rb12
-rw-r--r--qa/qa/page/merge_request/show.rb15
-rw-r--r--qa/qa/page/profile/accounts/show.rb7
-rw-r--r--qa/qa/page/project/issue/index.rb2
-rw-r--r--qa/qa/page/project/issue/show.rb36
-rw-r--r--qa/qa/page/project/job/show.rb12
-rw-r--r--qa/qa/page/project/operations/kubernetes/add.rb4
-rw-r--r--qa/qa/page/project/operations/metrics/show.rb25
-rw-r--r--qa/qa/page/project/packages/index.rb2
-rw-r--r--qa/qa/page/project/pipeline/show.rb8
-rw-r--r--qa/qa/page/project/settings/advanced.rb22
-rw-r--r--qa/qa/page/project/settings/main.rb1
-rw-r--r--qa/qa/page/project/settings/merge_request.rb9
-rw-r--r--qa/qa/page/project/settings/mirroring_repositories.rb2
-rw-r--r--qa/qa/page/project/settings/services/jira.rb2
-rw-r--r--qa/qa/page/project/show.rb2
-rw-r--r--qa/qa/page/project/web_ide/edit.rb26
-rw-r--r--qa/qa/page/sub_menus/common.rb2
-rw-r--r--qa/qa/resource/api_fabricator.rb4
-rw-r--r--qa/qa/resource/fork.rb4
-rw-r--r--qa/qa/resource/group.rb1
-rw-r--r--qa/qa/resource/project.rb7
-rw-r--r--qa/qa/resource/project_imported_from_github.rb21
-rw-r--r--qa/qa/resource/settings/hashed_storage.rb26
-rw-r--r--qa/qa/resource/user.rb2
-rw-r--r--qa/qa/runtime/application_settings.rb62
-rw-r--r--qa/qa/runtime/browser.rb2
-rw-r--r--qa/qa/runtime/env.rb13
-rw-r--r--qa/qa/runtime/namespace.rb11
-rw-r--r--qa/qa/service/praefect_manager.rb6
-rw-r--r--qa/qa/specs/features/api/1_manage/rate_limits_spec.rb4
-rw-r--r--qa/qa/specs/features/api/1_manage/users_spec.rb6
-rw-r--r--qa/qa/specs/features/api/2_plan/closes_issue_via_pushing_a_commit_spec.rb2
-rw-r--r--qa/qa/specs/features/api/3_create/gitaly/automatic_failover_and_recovery_spec.rb4
-rw-r--r--qa/qa/specs/features/api/3_create/gitaly/backend_node_recovery_spec.rb2
-rw-r--r--qa/qa/specs/features/api/3_create/gitaly/changing_repository_storage_spec.rb6
-rw-r--r--qa/qa/specs/features/api/3_create/gitaly/distributed_reads_spec.rb4
-rw-r--r--qa/qa/specs/features/api/3_create/gitaly/praefect_replication_queue_spec.rb2
-rw-r--r--qa/qa/specs/features/api/3_create/repository/default_branch_name_setting_spec.rb62
-rw-r--r--qa/qa/specs/features/api/3_create/repository/files_spec.rb4
-rw-r--r--qa/qa/specs/features/api/3_create/repository/project_archive_compare_spec.rb3
-rw-r--r--qa/qa/specs/features/api/4_verify/pipeline_deletion_spec.rb20
-rw-r--r--qa/qa/specs/features/browser_ui/1_manage/group/create_group_with_mattermost_team_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/1_manage/group/transfer_project_spec.rb17
-rw-r--r--qa/qa/specs/features/browser_ui/1_manage/login/2fa_recovery_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/1_manage/login/log_in_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/1_manage/login/log_in_with_2fa_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/1_manage/login/log_into_gitlab_via_ldap_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/1_manage/login/log_into_mattermost_via_gitlab_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/1_manage/login/login_via_instance_wide_saml_sso_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/1_manage/login/register_spec.rb6
-rw-r--r--qa/qa/specs/features/browser_ui/1_manage/project/add_project_member_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/1_manage/project/create_project_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/1_manage/project/dashboard_images_spec.rb4
-rw-r--r--qa/qa/specs/features/browser_ui/1_manage/project/import_github_repo_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/1_manage/project/view_project_activity_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/2_plan/email/trigger_email_notification_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/2_plan/issue/check_mentions_for_xss_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/2_plan/issue/collapse_comments_in_discussions_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/2_plan/issue/comment_issue_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/2_plan/issue/create_issue_spec.rb6
-rw-r--r--qa/qa/specs/features/browser_ui/2_plan/issue/export_as_csv_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/2_plan/issue/filter_issue_comments_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/2_plan/issue/issue_suggestions_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/2_plan/issue/jira_issue_import_spec.rb4
-rw-r--r--qa/qa/specs/features/browser_ui/2_plan/issue/mentions_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/2_plan/issue_boards/focus_mode_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/2_plan/milestone/assign_milestone_spec.rb1
-rw-r--r--qa/qa/specs/features/browser_ui/2_plan/milestone/create_group_milestone_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/2_plan/milestone/create_project_milestone_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/2_plan/related_issues/related_issues_spec.rb45
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/design_management/add_design_content_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/jira/jira_basic_integration_spec.rb4
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/merge_request/create_merge_request_spec.rb4
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/merge_request/merge_merge_request_from_fork_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/merge_request/rebase_merge_request_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/merge_request/squash_merge_request_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/merge_request/view_merge_request_diff_patch_spec.rb4
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/repository/add_list_delete_branches_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/repository/clone_spec.rb4
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/repository/create_edit_delete_file_via_web_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/repository/move_project_create_fork_spec.rb8
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/repository/protocol_v2_push_http_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/repository/protocol_v2_push_ssh_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/repository/push_http_private_token_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/repository/push_mirroring_lfs_over_http_spec.rb45
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/repository/push_mirroring_over_http_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/repository/push_over_http_file_size_spec.rb4
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/repository/push_over_http_spec.rb4
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/repository/push_over_ssh_spec.rb4
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/repository/push_protected_branch_spec.rb4
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/repository/ssh_key_support_spec.rb4
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/repository/user_views_commit_diff_patch_spec.rb4
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/snippet/clone_push_pull_personal_snippet_spec.rb6
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/snippet/clone_push_pull_project_snippet_spec.rb6
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/snippet/create_personal_snippet_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/snippet/create_project_snippet_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/snippet/share_snippet_spec.rb63
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/web_ide/create_first_file_in_web_ide_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/web_ide/open_fork_in_web_ide_spec.rb4
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/web_ide/review_merge_request_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/wiki/project_based_content_creation_spec.rb8
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/wiki/project_based_content_manipulation_spec.rb4
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/wiki/project_based_directory_management_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/wiki/project_based_list_spec.rb4
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/wiki/project_based_page_deletion_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/4_verify/ci_variable/add_remove_ci_variable_spec.rb4
-rw-r--r--qa/qa/specs/features/browser_ui/4_verify/pipeline/create_and_process_pipeline_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/4_verify/runner/register_runner_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/4_verify/testing/view_code_coverage_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/5_package/maven_repository_spec.rb4
-rw-r--r--qa/qa/specs/features/browser_ui/5_package/npm_registry_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/6_release/deploy_key/add_deploy_key_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/6_release/deploy_token/add_deploy_token_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/6_release/pipeline/parent_child_pipelines_dependent_relationship_spec.rb4
-rw-r--r--qa/qa/specs/features/browser_ui/6_release/pipeline/parent_child_pipelines_independent_relationship_spec.rb4
-rw-r--r--qa/qa/specs/features/browser_ui/7_configure/auto_devops/auto_devops_templates_spec.rb64
-rw-r--r--qa/qa/specs/features/browser_ui/7_configure/auto_devops/create_project_with_auto_devops_spec.rb4
-rw-r--r--qa/qa/specs/features/browser_ui/7_configure/kubernetes/kubernetes_integration_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/8_monitor/all_monitor_core_features_spec.rb236
-rw-r--r--qa/qa/specs/features/browser_ui/8_monitor/cluster_with_prometheus.rb67
-rw-r--r--qa/qa/specs/features/browser_ui/non_devops/performance_bar_spec.rb2
-rw-r--r--qa/qa/specs/features/sanity/version_spec.rb37
-rw-r--r--qa/qa/support/json_formatter.rb37
-rw-r--r--qa/spec/page/validator_spec.rb2
-rw-r--r--qa/spec/runtime/application_settings_spec.rb6
-rw-r--r--qa/spec/runtime/namespace_spec.rb51
-rw-r--r--qa/spec/spec_helper.rb7
140 files changed, 1057 insertions, 473 deletions
diff --git a/qa/Gemfile b/qa/Gemfile
index 8b9592a027b..d946b22a0e0 100644
--- a/qa/Gemfile
+++ b/qa/Gemfile
@@ -17,7 +17,8 @@ gem 'knapsack', '~> 1.17'
gem 'parallel_tests', '~> 2.29'
gem 'rotp', '~> 3.1.0'
gem 'timecop', '~> 0.9.1'
-gem "parallel", "~> 1.19"
+gem 'parallel', '~> 1.19'
+gem 'rspec-parameterized', '~> 0.4.2'
group :development do
gem 'pry-byebug', '~> 3.5.1', platform: :mri
diff --git a/qa/Gemfile.lock b/qa/Gemfile.lock
index b88cc47ad94..2356c90a0af 100644
--- a/qa/Gemfile.lock
+++ b/qa/Gemfile.lock
@@ -1,12 +1,16 @@
GEM
remote: https://rubygems.org/
specs:
+ abstract_type (0.0.7)
activesupport (6.0.3.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
zeitwerk (~> 2.2, >= 2.2.2)
+ adamantium (0.2.0)
+ ice_nine (~> 0.11.0)
+ memoizable (~> 0.4.0)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
airborne (0.3.4)
@@ -15,6 +19,8 @@ GEM
rack-test (>= 1.1.0, < 2.0)
rest-client (>= 2.0.2, < 3.0)
rspec (~> 3.8)
+ ast (2.4.1)
+ binding_ninja (0.2.3)
byebug (9.1.0)
capybara (3.29.0)
addressable
@@ -29,6 +35,9 @@ GEM
launchy
childprocess (3.0.0)
coderay (1.1.2)
+ concord (0.1.5)
+ adamantium (~> 0.2.0)
+ equalizer (~> 0.0.9)
concurrent-ruby (1.1.6)
debase (0.2.4.1)
debase-ruby_core_source (>= 0.10.2)
@@ -36,6 +45,7 @@ GEM
diff-lcs (1.3)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
+ equalizer (0.0.11)
faker (1.9.3)
i18n (>= 0.7)
gitlab-qa (4.0.0)
@@ -44,10 +54,13 @@ GEM
domain_name (~> 0.5)
i18n (1.8.2)
concurrent-ruby (~> 1.0)
+ ice_nine (0.11.2)
knapsack (1.17.1)
rake
launchy (2.4.3)
addressable (~> 2.3)
+ memoizable (0.4.2)
+ thread_safe (~> 0.3, >= 0.3.1)
method_source (0.9.0)
mime-types (3.3.1)
mime-types-data (~> 3.2015)
@@ -61,6 +74,13 @@ GEM
parallel (1.17.0)
parallel_tests (2.29.0)
parallel
+ parser (2.7.1.4)
+ ast (~> 2.4.1)
+ proc_to_ast (0.1.0)
+ coderay
+ parser
+ unparser
+ procto (0.0.3)
pry (0.11.3)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
@@ -71,7 +91,7 @@ GEM
rack (2.2.2)
rack-test (1.1.0)
rack (>= 1.0, < 3)
- rake (12.3.0)
+ rake (12.3.3)
regexp_parser (1.6.0)
rest-client (2.1.0)
http-accept (>= 1.7.0, < 2.0)
@@ -91,6 +111,12 @@ GEM
rspec-mocks (3.9.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
+ rspec-parameterized (0.4.2)
+ binding_ninja (>= 0.2.3)
+ parser
+ proc_to_ast
+ rspec (>= 2.13, < 4)
+ unparser
rspec-retry (0.6.1)
rspec-core (> 3.3)
rspec-support (3.9.3)
@@ -109,6 +135,14 @@ GEM
unf (0.1.4)
unf_ext
unf_ext (0.0.7.7)
+ unparser (0.4.7)
+ abstract_type (~> 0.0.7)
+ adamantium (~> 0.2.0)
+ concord (~> 0.1.5)
+ diff-lcs (~> 1.3)
+ equalizer (~> 0.0.9)
+ parser (>= 2.6.5)
+ procto (~> 0.0.2)
xpath (3.2.0)
nokogiri (~> 1.8)
zeitwerk (2.3.0)
@@ -133,6 +167,7 @@ DEPENDENCIES
rest-client (~> 2.1.0)
rotp (~> 3.1.0)
rspec (~> 3.7)
+ rspec-parameterized (~> 0.4.2)
rspec-retry (~> 0.6.1)
rspec_junit_formatter (~> 0.4.1)
ruby-debug-ide (~> 0.7.0)
diff --git a/qa/qa.rb b/qa/qa.rb
index c6973533144..f6e0ea5d615 100644
--- a/qa/qa.rb
+++ b/qa/qa.rb
@@ -109,10 +109,6 @@ module QA
autoload :WikiPush, 'qa/resource/repository/wiki_push'
end
- module Settings
- autoload :HashedStorage, 'qa/resource/settings/hashed_storage'
- end
-
module Wiki
autoload :ProjectPage, 'qa/resource/wiki/project_page'
end
@@ -419,7 +415,6 @@ module QA
autoload :NewSession, 'qa/page/admin/new_session'
module Settings
- autoload :Repository, 'qa/page/admin/settings/repository'
autoload :General, 'qa/page/admin/settings/general'
autoload :MetricsAndProfiling, 'qa/page/admin/settings/metrics_and_profiling'
autoload :Network, 'qa/page/admin/settings/network'
@@ -427,7 +422,6 @@ module QA
module Component
autoload :IpLimits, 'qa/page/admin/settings/component/ip_limits'
autoload :OutboundRequests, 'qa/page/admin/settings/component/outbound_requests'
- autoload :RepositoryStorage, 'qa/page/admin/settings/component/repository_storage'
autoload :AccountAndLimit, 'qa/page/admin/settings/component/account_and_limit'
autoload :PerformanceBar, 'qa/page/admin/settings/component/performance_bar'
end
diff --git a/qa/qa/fixtures/metrics_dashboards/templating.yml b/qa/qa/fixtures/metrics_dashboards/templating.yml
new file mode 100644
index 00000000000..e06e7cc1247
--- /dev/null
+++ b/qa/qa/fixtures/metrics_dashboards/templating.yml
@@ -0,0 +1,43 @@
+dashboard: 'Pod metrics'
+priority: 10
+templating:
+ variables:
+ pod_name:
+ label: 'CPU POD'
+ type: custom
+ options:
+ values:
+ - value: 'runner-gitlab-runner-.*'
+ text: 'GitLab Runner'
+ - value: 'Option1'
+ text: 'Option'
+ - value: 'Option2'
+ text: 'Option'
+ - value: 'Option3'
+ text: 'Option'
+ pod_name2:
+ label: 'Memory POD'
+ type: custom
+ options:
+ values:
+ - value: 'production-postgresql-.*'
+ text: 'Postgresql'
+panel_groups:
+ - group: CPU metrics
+ panels:
+ - title: "CPU usage GitLab Runner"
+ type: "line-chart"
+ y_label: "Cores per pod"
+ metrics:
+ - id: pod_cpu_usage_seconds_total
+ query_range: 'rate(container_cpu_usage_seconds_total{pod_name=~"{{pod_name}}"}[5m])'
+ unit: "cores"
+ label: pod_name
+ - title: "Memory usage Postgresql"
+ type: "line-chart"
+ y_label: "Working set memory (MiB)"
+ metrics:
+ - id: pod_memory_working_set1
+ query_range: 'container_memory_working_set_bytes{pod_name=~"{{pod_name2}}"}/1024/1024'
+ unit: "MiB"
+ label: pod_name
diff --git a/qa/qa/git/repository.rb b/qa/qa/git/repository.rb
index e0fcb9b0599..035946b8471 100644
--- a/qa/qa/git/repository.rb
+++ b/qa/qa/git/repository.rb
@@ -118,6 +118,10 @@ module QA
run(%Q{git config user.signingkey #{@gpg_key_id} && git config gpg.program $(command -v gpg) && git commit -S -m "#{message}"}).to_s
end
+ def current_branch
+ run("git rev-parse --abbrev-ref HEAD").to_s
+ end
+
def push_changes(branch = 'master')
run("git push #{uri} #{branch}", max_attempts: 3).to_s
end
diff --git a/qa/qa/page/admin/settings/component/repository_storage.rb b/qa/qa/page/admin/settings/component/repository_storage.rb
deleted file mode 100644
index 2ed0cd73aa3..00000000000
--- a/qa/qa/page/admin/settings/component/repository_storage.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-# frozen_string_literal: true
-
-module QA
- module Page
- module Admin
- module Settings
- module Component
- class RepositoryStorage < Page::Base
- view 'app/views/admin/application_settings/_repository_storage.html.haml' do
- element :hashed_storage_checkbox
- element :save_changes_button
- end
-
- def enable_hashed_storage
- check_element :hashed_storage_checkbox
- end
-
- def save_settings
- click_element :save_changes_button
- end
- end
- end
- end
- end
- end
-end
diff --git a/qa/qa/page/admin/settings/repository.rb b/qa/qa/page/admin/settings/repository.rb
deleted file mode 100644
index 82321765e63..00000000000
--- a/qa/qa/page/admin/settings/repository.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-# frozen_string_literal: true
-
-module QA
- module Page
- module Admin
- module Settings
- class Repository < Page::Base
- include QA::Page::Settings::Common
-
- view 'app/views/admin/application_settings/repository.html.haml' do
- element :repository_storage_settings_content
- end
-
- def expand_repository_storage(&block)
- expand_content(:repository_storage_settings_content) do
- Component::RepositoryStorage.perform(&block)
- end
- end
- end
- end
- end
- end
-end
diff --git a/qa/qa/page/component/issue_board/show.rb b/qa/qa/page/component/issue_board/show.rb
index 9e843630115..15c1c25cbf9 100644
--- a/qa/qa/page/component/issue_board/show.rb
+++ b/qa/qa/page/component/issue_board/show.rb
@@ -96,6 +96,8 @@ module QA
click_boards_config_button
click_element(:labels_edit_button)
find_element(:labels_dropdown_content).find('li', text: label).click
+ # Clicking the edit button again closes the dropdown and allows the save button to be clicked
+ click_element(:labels_edit_button)
click_element(:save_changes_button)
wait_boards_list_finish_loading
end
diff --git a/qa/qa/page/component/project_selector.rb b/qa/qa/page/component/project_selector.rb
index 80ed6b8e53b..54bd95c5422 100644
--- a/qa/qa/page/component/project_selector.rb
+++ b/qa/qa/page/component/project_selector.rb
@@ -20,6 +20,9 @@ module QA
end
def select_project
+ wait_until(sleep_interval: 2, reload: false) do
+ has_element? :project_list_item
+ end
click_element :project_list_item
end
end
diff --git a/qa/qa/page/component/select2.rb b/qa/qa/page/component/select2.rb
index b8beb64b6bd..761bbb17168 100644
--- a/qa/qa/page/component/select2.rb
+++ b/qa/qa/page/component/select2.rb
@@ -8,6 +8,10 @@ module QA
find('.select2-result-label', text: item_text, match: :prefer_exact).click
end
+ def has_item?(item_text)
+ has_css?('.select2-result-label', text: item_text, match: :prefer_exact)
+ end
+
def current_selection
find('.select2-chosen').text
end
@@ -25,8 +29,12 @@ module QA
end
def search_and_select(item_text)
+ QA::Runtime::Logger.info "Searching and selecting: #{item_text}"
+
search_item(item_text)
+ raise QA::Page::Base::ElementNotFound, %Q(Couldn't find option named "#{item_text}") unless has_item?(item_text)
+
select_item(item_text)
end
diff --git a/qa/qa/page/component/snippet.rb b/qa/qa/page/component/snippet.rb
index b84166ccefd..2776b6c078e 100644
--- a/qa/qa/page/component/snippet.rb
+++ b/qa/qa/page/component/snippet.rb
@@ -40,6 +40,7 @@ module QA
base.view 'app/assets/javascripts/snippets/components/show.vue' do
element :clone_button
+ element :snippet_embed_dropdown
end
base.view 'app/assets/javascripts/vue_shared/components/clone_dropdown.vue' do
@@ -73,6 +74,10 @@ module QA
element :more_actions_dropdown
element :delete_comment_button
end
+
+ base.view 'app/assets/javascripts/snippets/components/embed_dropdown.vue' do
+ element :copy_button
+ end
end
def has_snippet_title?(snippet_title)
@@ -105,6 +110,10 @@ module QA
end
end
+ def has_embed_dropdown?
+ has_element?(:snippet_embed_dropdown)
+ end
+
def click_edit_button
click_element(:snippet_action_button, action: 'Edit')
end
@@ -129,6 +138,11 @@ module QA
Git::Location.new(find_element(:copy_ssh_url_button)['data-clipboard-text']).uri.to_s
end
+ def get_sharing_link
+ click_element(:snippet_embed_dropdown)
+ find_element(:copy_button, action: 'Share')['data-clipboard-text']
+ end
+
def add_comment(comment)
fill_element(:note_field, comment)
click_element(:comment_button)
diff --git a/qa/qa/page/dashboard/snippet/edit.rb b/qa/qa/page/dashboard/snippet/edit.rb
index c650b8e4f90..7802a680c25 100644
--- a/qa/qa/page/dashboard/snippet/edit.rb
+++ b/qa/qa/page/dashboard/snippet/edit.rb
@@ -19,6 +19,10 @@ module QA
text_area.has_text?(content) # wait for changes to take effect
end
+ def change_visibility_to(visibility_type)
+ choose(visibility_type)
+ end
+
def save_changes
click_element(:submit_button, Page::Dashboard::Snippet::Show)
end
diff --git a/qa/qa/page/main/sign_up.rb b/qa/qa/page/main/sign_up.rb
index c47d2ce9c74..b7808afb209 100644
--- a/qa/qa/page/main/sign_up.rb
+++ b/qa/qa/page/main/sign_up.rb
@@ -8,23 +8,27 @@ module QA
element :new_user_name_field
element :new_user_username_field
element :new_user_email_field
- element :new_user_email_confirmation_field
element :new_user_password_field
element :new_user_register_button
element :new_user_accept_terms_checkbox
end
+ view 'app/views/registrations/welcome.html.haml' do
+ element :get_started_button
+ end
+
def sign_up!(user)
fill_element :new_user_name_field, user.name
fill_element :new_user_username_field, user.username
fill_element :new_user_email_field, user.email
- fill_element :new_user_email_confirmation_field, user.email
fill_element :new_user_password_field, user.password
check_element :new_user_accept_terms_checkbox if has_element?(:new_user_accept_terms_checkbox)
signed_in = retry_until do
- click_element :new_user_register_button
+ click_element :new_user_register_button if has_element?(:new_user_register_button)
+
+ click_element :get_started_button if has_element?(:get_started_button)
Page::Main::Menu.perform(&:has_personal_area?)
end
@@ -35,3 +39,5 @@ module QA
end
end
end
+
+QA::Page::Main::SignUp.prepend_if_ee('QA::EE::Page::Main::SignUp')
diff --git a/qa/qa/page/merge_request/show.rb b/qa/qa/page/merge_request/show.rb
index 906ad490bb1..0b80ba84fa4 100644
--- a/qa/qa/page/merge_request/show.rb
+++ b/qa/qa/page/merge_request/show.rb
@@ -8,7 +8,7 @@ module QA
include Page::Component::Issuable::Sidebar
view 'app/assets/javascripts/vue_merge_request_widget/components/mr_widget_header.vue' do
- element :dropdown_toggle
+ element :download_dropdown
element :download_email_patches
element :download_plain_diff
element :open_in_web_ide_button
@@ -53,10 +53,6 @@ module QA
element :diffs_tab
end
- view 'app/assets/javascripts/diffs/components/diff_table_cell.vue' do
- element :diff_comment
- end
-
view 'app/assets/javascripts/diffs/components/inline_diff_table_row.vue' do
element :new_diff_line
end
@@ -131,7 +127,7 @@ module QA
def add_comment_to_diff(text)
wait_until(sleep_interval: 5) do
- has_text?("No newline at end of file")
+ has_css?('a[data-linenumber="1"]')
end
all_elements(:new_diff_line, minimum: 1).first.hover
click_element(:diff_comment)
@@ -255,12 +251,12 @@ module QA
end
def view_email_patches
- click_element :dropdown_toggle
+ click_element :download_dropdown
visit_link_in_element(:download_email_patches)
end
def view_plain_diff
- click_element :dropdown_toggle
+ click_element :download_dropdown
visit_link_in_element(:download_plain_diff)
end
@@ -275,7 +271,8 @@ module QA
end
def click_open_in_web_ide
- click_element :open_in_web_ide_button
+ click_element(:open_in_web_ide_button)
+ wait_for_requests
end
end
end
diff --git a/qa/qa/page/profile/accounts/show.rb b/qa/qa/page/profile/accounts/show.rb
index eec4efe1734..cf7f7d80cfa 100644
--- a/qa/qa/page/profile/accounts/show.rb
+++ b/qa/qa/page/profile/accounts/show.rb
@@ -11,17 +11,14 @@ module QA
view 'app/assets/javascripts/profile/account/components/delete_account_modal.vue' do
element :password_confirmation_field
- end
-
- view 'app/assets/javascripts/vue_shared/components/deprecated_modal.vue' do
- element :save_changes_button
+ element :confirm_delete_account_button
end
def delete_account(password)
click_element(:delete_account_button)
find_element(:password_confirmation_field).set password
- click_element(:save_changes_button)
+ click_element(:confirm_delete_account_button)
end
end
end
diff --git a/qa/qa/page/project/issue/index.rb b/qa/qa/page/project/issue/index.rb
index 0a64f01fe98..0b47bec2cf1 100644
--- a/qa/qa/page/project/issue/index.rb
+++ b/qa/qa/page/project/issue/index.rb
@@ -5,7 +5,7 @@ module QA
module Project
module Issue
class Index < Page::Base
- view 'app/assets/javascripts/issuables_list/components/issuable.vue' do
+ view 'app/assets/javascripts/issues_list/components/issuable.vue' do
element :issue_container
element :issue_link
end
diff --git a/qa/qa/page/project/issue/show.rb b/qa/qa/page/project/issue/show.rb
index 5778d0218a7..826acaa2e0a 100644
--- a/qa/qa/page/project/issue/show.rb
+++ b/qa/qa/page/project/issue/show.rb
@@ -38,8 +38,42 @@ module QA
element :new_note_form, 'attr: :note' # rubocop:disable QA/ElementWithPattern
end
+ view 'app/assets/javascripts/related_issues/components/add_issuable_form.vue' do
+ element :add_issue_button
+ end
+
+ view 'app/assets/javascripts/related_issues/components/related_issuable_input.vue' do
+ element :add_issue_input
+ end
+
+ view 'app/assets/javascripts/related_issues/components/related_issues_block.vue' do
+ element :related_issues_plus_button
+ end
+
+ view 'app/assets/javascripts/related_issues/components/related_issues_list.vue' do
+ element :related_issuable_item
+ element :related_issues_loading_icon
+ end
+
+ 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)
+ end
+
+ def related_issuable_item
+ find_element(:related_issuable_item)
+ end
+
+ def wait_for_related_issues_to_load
+ has_no_element?(:related_issues_loading_icon, wait: QA::Support::Repeater::DEFAULT_MAX_WAIT_TIME)
+ end
+
def click_remove_related_issue_button
- click_element(:remove_related_issue_button)
+ retry_until(sleep_interval: 5) do
+ click_element(:remove_related_issue_button)
+ has_no_element?(:remove_related_issue_button, wait: QA::Support::Repeater::DEFAULT_MAX_WAIT_TIME)
+ end
end
def click_close_issue_button
diff --git a/qa/qa/page/project/job/show.rb b/qa/qa/page/project/job/show.rb
index 6243dc92b45..6a657b4ab39 100644
--- a/qa/qa/page/project/job/show.rb
+++ b/qa/qa/page/project/job/show.rb
@@ -19,6 +19,10 @@ module QA
element :retry_button
end
+ view 'app/assets/javascripts/jobs/components/artifacts_block.vue' do
+ element :browse_artifacts_button
+ end
+
def successful?(timeout: 60)
raise "Timed out waiting for the build trace to load" unless loaded?
raise "Timed out waiting for the status to be a valid completed state" unless completed?(timeout: timeout)
@@ -42,6 +46,14 @@ module QA
result
end
+ def has_browse_button?
+ has_element? :browse_artifacts_button
+ end
+
+ def click_browse_button
+ click_element :browse_artifacts_button
+ end
+
def retry!
click_element :retry_button
end
diff --git a/qa/qa/page/project/operations/kubernetes/add.rb b/qa/qa/page/project/operations/kubernetes/add.rb
index 785791652ba..9a6ea99ac18 100644
--- a/qa/qa/page/project/operations/kubernetes/add.rb
+++ b/qa/qa/page/project/operations/kubernetes/add.rb
@@ -7,11 +7,11 @@ module QA
module Kubernetes
class Add < Page::Base
view 'app/views/clusters/clusters/new.html.haml' do
- element :add_existing_cluster_button, "Add existing cluster" # rubocop:disable QA/ElementWithPattern
+ element :add_existing_cluster_tab
end
def add_existing_cluster
- click_on 'Add existing cluster'
+ click_element(:add_existing_cluster_tab)
end
end
end
diff --git a/qa/qa/page/project/operations/metrics/show.rb b/qa/qa/page/project/operations/metrics/show.rb
index 22d22af5a9a..35dfd92f119 100644
--- a/qa/qa/page/project/operations/metrics/show.rb
+++ b/qa/qa/page/project/operations/metrics/show.rb
@@ -41,6 +41,11 @@ module QA
element :quick_range_item
end
+ view 'app/assets/javascripts/monitoring/components/variables_section.vue' do
+ element :variables_content
+ element :variable_item
+ end
+
def wait_for_metrics
wait_for_data
return if has_metrics?
@@ -73,6 +78,14 @@ module QA
within('.modal-content') { click_button(class: 'btn-success') }
end
+ def select_dashboard(dashboard_name)
+ click_element :dashboards_filter_dropdown
+
+ within_element :dashboards_filter_dropdown do
+ click_on dashboard_name
+ end
+ end
+
def filter_environment(environment = 'production')
click_element :environments_dropdown
@@ -97,6 +110,18 @@ module QA
end
end
+ def has_templating_variable?(variable)
+ within_element :variables_content do
+ has_element?(:variable_item, text: variable)
+ end
+ end
+
+ def has_template_metric?(metric)
+ within_element :prometheus_graphs do
+ has_text?(metric)
+ end
+ end
+
private
def wait_for_data
diff --git a/qa/qa/page/project/packages/index.rb b/qa/qa/page/project/packages/index.rb
index 3f8cc6035bc..6d55d1d04b6 100644
--- a/qa/qa/page/project/packages/index.rb
+++ b/qa/qa/page/project/packages/index.rb
@@ -5,7 +5,7 @@ module QA
module Project
module Packages
class Index < QA::Page::Base
- view 'app/views/projects/packages/packages/_legacy_package_list.html.haml' do
+ view 'app/assets/javascripts/packages/shared/components/package_list_row.vue' do
element :package_row
element :package_link
end
diff --git a/qa/qa/page/project/pipeline/show.rb b/qa/qa/page/project/pipeline/show.rb
index 43003fe1953..57ab7fb4480 100644
--- a/qa/qa/page/project/pipeline/show.rb
+++ b/qa/qa/page/project/pipeline/show.rb
@@ -21,7 +21,7 @@ module QA
end
view 'app/assets/javascripts/pipelines/components/graph/linked_pipeline.vue' do
- element :linked_pipeline_button
+ element :expand_pipeline_button
element :child_pipeline
end
@@ -69,8 +69,10 @@ module QA
click_element(:job_link, text: job_name)
end
- def click_linked_job(project_name)
- click_element(:linked_pipeline_button, text: /#{project_name}/)
+ def expand_child_pipeline
+ within_element(:child_pipeline) do
+ click_element(:expand_pipeline_button)
+ end
end
def click_on_first_job
diff --git a/qa/qa/page/project/settings/advanced.rb b/qa/qa/page/project/settings/advanced.rb
index 960d6c221b5..97519c3906c 100644
--- a/qa/qa/page/project/settings/advanced.rb
+++ b/qa/qa/page/project/settings/advanced.rb
@@ -38,20 +38,16 @@ module QA
click_element :change_path_button
end
- def select_transfer_option(namespace)
- search_and_select(namespace)
- end
-
def transfer_project!(project_name, namespace)
- # Retry added here due to seldom seen inconsistent UI state issue:
- # https://gitlab.com/gitlab-org/gitlab/-/issues/231242
- retry_on_exception do
- click_element_coordinates(:archive_project_content)
- expand_select_list
- # Workaround for a failure to search when there are no spaces around the /
- # https://gitlab.com/gitlab-org/gitlab/-/issues/218965
- select_transfer_option(namespace.gsub(/([^\s])\/([^\s])/, '\1 / \2'))
- end
+ QA::Runtime::Logger.info "Transferring project: #{project_name} to namespace: #{namespace}"
+
+ click_element_coordinates(:archive_project_content)
+
+ expand_select_list
+
+ # Workaround for a failure to search when there are no spaces around the /
+ # https://gitlab.com/gitlab-org/gitlab/-/issues/218965
+ search_and_select(namespace.gsub(/([^\s])\/([^\s])/, '\1 / \2'))
click_element(:transfer_button)
fill_confirmation_text(project_name)
diff --git a/qa/qa/page/project/settings/main.rb b/qa/qa/page/project/settings/main.rb
index 3cd558691e1..4db66543a25 100644
--- a/qa/qa/page/project/settings/main.rb
+++ b/qa/qa/page/project/settings/main.rb
@@ -8,6 +8,7 @@ module QA
include QA::Page::Settings::Common
include Component::Select2
include SubMenus::Project
+ include Component::Breadcrumbs
view 'app/views/projects/edit.html.haml' do
element :advanced_settings
diff --git a/qa/qa/page/project/settings/merge_request.rb b/qa/qa/page/project/settings/merge_request.rb
index 0092426b31f..ec8d73df1b3 100644
--- a/qa/qa/page/project/settings/merge_request.rb
+++ b/qa/qa/page/project/settings/merge_request.rb
@@ -15,6 +15,10 @@ module QA
element :radio_button_merge_ff
end
+ view 'app/views/projects/_merge_request_merge_checks_settings.html.haml' do
+ element :allow_merge_if_all_discussions_are_resolved_checkbox
+ end
+
def click_save_changes
click_element :save_merge_request_changes
end
@@ -23,6 +27,11 @@ module QA
click_element :radio_button_merge_ff
click_save_changes
end
+
+ def enable_merge_if_all_disscussions_are_resolved
+ click_element :allow_merge_if_all_discussions_are_resolved_checkbox
+ click_save_changes
+ end
end
end
end
diff --git a/qa/qa/page/project/settings/mirroring_repositories.rb b/qa/qa/page/project/settings/mirroring_repositories.rb
index 517163a22f1..ddace6d0533 100644
--- a/qa/qa/page/project/settings/mirroring_repositories.rb
+++ b/qa/qa/page/project/settings/mirroring_repositories.rb
@@ -77,7 +77,7 @@ module QA
# The host key detection process is interrupted if we navigate away
# from the page before the fingerprint appears.
- find_element(:fingerprints_list, text: /.*/)
+ find_element(:fingerprints_list, text: /.*/, wait: 60)
end
def mirror_repository
diff --git a/qa/qa/page/project/settings/services/jira.rb b/qa/qa/page/project/settings/services/jira.rb
index 75baedb1b0f..eaa3e90db78 100644
--- a/qa/qa/page/project/settings/services/jira.rb
+++ b/qa/qa/page/project/settings/services/jira.rb
@@ -13,7 +13,7 @@ module QA
element :service_jira_issue_transition_id_field, ':data-qa-selector="`${fieldId}_field`"' # rubocop:disable QA/ElementWithPattern
end
- view 'app/helpers/services_helper.rb' do
+ view 'app/assets/javascripts/integrations/edit/components/integration_form.vue' do
element :save_changes_button
end
diff --git a/qa/qa/page/project/show.rb b/qa/qa/page/project/show.rb
index 22c2ed2a0c2..c607b35005e 100644
--- a/qa/qa/page/project/show.rb
+++ b/qa/qa/page/project/show.rb
@@ -56,7 +56,7 @@ module QA
element :new_file_option
end
- view 'app/assets/javascripts/repository/components/web_ide_link.vue' do
+ view 'app/assets/javascripts/vue_shared/components/web_ide_link.vue' do
element :web_ide_button
end
diff --git a/qa/qa/page/project/web_ide/edit.rb b/qa/qa/page/project/web_ide/edit.rb
index b962b0c673b..56c8d343cf5 100644
--- a/qa/qa/page/project/web_ide/edit.rb
+++ b/qa/qa/page/project/web_ide/edit.rb
@@ -10,6 +10,11 @@ module QA
view 'app/assets/javascripts/ide/components/activity_bar.vue' do
element :commit_mode_tab
+ element :edit_mode_tab
+ end
+
+ view 'app/assets/javascripts/ide/components/ide_status_bar.vue' do
+ element :commit_sha_content
end
view 'app/assets/javascripts/ide/components/ide_tree.vue' do
@@ -104,11 +109,19 @@ module QA
end
end
+ def commit_sha
+ return unless has_element?(:commit_sha_content, wait: 0)
+
+ find_element(:commit_sha_content).text
+ end
+
def commit_changes(open_merge_request: false)
# Clicking :begin_commit_button switches from the
# edit to the commit view
- click_element :begin_commit_button
- active_element? :commit_mode_tab
+ click_element(:begin_commit_button)
+ active_element?(:commit_mode_tab)
+
+ original_commit = commit_sha
# After clicking :begin_commit_button, there is an animation
# that hides :begin_commit_button and shows :commit_button
@@ -126,16 +139,17 @@ module QA
# Click :commit_button and keep retrying just in case part of the
# animation is still in process even when the buttons have the
# expected visibility.
- commit_success_msg_shown = retry_until(sleep_interval: 5) do
+ commit_success = retry_until(sleep_interval: 5) do
click_element(:commit_to_current_branch_radio) if has_element?(:commit_to_current_branch_radio)
click_element(:commit_button) if has_element?(:commit_button)
- wait_until(reload: false) do
- has_text?('Your changes have been committed')
+ # If this is the first commit, the commit SHA only appears after reloading
+ wait_until(reload: true) do
+ active_element?(:edit_mode_tab) && commit_sha != original_commit
end
end
- raise "The changes do not appear to have been committed successfully." unless commit_success_msg_shown
+ raise "The changes do not appear to have been committed successfully." unless commit_success
end
end
diff --git a/qa/qa/page/sub_menus/common.rb b/qa/qa/page/sub_menus/common.rb
index 0eb1b100bd7..2efeeb062e8 100644
--- a/qa/qa/page/sub_menus/common.rb
+++ b/qa/qa/page/sub_menus/common.rb
@@ -12,6 +12,8 @@ module QA
end
def within_sidebar
+ wait_for_requests
+
within_element(sidebar_element) do
yield
end
diff --git a/qa/qa/resource/api_fabricator.rb b/qa/qa/resource/api_fabricator.rb
index babdfc96265..d0cbab70983 100644
--- a/qa/qa/resource/api_fabricator.rb
+++ b/qa/qa/resource/api_fabricator.rb
@@ -18,7 +18,7 @@ module QA
attr_reader :api_resource, :api_response
attr_writer :api_client
- attr_accessor :user
+ attr_accessor :api_user
def api_support?
respond_to?(:api_get_path) &&
@@ -120,7 +120,7 @@ module QA
def api_client
@api_client ||= begin
- Runtime::API::Client.new(:gitlab, is_new_session: !current_url.start_with?('http'), user: user)
+ Runtime::API::Client.new(:gitlab, is_new_session: !current_url.start_with?('http'), user: api_user)
end
end
diff --git a/qa/qa/resource/fork.rb b/qa/qa/resource/fork.rb
index 854dd92e89c..d0aaaae6a11 100644
--- a/qa/qa/resource/fork.rb
+++ b/qa/qa/resource/fork.rb
@@ -56,6 +56,8 @@ module QA
def fabricate_via_api!
populate(:upstream, :user)
+ @api_client = Runtime::API::Client.new(:gitlab, is_new_session: false, user: user)
+
Runtime::Logger.debug("Forking project #{upstream.name} to namespace #{user.username}...")
super
wait_until_forked
@@ -73,7 +75,7 @@ module QA
def api_post_body
{
- namespace: user.username,
+ namespace_path: user.username,
name: name,
path: name
}
diff --git a/qa/qa/resource/group.rb b/qa/qa/resource/group.rb
index ed9acb6edb7..1cb33a7c71c 100644
--- a/qa/qa/resource/group.rb
+++ b/qa/qa/resource/group.rb
@@ -9,7 +9,6 @@ module QA
attribute :sandbox do
Sandbox.fabricate_via_api! do |sandbox|
- sandbox.user = user
sandbox.api_client = api_client
end
end
diff --git a/qa/qa/resource/project.rb b/qa/qa/resource/project.rb
index eba8ada50ab..0025ebb2fd5 100644
--- a/qa/qa/resource/project.rb
+++ b/qa/qa/resource/project.rb
@@ -12,7 +12,10 @@ module QA
attr_accessor :repository_storage # requires admin access
attr_writer :initialize_with_readme
attr_writer :auto_devops_enabled
+ attr_writer :github_personal_access_token
+ attr_writer :github_repository_path
+ attribute :default_branch
attribute :id
attribute :name
attribute :add_name_uuid
@@ -21,6 +24,7 @@ module QA
attribute :runners_token
attribute :visibility
attribute :template_name
+ attribute :import
attribute :group do
Group.fabricate!
@@ -56,6 +60,7 @@ module QA
@auto_devops_enabled = false
@visibility = :public
@template_name = nil
+ @import = false
self.name = "the_awesome_project"
end
@@ -65,6 +70,8 @@ module QA
end
def fabricate!
+ return if @import
+
unless @standalone
group.visit!
Page::Group::Show.perform(&:go_to_new_project)
diff --git a/qa/qa/resource/project_imported_from_github.rb b/qa/qa/resource/project_imported_from_github.rb
index e5ecaeae139..df28d63b113 100644
--- a/qa/qa/resource/project_imported_from_github.rb
+++ b/qa/qa/resource/project_imported_from_github.rb
@@ -4,28 +4,25 @@ require 'securerandom'
module QA
module Resource
- class ProjectImportedFromGithub < Base
- attr_accessor :name
- attr_writer :personal_access_token, :github_repository_path
-
- attribute :group do
- Group.fabricate!
- end
-
+ class ProjectImportedFromGithub < Resource::Project
def fabricate!
+ super
+
group.visit!
Page::Group::Show.perform(&:go_to_new_project)
-
- Page::Project::New.perform(&:click_import_project)
-
+ go_to_import_tab
Page::Project::New.perform(&:click_github_link)
Page::Project::Import::Github.perform do |import_page|
- import_page.add_personal_access_token(@personal_access_token)
+ import_page.add_personal_access_token(@github_personal_access_token)
import_page.import!(@github_repository_path, @name)
end
end
+
+ def go_to_import_tab
+ Page::Project::New.perform(&:click_import_project)
+ end
end
end
end
diff --git a/qa/qa/resource/settings/hashed_storage.rb b/qa/qa/resource/settings/hashed_storage.rb
deleted file mode 100644
index 40c06768ffe..00000000000
--- a/qa/qa/resource/settings/hashed_storage.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-# frozen_string_literal: true
-
-module QA
- module Resource
- module Settings
- class HashedStorage < Base
- def fabricate!(*traits)
- raise ArgumentError unless traits.include?(:enabled)
-
- Page::Main::Login.perform(&:sign_in_using_credentials)
- Page::Main::Menu.perform(&:go_to_admin_area)
- Page::Admin::Menu.perform(&:go_to_repository_settings)
-
- Page::Admin::Settings::Repository.perform do |setting|
- setting.expand_repository_storage do |page|
- page.enable_hashed_storage
- page.save_settings
- end
- end
-
- QA::Page::Main::Menu.perform(&:sign_out)
- end
- end
- end
- end
-end
diff --git a/qa/qa/resource/user.rb b/qa/qa/resource/user.rb
index 462da743318..9768fc154a7 100644
--- a/qa/qa/resource/user.rb
+++ b/qa/qa/resource/user.rb
@@ -148,7 +148,7 @@ module QA
end
def fetching_own_data?
- user&.username == username || Runtime::User.username == username
+ api_user&.username == username || Runtime::User.username == username
end
end
end
diff --git a/qa/qa/runtime/application_settings.rb b/qa/qa/runtime/application_settings.rb
index df6323f9a48..c78f4258721 100644
--- a/qa/qa/runtime/application_settings.rb
+++ b/qa/qa/runtime/application_settings.rb
@@ -2,43 +2,39 @@
module QA
module Runtime
- module ApplicationSettings
- extend self
- extend Support::Api
-
- APPLICATION_SETTINGS_PATH = '/application/settings'
-
- # Set a GitLab application setting
- # Example:
- # #set({ allow_local_requests_from_web_hooks_and_services: true })
- # #set(allow_local_requests_from_web_hooks_and_services: true)
- # https://docs.gitlab.com/ee/api/settings.html
- def set_application_settings(**application_settings)
- QA::Runtime::Logger.info("Setting application settings: #{application_settings}")
- r = put(Runtime::API::Request.new(api_client, APPLICATION_SETTINGS_PATH).url, **application_settings)
- raise "Couldn't set application settings #{application_settings.inspect}" unless r.code == QA::Support::Api::HTTP_STATUS_OK
- end
-
- def get_application_settings
- parse_body(get(Runtime::API::Request.new(api_client, APPLICATION_SETTINGS_PATH).url))
- end
-
- private
+ class ApplicationSettings
+ class << self
+ include Support::Api
+
+ APPLICATION_SETTINGS_PATH = '/application/settings'
+
+ # Set a GitLab application setting
+ # Example:
+ # #set({ allow_local_requests_from_web_hooks_and_services: true })
+ # #set(allow_local_requests_from_web_hooks_and_services: true)
+ # https://docs.gitlab.com/ee/api/settings.html
+ def set_application_settings(**application_settings)
+ @original_application_settings = get_application_settings
+
+ QA::Runtime::Logger.info("Setting application settings: #{application_settings}")
+ r = put(Runtime::API::Request.new(api_client, APPLICATION_SETTINGS_PATH).url, **application_settings)
+ raise "Couldn't set application settings #{application_settings.inspect}" unless r.code == QA::Support::Api::HTTP_STATUS_OK
+ end
- def api_client
- @api_client ||= begin
- return Runtime::API::Client.new(:gitlab, personal_access_token: Runtime::Env.admin_personal_access_token) if Runtime::Env.admin_personal_access_token
+ def get_application_settings
+ parse_body(get(Runtime::API::Request.new(api_client, APPLICATION_SETTINGS_PATH).url))
+ end
- user = Resource::User.fabricate_via_api! do |user|
- user.username = Runtime::User.admin_username
- user.password = Runtime::User.admin_password
- end
+ def restore_application_settings(*application_settings_keys)
+ set_application_settings(@original_application_settings.slice(*application_settings_keys))
+ end
- unless user.admin?
- raise "Administrator access is required to set application settings. User '#{user.username}' is not an administrator."
- end
+ private
- Runtime::API::Client.new(:gitlab, user: user)
+ def api_client
+ @api_client ||= Runtime::API::Client.as_admin
+ rescue AuthorizationError => e
+ raise "Administrator access is required to set application settings. #{e.message}"
end
end
end
diff --git a/qa/qa/runtime/browser.rb b/qa/qa/runtime/browser.rb
index adb496e9ef0..2bd0c6ae00e 100644
--- a/qa/qa/runtime/browser.rb
+++ b/qa/qa/runtime/browser.rb
@@ -133,7 +133,7 @@ module QA
Capybara::Screenshot.append_timestamp = false
Capybara::Screenshot.register_filename_prefix_formatter(:rspec) do |example|
- ::File.join(QA::Runtime::Namespace.name, example.full_description.downcase.parameterize(separator: "_")[0..99])
+ ::File.join(QA::Runtime::Namespace.name(reset_cache: false), example.full_description.downcase.parameterize(separator: "_")[0..99])
end
Capybara.configure do |config|
diff --git a/qa/qa/runtime/env.rb b/qa/qa/runtime/env.rb
index cbfce95d409..c254be4800b 100644
--- a/qa/qa/runtime/env.rb
+++ b/qa/qa/runtime/env.rb
@@ -268,6 +268,10 @@ module QA
ENV['JIRA_HOSTNAME']
end
+ def cache_namespace_name?
+ enabled?(ENV['CACHE_NAMESPACE_NAME'], default: true)
+ end
+
def knapsack?
!!(ENV['KNAPSACK_GENERATE_REPORT'] || ENV['KNAPSACK_REPORT_PATH'] || ENV['KNAPSACK_TEST_FILE_PATTERN'])
end
@@ -364,6 +368,15 @@ module QA
ENV['MAILHOG_HOSTNAME']
end
+ # Get the version of GitLab currently being tested against
+ # @return String Version
+ # @example
+ # > Env.deploy_version
+ # #=> 13.3.4-ee.0
+ def deploy_version
+ ENV['DEPLOY_VERSION']
+ end
+
private
def remote_grid_credentials
diff --git a/qa/qa/runtime/namespace.rb b/qa/qa/runtime/namespace.rb
index 565bfd43f12..6b4cbe6af6e 100644
--- a/qa/qa/runtime/namespace.rb
+++ b/qa/qa/runtime/namespace.rb
@@ -9,14 +9,19 @@ module QA
@time ||= Time.now
end
- def name
+ def name(reset_cache: !Runtime::Env.cache_namespace_name?)
# If any changes are made to the name tag, following script has to be considered:
# https://ops.gitlab.net/gitlab-com/gl-infra/traffic-generator/blob/master/bin/janitor.bash
- @name ||= Runtime::Env.namespace_name || "qa-test-#{time.strftime('%Y-%m-%d-%H-%M-%S')}-#{SecureRandom.hex(8)}"
+ reset_name_cache if reset_cache
+ @name ||= Runtime::Env.namespace_name || "qa-test-#{time.strftime('%Y-%m-%d-%H-%M-%S')}-#{SecureRandom.hex(8)}" # rubocop:disable Gitlab/ModuleWithInstanceVariables
+ end
+
+ def reset_name_cache
+ @name = nil # rubocop:disable Gitlab/ModuleWithInstanceVariables
end
def path
- "#{sandbox_name}/#{name}"
+ "#{sandbox_name}/#{name(reset_cache: false)}"
end
def sandbox_name
diff --git a/qa/qa/service/praefect_manager.rb b/qa/qa/service/praefect_manager.rb
index 1f1761100c8..fb2019394b4 100644
--- a/qa/qa/service/praefect_manager.rb
+++ b/qa/qa/service/praefect_manager.rb
@@ -376,7 +376,11 @@ module QA
wait_until_shell_command("docker exec #{@gitlab} bash -c 'tail -n 50 /var/log/gitlab/gitaly/current'") do |line|
log = JSON.parse(line)
- break log['grpc.request.repoPath'] if log['grpc.method'] == 'RenameRepository' && log['grpc.request.repoStorage'] == storage && !log['grpc.request.repoPath'].include?('wiki')
+ if (log['grpc.method'] == 'RenameRepository' || log['grpc.method'] == 'RemoveRepository') &&
+ log['grpc.request.repoStorage'] == storage &&
+ !log['grpc.request.repoPath'].include?('wiki')
+ break log['grpc.request.repoPath']
+ end
rescue JSON::ParserError
# Ignore lines that can't be parsed as JSON
end
diff --git a/qa/qa/specs/features/api/1_manage/rate_limits_spec.rb b/qa/qa/specs/features/api/1_manage/rate_limits_spec.rb
index d836bdde9d5..ae1c3a9fbcc 100644
--- a/qa/qa/specs/features/api/1_manage/rate_limits_spec.rb
+++ b/qa/qa/specs/features/api/1_manage/rate_limits_spec.rb
@@ -3,12 +3,12 @@
require 'airborne'
module QA
- RSpec.describe 'Manage with IP rate limits', :requires_admin do
+ RSpec.describe 'Manage with IP rate limits', :requires_admin, :skip_live_env do
describe 'Users API' do
let(:api_client) { Runtime::API::Client.new(:gitlab, ip_limits: true) }
let(:request) { Runtime::API::Request.new(api_client, '/users') }
- it 'GET /users' do
+ it 'GET /users', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/441' do
5.times do
get request.url
expect_status(200)
diff --git a/qa/qa/specs/features/api/1_manage/users_spec.rb b/qa/qa/specs/features/api/1_manage/users_spec.rb
index 0bd52cbdaa4..bca0e1f67e8 100644
--- a/qa/qa/specs/features/api/1_manage/users_spec.rb
+++ b/qa/qa/specs/features/api/1_manage/users_spec.rb
@@ -8,13 +8,13 @@ module QA
let(:api_client) { Runtime::API::Client.new(:gitlab) }
let(:request) { Runtime::API::Request.new(api_client, '/users') }
- it 'GET /users' do
+ it 'GET /users', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/460' do
get request.url
expect_status(200)
end
- it 'GET /users/:username with a valid username' do
+ it 'GET /users/:username with a valid username', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/480' do
get request.url, { params: { username: Runtime::User.username } }
expect_status(200)
@@ -23,7 +23,7 @@ module QA
)
end
- it 'GET /users/:username with an invalid username' do
+ it 'GET /users/:username with an invalid username', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/462' do
get request.url, { params: { username: SecureRandom.hex(10) } }
expect_status(200)
diff --git a/qa/qa/specs/features/api/2_plan/closes_issue_via_pushing_a_commit_spec.rb b/qa/qa/specs/features/api/2_plan/closes_issue_via_pushing_a_commit_spec.rb
index d72389f1d9d..8b8c9b4c8b1 100644
--- a/qa/qa/specs/features/api/2_plan/closes_issue_via_pushing_a_commit_spec.rb
+++ b/qa/qa/specs/features/api/2_plan/closes_issue_via_pushing_a_commit_spec.rb
@@ -22,7 +22,7 @@ module QA
push_commit('Initial commit')
end
- it 'closes via pushing a commit' do
+ it 'closes via pushing a commit', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/423' do
push_commit("Closes ##{issue_id}", false)
Support::Retrier.retry_until(max_duration: 10, sleep_interval: 1) do
diff --git a/qa/qa/specs/features/api/3_create/gitaly/automatic_failover_and_recovery_spec.rb b/qa/qa/specs/features/api/3_create/gitaly/automatic_failover_and_recovery_spec.rb
index 064f5280625..aa06947e93b 100644
--- a/qa/qa/specs/features/api/3_create/gitaly/automatic_failover_and_recovery_spec.rb
+++ b/qa/qa/specs/features/api/3_create/gitaly/automatic_failover_and_recovery_spec.rb
@@ -28,7 +28,7 @@ module QA
praefect_manager.reset_primary_to_original
end
- it 'automatically fails over' do
+ it 'automatically fails over', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/976' do
# Create a new project with a commit and wait for it to replicate
Resource::Repository::ProjectPush.fabricate! do |push|
push.project = project
@@ -66,7 +66,7 @@ module QA
end
context 'when recovering from dataloss after failover' do
- it 'allows reconciliation', quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/238187', type: :stale } do
+ it 'allows reconciliation', quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/238187', type: :stale }, testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/977' do
# Start the old primary node again
praefect_manager.start_primary_node
praefect_manager.wait_for_health_check_current_primary_node
diff --git a/qa/qa/specs/features/api/3_create/gitaly/backend_node_recovery_spec.rb b/qa/qa/specs/features/api/3_create/gitaly/backend_node_recovery_spec.rb
index 52674f08e15..4515e76539b 100644
--- a/qa/qa/specs/features/api/3_create/gitaly/backend_node_recovery_spec.rb
+++ b/qa/qa/specs/features/api/3_create/gitaly/backend_node_recovery_spec.rb
@@ -22,7 +22,7 @@ module QA
praefect_manager.reset_primary_to_original
end
- it 'recovers from dataloss', quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/238186', type: :investigating } do
+ it 'recovers from dataloss', quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/238186', type: :investigating }, testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/978' do
# Create a new project with a commit and wait for it to replicate
praefect_manager.wait_for_replication(project.id)
diff --git a/qa/qa/specs/features/api/3_create/gitaly/changing_repository_storage_spec.rb b/qa/qa/specs/features/api/3_create/gitaly/changing_repository_storage_spec.rb
index 432598d1cb3..758ba582929 100644
--- a/qa/qa/specs/features/api/3_create/gitaly/changing_repository_storage_spec.rb
+++ b/qa/qa/specs/features/api/3_create/gitaly/changing_repository_storage_spec.rb
@@ -2,7 +2,7 @@
module QA
RSpec.describe 'Create' do
- describe 'Changing Gitaly repository storage', :requires_admin, quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/236195', type: :investigating } do
+ describe 'Changing Gitaly repository storage', :requires_admin do
praefect_manager = Service::PraefectManager.new
praefect_manager.gitlab = 'gitlab'
@@ -25,7 +25,7 @@ module QA
end
end
- context 'when moving from one Gitaly storage to another', :orchestrated, :repository_storage do
+ context 'when moving from one Gitaly storage to another', :orchestrated, :repository_storage, testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/973' do
let(:source_storage) { { type: :gitaly, name: 'default' } }
let(:destination_storage) { { type: :gitaly, name: QA::Runtime::Env.additional_repository_storage } }
@@ -43,7 +43,7 @@ module QA
# Note: This test doesn't have the :orchestrated tag because it runs in the Test::Integration::Praefect
# scenario with other tests that aren't considered orchestrated.
# It also runs on staging using nfs-file07 as non-cluster storage and nfs-file22 as cluster/praefect storage
- context 'when moving from Gitaly to Gitaly Cluster', :requires_praefect do
+ context 'when moving from Gitaly to Gitaly Cluster', :requires_praefect, testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/974' do
let(:source_storage) { { type: :gitaly, name: QA::Runtime::Env.non_cluster_repository_storage } }
let(:destination_storage) { { type: :praefect, name: QA::Runtime::Env.praefect_repository_storage } }
diff --git a/qa/qa/specs/features/api/3_create/gitaly/distributed_reads_spec.rb b/qa/qa/specs/features/api/3_create/gitaly/distributed_reads_spec.rb
index 6292ca821ca..29f131ac322 100644
--- a/qa/qa/specs/features/api/3_create/gitaly/distributed_reads_spec.rb
+++ b/qa/qa/specs/features/api/3_create/gitaly/distributed_reads_spec.rb
@@ -25,7 +25,7 @@ module QA
Runtime::Feature.disable_and_verify('gitaly_distributed_reads')
end
- it 'reads from each node' do
+ it 'reads from each node', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/979' do
pre_read_data = praefect_manager.query_read_distribution
wait_for_reads_to_increase(project, number_of_reads_per_loop, pre_read_data)
@@ -53,7 +53,7 @@ module QA
praefect_manager.wait_for_reliable_connection
end
- it 'does not read from the unhealthy node' do
+ it 'does not read from the unhealthy node', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/980' do
pre_read_data = praefect_manager.query_read_distribution
read_from_project(project, number_of_reads_per_loop * 10)
diff --git a/qa/qa/specs/features/api/3_create/gitaly/praefect_replication_queue_spec.rb b/qa/qa/specs/features/api/3_create/gitaly/praefect_replication_queue_spec.rb
index 78c8639a029..7e924475437 100644
--- a/qa/qa/specs/features/api/3_create/gitaly/praefect_replication_queue_spec.rb
+++ b/qa/qa/specs/features/api/3_create/gitaly/praefect_replication_queue_spec.rb
@@ -19,7 +19,7 @@ module QA
praefect_manager.clear_replication_queue
end
- it 'allows replication of different repository after interruption' do
+ it 'allows replication of different repository after interruption', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/975' do
# We want to fill the replication queue with 10 `in_progress` jobs,
# while a lock has been acquired, which is when the problem occurred
# as reported in https://gitlab.com/gitlab-org/gitaly/-/issues/2801
diff --git a/qa/qa/specs/features/api/3_create/repository/default_branch_name_setting_spec.rb b/qa/qa/specs/features/api/3_create/repository/default_branch_name_setting_spec.rb
new file mode 100644
index 00000000000..af155b22618
--- /dev/null
+++ b/qa/qa/specs/features/api/3_create/repository/default_branch_name_setting_spec.rb
@@ -0,0 +1,62 @@
+# frozen_string_literal: true
+
+require 'securerandom'
+
+module QA
+ RSpec.describe 'Create' do
+ describe 'Default branch name instance setting', :requires_admin, :skip_live_env do
+ before(:context) do
+ Runtime::ApplicationSettings.set_application_settings(default_branch_name: 'main')
+ end
+
+ after(:context) do
+ Runtime::ApplicationSettings.restore_application_settings(:default_branch_name)
+ end
+
+ it 'sets the default branch name for a new project' do
+ project = Resource::Project.fabricate_via_api! do |project|
+ project.name = "default-branch-name"
+ project.initialize_with_readme = true
+ end
+
+ # It takes a moment to create the project. We wait until we
+ # know it exists before we try to clone it
+ Support::Waiter.wait_until { project.has_file?('README.md') }
+
+ Git::Repository.perform do |repository|
+ repository.uri = project.repository_http_location.uri
+ repository.use_default_credentials
+ repository.clone
+
+ expect(repository.current_branch).to eq('main')
+ end
+ end
+
+ it 'allows a project to be created via the CLI with a different default branch name' do
+ project_name = "default-branch-name-via-cli-#{SecureRandom.hex(8)}"
+ group = Resource::Group.fabricate_via_api!
+
+ Git::Repository.perform do |repository|
+ repository.init_repository
+ repository.uri = "#{Runtime::Scenario.gitlab_address}/#{group.full_path}/#{project_name}"
+ repository.use_default_credentials
+ repository.configure_identity('GitLab QA', 'root@gitlab.com')
+ repository.checkout('trunk', new_branch: true)
+ repository.commit_file('README.md', 'Created via the CLI', 'initial commit via CLI')
+ repository.push_changes('trunk')
+ end
+
+ project = Resource::Project.fabricate_via_api! do |project|
+ project.add_name_uuid = false
+ project.name = project_name
+ project.group = group
+ end
+
+ expect(project.default_branch).to eq('trunk')
+ expect(project).to have_file('README.md')
+ expect(project.commits.map { |commit| commit[:message].chomp })
+ .to include('initial commit via CLI')
+ end
+ end
+ end
+end
diff --git a/qa/qa/specs/features/api/3_create/repository/files_spec.rb b/qa/qa/specs/features/api/3_create/repository/files_spec.rb
index 1a74b2c9da7..f539aae9b29 100644
--- a/qa/qa/specs/features/api/3_create/repository/files_spec.rb
+++ b/qa/qa/specs/features/api/3_create/repository/files_spec.rb
@@ -12,7 +12,7 @@ module QA
let(:project_name) { "api-basics-#{SecureRandom.hex(8)}" }
let(:sanitized_project_path) { CGI.escape("#{Runtime::User.username}/#{project_name}") }
- it 'user creates a project with a file and deletes them afterwards' do
+ it 'user creates a project with a file and deletes them afterwards', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/420' do
create_project_request = Runtime::API::Request.new(@api_client, '/projects')
post create_project_request.url, path: project_name, name: project_name
@@ -76,7 +76,7 @@ module QA
SVG
end
- it 'sets no-cache headers as expected' do
+ it 'sets no-cache headers as expected', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/421' do
create_project_request = Runtime::API::Request.new(@api_client, '/projects')
post create_project_request.url, path: project_name, name: project_name
diff --git a/qa/qa/specs/features/api/3_create/repository/project_archive_compare_spec.rb b/qa/qa/specs/features/api/3_create/repository/project_archive_compare_spec.rb
index e66e8f8c9d4..4bd99b4820e 100644
--- a/qa/qa/specs/features/api/3_create/repository/project_archive_compare_spec.rb
+++ b/qa/qa/specs/features/api/3_create/repository/project_archive_compare_spec.rb
@@ -28,7 +28,7 @@ module QA
end
end
- it 'download archives of each user project then check they are different' do
+ it 'download archives of each user project then check they are different', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/427' do
archive_checksums = {}
users.each do |user_key, user_info|
@@ -51,7 +51,6 @@ module QA
project.add_name_uuid = false
project.name = project_name
project.path_with_namespace = "#{user.username}/#{project_name}"
- project.user = user
project.api_client = api_client
end
diff --git a/qa/qa/specs/features/api/4_verify/pipeline_deletion_spec.rb b/qa/qa/specs/features/api/4_verify/pipeline_deletion_spec.rb
index 567815858f3..0bbb0ed897a 100644
--- a/qa/qa/specs/features/api/4_verify/pipeline_deletion_spec.rb
+++ b/qa/qa/specs/features/api/4_verify/pipeline_deletion_spec.rb
@@ -49,9 +49,7 @@ module QA
let(:pipeline_data_request) { Runtime::API::Request.new(api_client, "/projects/#{project.id}/pipelines/#{pipeline_id}") }
before do
- Support::Waiter.wait_until(max_duration: 30, sleep_interval: 3) do
- JSON.parse(get(pipeline_data_request.url))['status'] != 'pending'
- end
+ Support::Waiter.wait_until(sleep_interval: 3) { !pipeline.empty? && pipeline['status'] != 'pending' }
end
after do
@@ -59,11 +57,23 @@ module QA
end
context 'when deleted via API' do
- it 'is not found' do
+ it 'is not found', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/931' do
delete(pipeline_data_request.url)
- expect(JSON.parse(get(pipeline_data_request.url))['message'].downcase).to have_content('404 not found')
+
+ deleted_pipeline = nil
+ Support::Waiter.wait_until(sleep_interval: 3) do
+ deleted_pipeline = pipeline
+ !pipeline.empty?
+ end
+ expect(deleted_pipeline['message'].downcase).to have_content('404 not found')
end
end
+
+ private
+
+ def pipeline
+ JSON.parse(get(pipeline_data_request.url))
+ end
end
end
end
diff --git a/qa/qa/specs/features/browser_ui/1_manage/group/create_group_with_mattermost_team_spec.rb b/qa/qa/specs/features/browser_ui/1_manage/group/create_group_with_mattermost_team_spec.rb
index 5b89bcc7375..7bcc1fa4e1c 100644
--- a/qa/qa/specs/features/browser_ui/1_manage/group/create_group_with_mattermost_team_spec.rb
+++ b/qa/qa/specs/features/browser_ui/1_manage/group/create_group_with_mattermost_team_spec.rb
@@ -3,7 +3,7 @@
module QA
RSpec.describe 'Configure', :orchestrated, :mattermost do
describe 'Mattermost support' do
- it 'user creates a group with a mattermost team' do
+ it 'user creates a group with a mattermost team', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/665' do
Flow::Login.sign_in
Page::Main::Menu.perform(&:go_to_groups)
diff --git a/qa/qa/specs/features/browser_ui/1_manage/group/transfer_project_spec.rb b/qa/qa/specs/features/browser_ui/1_manage/group/transfer_project_spec.rb
index f307d286587..b9e1ee53246 100644
--- a/qa/qa/specs/features/browser_ui/1_manage/group/transfer_project_spec.rb
+++ b/qa/qa/specs/features/browser_ui/1_manage/group/transfer_project_spec.rb
@@ -11,14 +11,14 @@ module QA
let(:target_group) do
Resource::Group.fabricate_via_api! do |group|
- group.path = 'target-group'
+ group.path = "target-group-for-transfer_#{SecureRandom.hex(8)}"
end
end
let(:project) do
Resource::Project.fabricate_via_api! do |project|
project.group = source_group
- project.name = 'transfer-project'
+ project.name = 'transfer-project'
project.initialize_with_readme = true
end
end
@@ -43,13 +43,16 @@ module QA
end
end
- it 'user transfers a project between groups' do
- Page::File::Show.perform(&:go_to_general_settings)
+ it 'user transfers a project between groups', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/406' do
+ # Retry is needed here as the target group is not avaliable for transfer right away.
+ QA::Support::Retrier.retry_on_exception(reload_page: page) do
+ Page::File::Show.perform(&:go_to_general_settings)
- Page::Project::Settings::Main.perform(&:expand_advanced_settings)
+ Page::Project::Settings::Main.perform(&:expand_advanced_settings)
- Page::Project::Settings::Advanced.perform do |advanced|
- advanced.transfer_project!(project.name, target_group.full_path)
+ Page::Project::Settings::Advanced.perform do |advanced|
+ advanced.transfer_project!(project.name, target_group.full_path)
+ end
end
Page::Project::Settings::Main.perform(&:click_project)
diff --git a/qa/qa/specs/features/browser_ui/1_manage/login/2fa_recovery_spec.rb b/qa/qa/specs/features/browser_ui/1_manage/login/2fa_recovery_spec.rb
index e83aed18b5f..23de213012e 100644
--- a/qa/qa/specs/features/browser_ui/1_manage/login/2fa_recovery_spec.rb
+++ b/qa/qa/specs/features/browser_ui/1_manage/login/2fa_recovery_spec.rb
@@ -32,7 +32,7 @@ module QA
group.add_member(developer_user, Resource::Members::AccessLevel::DEVELOPER)
end
- it 'allows using 2FA recovery code once only' do
+ it 'allows using 2FA recovery code once only', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/972' do
recovery_code = enable_2fa_for_user_and_fetch_recovery_code(developer_user)
Flow::Login.sign_in(as: developer_user, skip_page_validation: true)
diff --git a/qa/qa/specs/features/browser_ui/1_manage/login/log_in_spec.rb b/qa/qa/specs/features/browser_ui/1_manage/login/log_in_spec.rb
index 9cb765705e0..624f8d20b62 100644
--- a/qa/qa/specs/features/browser_ui/1_manage/login/log_in_spec.rb
+++ b/qa/qa/specs/features/browser_ui/1_manage/login/log_in_spec.rb
@@ -3,7 +3,7 @@
module QA
RSpec.describe 'Manage', :smoke do
describe 'basic user login' do
- it 'user logs in using basic credentials and logs out' do
+ it 'user logs in using basic credentials and logs out', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/424' do
Flow::Login.sign_in
Page::Main::Menu.perform do |menu|
diff --git a/qa/qa/specs/features/browser_ui/1_manage/login/log_in_with_2fa_spec.rb b/qa/qa/specs/features/browser_ui/1_manage/login/log_in_with_2fa_spec.rb
index d0ab945124b..bd0d28c86be 100644
--- a/qa/qa/specs/features/browser_ui/1_manage/login/log_in_with_2fa_spec.rb
+++ b/qa/qa/specs/features/browser_ui/1_manage/login/log_in_with_2fa_spec.rb
@@ -34,7 +34,7 @@ module QA
group.add_member(developer_user, Resource::Members::AccessLevel::DEVELOPER)
end
- it 'allows enforcing 2FA via UI and logging in with 2FA' do
+ it 'allows enforcing 2FA via UI and logging in with 2FA', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/898' do
enforce_two_factor_authentication_on_group(group)
enable_two_factor_authentication_for_user(developer_user)
diff --git a/qa/qa/specs/features/browser_ui/1_manage/login/log_into_gitlab_via_ldap_spec.rb b/qa/qa/specs/features/browser_ui/1_manage/login/log_into_gitlab_via_ldap_spec.rb
index 5933637045f..cc12dd4e315 100644
--- a/qa/qa/specs/features/browser_ui/1_manage/login/log_into_gitlab_via_ldap_spec.rb
+++ b/qa/qa/specs/features/browser_ui/1_manage/login/log_into_gitlab_via_ldap_spec.rb
@@ -3,7 +3,7 @@
module QA
RSpec.describe 'Manage', :orchestrated, :ldap_no_tls, :ldap_tls do
describe 'LDAP login' do
- it 'user logs into GitLab using LDAP credentials' do
+ it 'user logs into GitLab using LDAP credentials', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/668' do
Flow::Login.sign_in
Page::Main::Menu.perform do |menu|
diff --git a/qa/qa/specs/features/browser_ui/1_manage/login/log_into_mattermost_via_gitlab_spec.rb b/qa/qa/specs/features/browser_ui/1_manage/login/log_into_mattermost_via_gitlab_spec.rb
index c7bd372c144..366f150bcd1 100644
--- a/qa/qa/specs/features/browser_ui/1_manage/login/log_into_mattermost_via_gitlab_spec.rb
+++ b/qa/qa/specs/features/browser_ui/1_manage/login/log_into_mattermost_via_gitlab_spec.rb
@@ -3,7 +3,7 @@
module QA
RSpec.describe 'Manage', :orchestrated, :mattermost do
describe 'Mattermost login' do
- it 'user logs into Mattermost using GitLab OAuth' do
+ it 'user logs into Mattermost using GitLab OAuth', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/666' do
Flow::Login.sign_in
Support::Retrier.retry_on_exception do
diff --git a/qa/qa/specs/features/browser_ui/1_manage/login/login_via_instance_wide_saml_sso_spec.rb b/qa/qa/specs/features/browser_ui/1_manage/login/login_via_instance_wide_saml_sso_spec.rb
index 505da623d66..f6aecff9f26 100644
--- a/qa/qa/specs/features/browser_ui/1_manage/login/login_via_instance_wide_saml_sso_spec.rb
+++ b/qa/qa/specs/features/browser_ui/1_manage/login/login_via_instance_wide_saml_sso_spec.rb
@@ -3,7 +3,7 @@
module QA
RSpec.describe 'Manage', :orchestrated, :instance_saml do
describe 'Instance wide SAML SSO' do
- it 'User logs in to gitlab with SAML SSO' do
+ it 'User logs in to gitlab with SAML SSO', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/671' do
Runtime::Browser.visit(:gitlab, Page::Main::Login)
Page::Main::Login.perform(&:sign_in_with_saml)
diff --git a/qa/qa/specs/features/browser_ui/1_manage/login/register_spec.rb b/qa/qa/specs/features/browser_ui/1_manage/login/register_spec.rb
index bb01be9d86e..11a6bf6fdfa 100644
--- a/qa/qa/specs/features/browser_ui/1_manage/login/register_spec.rb
+++ b/qa/qa/specs/features/browser_ui/1_manage/login/register_spec.rb
@@ -14,7 +14,7 @@ module QA
end
RSpec.describe 'Manage', :skip_signup_disabled do
- describe 'standard' do
+ describe 'standard', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/936' do
it_behaves_like 'registration and login'
context 'when user account is deleted', :requires_admin do
@@ -36,7 +36,7 @@ module QA
end
end
- it 'allows recreating with same credentials' do
+ it 'allows recreating with same credentials', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/937' do
expect(Page::Main::Menu.perform(&:signed_in?)).to be_falsy
Flow::Login.sign_in(as: user, skip_page_validation: true)
@@ -64,7 +64,7 @@ module QA
end
RSpec.describe 'Manage', :orchestrated, :ldap_no_tls, :skip_signup_disabled do
- describe 'while LDAP is enabled' do
+ describe 'while LDAP is enabled', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/935' do
it_behaves_like 'registration and login'
end
end
diff --git a/qa/qa/specs/features/browser_ui/1_manage/project/add_project_member_spec.rb b/qa/qa/specs/features/browser_ui/1_manage/project/add_project_member_spec.rb
index 8d1fa3ee62d..27350176a1e 100644
--- a/qa/qa/specs/features/browser_ui/1_manage/project/add_project_member_spec.rb
+++ b/qa/qa/specs/features/browser_ui/1_manage/project/add_project_member_spec.rb
@@ -3,7 +3,7 @@
module QA
RSpec.describe 'Manage' do
describe 'Add project member' do
- it 'user adds project member' do
+ it 'user adds project member', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/482' do
Flow::Login.sign_in
user = Resource::User.fabricate_or_use(Runtime::Env.gitlab_qa_username_1, Runtime::Env.gitlab_qa_password_1)
diff --git a/qa/qa/specs/features/browser_ui/1_manage/project/create_project_spec.rb b/qa/qa/specs/features/browser_ui/1_manage/project/create_project_spec.rb
index 80b5e332abe..6d07f72a044 100644
--- a/qa/qa/specs/features/browser_ui/1_manage/project/create_project_spec.rb
+++ b/qa/qa/specs/features/browser_ui/1_manage/project/create_project_spec.rb
@@ -3,7 +3,7 @@
module QA
RSpec.describe 'Manage', :smoke do
describe 'Project creation' do
- it 'user creates a new project' do
+ it 'user creates a new project', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/429' do
Flow::Login.sign_in
created_project = Resource::Project.fabricate_via_browser_ui! do |project|
diff --git a/qa/qa/specs/features/browser_ui/1_manage/project/dashboard_images_spec.rb b/qa/qa/specs/features/browser_ui/1_manage/project/dashboard_images_spec.rb
index 6ce97188d66..aaf0c51a2db 100644
--- a/qa/qa/specs/features/browser_ui/1_manage/project/dashboard_images_spec.rb
+++ b/qa/qa/specs/features/browser_ui/1_manage/project/dashboard_images_spec.rb
@@ -41,13 +41,13 @@ module QA
end
end
- context 'when logged in as a new user' do
+ context 'when logged in as a new user', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/465' do
it_behaves_like 'loads all images' do
let(:new_user) { @new_user }
end
end
- context 'when logged in as a new admin' do
+ context 'when logged in as a new admin', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/463' do
it_behaves_like 'loads all images' do
let(:new_user) { @new_admin }
end
diff --git a/qa/qa/specs/features/browser_ui/1_manage/project/import_github_repo_spec.rb b/qa/qa/specs/features/browser_ui/1_manage/project/import_github_repo_spec.rb
index 94cf1fe1f8c..83dfb2d9639 100644
--- a/qa/qa/specs/features/browser_ui/1_manage/project/import_github_repo_spec.rb
+++ b/qa/qa/specs/features/browser_ui/1_manage/project/import_github_repo_spec.rb
@@ -23,7 +23,7 @@ module QA
Page::Main::Menu.perform(&:sign_out_if_signed_in)
end
- it 'user imports a GitHub repo' do
+ it 'user imports a GitHub repo', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/385' do
Flow::Login.sign_in
imported_project # import the project
diff --git a/qa/qa/specs/features/browser_ui/1_manage/project/view_project_activity_spec.rb b/qa/qa/specs/features/browser_ui/1_manage/project/view_project_activity_spec.rb
index b98d2982684..fd6d26153ea 100644
--- a/qa/qa/specs/features/browser_ui/1_manage/project/view_project_activity_spec.rb
+++ b/qa/qa/specs/features/browser_ui/1_manage/project/view_project_activity_spec.rb
@@ -3,7 +3,7 @@
module QA
RSpec.describe 'Manage' do
describe 'Project activity' do
- it 'user creates an event in the activity page upon Git push' do
+ it 'user creates an event in the activity page upon Git push', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/407' do
Flow::Login.sign_in
Resource::Repository::ProjectPush.fabricate! do |push|
diff --git a/qa/qa/specs/features/browser_ui/2_plan/email/trigger_email_notification_spec.rb b/qa/qa/specs/features/browser_ui/2_plan/email/trigger_email_notification_spec.rb
index a334731386a..418865a63d2 100644
--- a/qa/qa/specs/features/browser_ui/2_plan/email/trigger_email_notification_spec.rb
+++ b/qa/qa/specs/features/browser_ui/2_plan/email/trigger_email_notification_spec.rb
@@ -19,7 +19,7 @@ module QA
Flow::Login.sign_in
end
- it 'is received by a user for project invitation' do
+ it 'is received by a user for project invitation', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/676' do
Flow::Project.add_member(project: project, username: user.username)
expect(page).to have_content(/@#{user.username}(\n| )?Given access/)
diff --git a/qa/qa/specs/features/browser_ui/2_plan/issue/check_mentions_for_xss_spec.rb b/qa/qa/specs/features/browser_ui/2_plan/issue/check_mentions_for_xss_spec.rb
index ec88042673c..5d863a80877 100644
--- a/qa/qa/specs/features/browser_ui/2_plan/issue/check_mentions_for_xss_spec.rb
+++ b/qa/qa/specs/features/browser_ui/2_plan/issue/check_mentions_for_xss_spec.rb
@@ -27,7 +27,7 @@ module QA
end.visit!
end
- it 'mentions a user in a comment' do
+ it 'mentions a user in a comment', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/452' do
Page::Project::Issue::Show.perform do |show|
show.select_all_activities_filter
show.comment("cc-ing you here @#{user.username}")
diff --git a/qa/qa/specs/features/browser_ui/2_plan/issue/collapse_comments_in_discussions_spec.rb b/qa/qa/specs/features/browser_ui/2_plan/issue/collapse_comments_in_discussions_spec.rb
index 478f6b8177c..6b309716f55 100644
--- a/qa/qa/specs/features/browser_ui/2_plan/issue/collapse_comments_in_discussions_spec.rb
+++ b/qa/qa/specs/features/browser_ui/2_plan/issue/collapse_comments_in_discussions_spec.rb
@@ -17,7 +17,7 @@ module QA
end
end
- it 'collapses and expands reply for comments in an issue' do
+ it 'collapses and expands reply for comments in an issue', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/434' do
Page::Project::Issue::Show.perform do |show|
one_reply = "1 reply"
diff --git a/qa/qa/specs/features/browser_ui/2_plan/issue/comment_issue_spec.rb b/qa/qa/specs/features/browser_ui/2_plan/issue/comment_issue_spec.rb
index 0347de42b96..c9ae47459c4 100644
--- a/qa/qa/specs/features/browser_ui/2_plan/issue/comment_issue_spec.rb
+++ b/qa/qa/specs/features/browser_ui/2_plan/issue/comment_issue_spec.rb
@@ -9,7 +9,7 @@ module QA
Resource::Issue.fabricate_via_api!.visit!
end
- it 'comments on an issue and edits the comment' do
+ it 'comments on an issue and edits the comment', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/450' do
Page::Project::Issue::Show.perform do |show|
first_version_of_comment = 'First version of the comment'
second_version_of_comment = 'Second version of the comment'
diff --git a/qa/qa/specs/features/browser_ui/2_plan/issue/create_issue_spec.rb b/qa/qa/specs/features/browser_ui/2_plan/issue/create_issue_spec.rb
index 91fd2579fcd..a10329d5936 100644
--- a/qa/qa/specs/features/browser_ui/2_plan/issue/create_issue_spec.rb
+++ b/qa/qa/specs/features/browser_ui/2_plan/issue/create_issue_spec.rb
@@ -9,7 +9,7 @@ module QA
Flow::Login.sign_in
end
- it 'creates an issue', :reliable do
+ it 'creates an issue', :reliable, testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/432' do
issue = Resource::Issue.fabricate_via_browser_ui!
Page::Project::Menu.perform(&:click_issues)
@@ -19,7 +19,7 @@ module QA
end
end
- it 'closes an issue', quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/225303', type: :bug } do
+ it 'closes an issue', quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/225303', type: :bug }, testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/852' do
closed_issue.visit!
Page::Project::Issue::Show.perform do |issue_page|
@@ -48,7 +48,7 @@ module QA
Resource::Issue.fabricate_via_api!.visit!
end
- it 'comments on an issue with an attachment' do
+ it 'comments on an issue with an attachment', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/393' do
Page::Project::Issue::Show.perform do |show|
show.comment('See attached banana for scale', attachment: file_to_attach)
diff --git a/qa/qa/specs/features/browser_ui/2_plan/issue/export_as_csv_spec.rb b/qa/qa/specs/features/browser_ui/2_plan/issue/export_as_csv_spec.rb
index aa03a514f04..c1113e7ec35 100644
--- a/qa/qa/specs/features/browser_ui/2_plan/issue/export_as_csv_spec.rb
+++ b/qa/qa/specs/features/browser_ui/2_plan/issue/export_as_csv_spec.rb
@@ -24,7 +24,7 @@ module QA
Page::Project::Menu.perform(&:click_issues)
end
- it 'successfully exports issues list as CSV' do
+ it 'successfully exports issues list as CSV', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/764' do
Page::Project::Issue::Index.perform do |index|
index.click_export_as_csv_button
diff --git a/qa/qa/specs/features/browser_ui/2_plan/issue/filter_issue_comments_spec.rb b/qa/qa/specs/features/browser_ui/2_plan/issue/filter_issue_comments_spec.rb
index 082933e9878..9a054e7d1c8 100644
--- a/qa/qa/specs/features/browser_ui/2_plan/issue/filter_issue_comments_spec.rb
+++ b/qa/qa/specs/features/browser_ui/2_plan/issue/filter_issue_comments_spec.rb
@@ -9,7 +9,7 @@ module QA
Resource::Issue.fabricate_via_api!.visit!
end
- it 'filters comments and activities in an issue' do
+ it 'filters comments and activities in an issue', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/425' do
Page::Project::Issue::Show.perform do |show|
my_own_comment = "My own comment"
made_the_issue_confidential = "made the issue confidential"
diff --git a/qa/qa/specs/features/browser_ui/2_plan/issue/issue_suggestions_spec.rb b/qa/qa/specs/features/browser_ui/2_plan/issue/issue_suggestions_spec.rb
index 43f4415c90d..7c675862e26 100644
--- a/qa/qa/specs/features/browser_ui/2_plan/issue/issue_suggestions_spec.rb
+++ b/qa/qa/specs/features/browser_ui/2_plan/issue/issue_suggestions_spec.rb
@@ -13,7 +13,7 @@ module QA
end.project.visit!
end
- it 'shows issue suggestions when creating a new issue' do
+ it 'shows issue suggestions when creating a new issue', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/412' do
Page::Project::Show.perform(&:go_to_new_issue)
Page::Project::Issue::New.perform do |new_page|
new_page.fill_title("issue")
diff --git a/qa/qa/specs/features/browser_ui/2_plan/issue/jira_issue_import_spec.rb b/qa/qa/specs/features/browser_ui/2_plan/issue/jira_issue_import_spec.rb
index a2e7d10f313..42b3e5364b7 100644
--- a/qa/qa/specs/features/browser_ui/2_plan/issue/jira_issue_import_spec.rb
+++ b/qa/qa/specs/features/browser_ui/2_plan/issue/jira_issue_import_spec.rb
@@ -14,7 +14,7 @@ module QA
end
end
- it 'imports issues from Jira' do
+ it 'imports issues from Jira', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/896' do
set_up_jira_integration
import_jira_issues
@@ -58,7 +58,7 @@ module QA
end
expect(page).not_to have_text("Url is blocked")
- expect(page).to have_text("Jira activated")
+ expect(page).to have_text("Jira settings saved and active.")
end
end
diff --git a/qa/qa/specs/features/browser_ui/2_plan/issue/mentions_spec.rb b/qa/qa/specs/features/browser_ui/2_plan/issue/mentions_spec.rb
index b0b2a83ae35..5a8c9a4601a 100644
--- a/qa/qa/specs/features/browser_ui/2_plan/issue/mentions_spec.rb
+++ b/qa/qa/specs/features/browser_ui/2_plan/issue/mentions_spec.rb
@@ -21,7 +21,7 @@ module QA
end.visit!
end
- it 'mentions another user in an issue' do
+ it 'mentions another user in an issue', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/446' do
Page::Project::Issue::Show.perform do |show|
at_username = "@#{user.username}"
diff --git a/qa/qa/specs/features/browser_ui/2_plan/issue_boards/focus_mode_spec.rb b/qa/qa/specs/features/browser_ui/2_plan/issue_boards/focus_mode_spec.rb
index 932eef8e38b..7f60726af0e 100644
--- a/qa/qa/specs/features/browser_ui/2_plan/issue_boards/focus_mode_spec.rb
+++ b/qa/qa/specs/features/browser_ui/2_plan/issue_boards/focus_mode_spec.rb
@@ -13,7 +13,7 @@ module QA
Flow::Login.sign_in
end
- it 'focuses on issue board' do
+ it 'focuses on issue board', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/820' do
project.visit!
Page::Project::Menu.perform(&:go_to_boards)
diff --git a/qa/qa/specs/features/browser_ui/2_plan/milestone/assign_milestone_spec.rb b/qa/qa/specs/features/browser_ui/2_plan/milestone/assign_milestone_spec.rb
index 115701c5c02..b011978dce6 100644
--- a/qa/qa/specs/features/browser_ui/2_plan/milestone/assign_milestone_spec.rb
+++ b/qa/qa/specs/features/browser_ui/2_plan/milestone/assign_milestone_spec.rb
@@ -17,6 +17,7 @@ module QA
let(:project) do
Resource::Project.fabricate_via_api! do |project|
project.name = 'project-to-test-milestones'
+ project.group = group
end
end
diff --git a/qa/qa/specs/features/browser_ui/2_plan/milestone/create_group_milestone_spec.rb b/qa/qa/specs/features/browser_ui/2_plan/milestone/create_group_milestone_spec.rb
index 35c42796aeb..5f7e28190b2 100644
--- a/qa/qa/specs/features/browser_ui/2_plan/milestone/create_group_milestone_spec.rb
+++ b/qa/qa/specs/features/browser_ui/2_plan/milestone/create_group_milestone_spec.rb
@@ -14,7 +14,7 @@ module QA
Flow::Login.sign_in
end
- it 'creates a group milestone' do
+ it 'creates a group milestone', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/922' do
group_milestone = Resource::GroupMilestone.fabricate_via_browser_ui! do |milestone|
milestone.title = title
milestone.description = description
diff --git a/qa/qa/specs/features/browser_ui/2_plan/milestone/create_project_milestone_spec.rb b/qa/qa/specs/features/browser_ui/2_plan/milestone/create_project_milestone_spec.rb
index 143fdf5728b..489691b4d0c 100644
--- a/qa/qa/specs/features/browser_ui/2_plan/milestone/create_project_milestone_spec.rb
+++ b/qa/qa/specs/features/browser_ui/2_plan/milestone/create_project_milestone_spec.rb
@@ -14,7 +14,7 @@ module QA
Flow::Login.sign_in
end
- it 'creates a project milestone' do
+ it 'creates a project milestone', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/901' do
project_milestone = Resource::ProjectMilestone.fabricate_via_browser_ui! do |milestone|
milestone.title = title
milestone.description = description
diff --git a/qa/qa/specs/features/browser_ui/2_plan/related_issues/related_issues_spec.rb b/qa/qa/specs/features/browser_ui/2_plan/related_issues/related_issues_spec.rb
new file mode 100644
index 00000000000..a2190a8cf41
--- /dev/null
+++ b/qa/qa/specs/features/browser_ui/2_plan/related_issues/related_issues_spec.rb
@@ -0,0 +1,45 @@
+# frozen_string_literal: true
+
+module QA
+ RSpec.describe 'Plan' do
+ describe 'Related issues' do
+ let(:project) do
+ Resource::Project.fabricate_via_api! do |project|
+ project.name = 'project-to-test-related-issues'
+ end
+ end
+
+ let(:issue_1) do
+ Resource::Issue.fabricate_via_api! do |issue|
+ issue.project = project
+ end
+ end
+
+ let(:issue_2) do
+ Resource::Issue.fabricate_via_api! do |issue|
+ issue.project = project
+ end
+ end
+
+ before do
+ Flow::Login.sign_in
+ end
+
+ it 'relates and unrelates one issue to/from another', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/541' do
+ issue_1.visit!
+
+ Page::Project::Issue::Show.perform do |show|
+ max_wait = 60
+
+ show.relate_issue(issue_2)
+
+ expect(show.related_issuable_item).to have_text(issue_2.title, wait: max_wait)
+
+ show.click_remove_related_issue_button
+
+ expect(show).to have_no_text(issue_2.title, wait: max_wait)
+ end
+ end
+ end
+ end
+end
diff --git a/qa/qa/specs/features/browser_ui/3_create/design_management/add_design_content_spec.rb b/qa/qa/specs/features/browser_ui/3_create/design_management/add_design_content_spec.rb
index 44c1511fffb..ff2b4fa5364 100644
--- a/qa/qa/specs/features/browser_ui/3_create/design_management/add_design_content_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/design_management/add_design_content_spec.rb
@@ -12,7 +12,7 @@ module QA
Flow::Login.sign_in
end
- it 'user adds a design and annotates it' do
+ it 'user adds a design and annotates it', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/955' do
issue.visit!
Page::Project::Issue::Show.perform do |issue|
diff --git a/qa/qa/specs/features/browser_ui/3_create/jira/jira_basic_integration_spec.rb b/qa/qa/specs/features/browser_ui/3_create/jira/jira_basic_integration_spec.rb
index 28338475cb5..37ddd1425a8 100644
--- a/qa/qa/specs/features/browser_ui/3_create/jira/jira_basic_integration_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/jira/jira_basic_integration_spec.rb
@@ -41,7 +41,7 @@ module QA
end
end
- it 'closes an issue via pushing a commit' do
+ it 'closes an issue via pushing a commit', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/827' do
issue_key = Vendor::Jira::JiraAPI.perform do |jira_api|
jira_api.create_issue(jira_project_key)
end
@@ -51,7 +51,7 @@ module QA
expect_issue_done(issue_key)
end
- it 'closes an issue via a merge request' do
+ it 'closes an issue via a merge request', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/828' do
issue_key = Vendor::Jira::JiraAPI.perform do |jira_api|
jira_api.create_issue(jira_project_key)
end
diff --git a/qa/qa/specs/features/browser_ui/3_create/merge_request/create_merge_request_spec.rb b/qa/qa/specs/features/browser_ui/3_create/merge_request/create_merge_request_spec.rb
index 524cc3fc8a1..510fc0c9a16 100644
--- a/qa/qa/specs/features/browser_ui/3_create/merge_request/create_merge_request_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/merge_request/create_merge_request_spec.rb
@@ -16,7 +16,7 @@ module QA
Flow::Login.sign_in
end
- it 'creates a basic merge request', :smoke do
+ it 'creates a basic merge request', :smoke, testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/409' do
Resource::MergeRequest.fabricate_via_browser_ui! do |merge_request|
merge_request.project = project
merge_request.title = merge_request_title
@@ -29,7 +29,7 @@ module QA
end
end
- it 'creates a merge request with a milestone and label' do
+ it 'creates a merge request with a milestone and label', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/514' do
gitlab_account_username = "@#{Runtime::User.username}"
milestone = Resource::ProjectMilestone.fabricate_via_api! do |milestone|
diff --git a/qa/qa/specs/features/browser_ui/3_create/merge_request/merge_merge_request_from_fork_spec.rb b/qa/qa/specs/features/browser_ui/3_create/merge_request/merge_merge_request_from_fork_spec.rb
index 5b89bf046fb..b58e820a6c9 100644
--- a/qa/qa/specs/features/browser_ui/3_create/merge_request/merge_merge_request_from_fork_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/merge_request/merge_merge_request_from_fork_spec.rb
@@ -9,7 +9,7 @@ module QA
end
end
- it 'can merge feature branch fork to mainline' do
+ it 'can merge feature branch fork to mainline', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/928' do
Flow::Login.sign_in
merge_request.visit!
diff --git a/qa/qa/specs/features/browser_ui/3_create/merge_request/rebase_merge_request_spec.rb b/qa/qa/specs/features/browser_ui/3_create/merge_request/rebase_merge_request_spec.rb
index a1c604bdcfc..02fbb0bbbd7 100644
--- a/qa/qa/specs/features/browser_ui/3_create/merge_request/rebase_merge_request_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/merge_request/rebase_merge_request_spec.rb
@@ -3,7 +3,7 @@
module QA
RSpec.describe 'Create', quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/30226', type: :bug } do
describe 'Merge request rebasing' do
- it 'user rebases source branch of merge request' do
+ it 'user rebases source branch of merge request', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/398' do
Flow::Login.sign_in
project = Resource::Project.fabricate_via_api! do |project|
diff --git a/qa/qa/specs/features/browser_ui/3_create/merge_request/squash_merge_request_spec.rb b/qa/qa/specs/features/browser_ui/3_create/merge_request/squash_merge_request_spec.rb
index cb660a3e40b..366671d3385 100644
--- a/qa/qa/specs/features/browser_ui/3_create/merge_request/squash_merge_request_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/merge_request/squash_merge_request_spec.rb
@@ -31,7 +31,7 @@ module QA
merge_request.visit!
end
- it 'user squashes commits while merging' do
+ it 'user squashes commits while merging', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/418' do
Page::MergeRequest::Show.perform do |merge_request_page|
merge_request_page.retry_on_exception(reload: true) do
expect(merge_request_page).to have_text('to be squashed')
diff --git a/qa/qa/specs/features/browser_ui/3_create/merge_request/view_merge_request_diff_patch_spec.rb b/qa/qa/specs/features/browser_ui/3_create/merge_request/view_merge_request_diff_patch_spec.rb
index 15c41581e6b..5b1c15016bf 100644
--- a/qa/qa/specs/features/browser_ui/3_create/merge_request/view_merge_request_diff_patch_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/merge_request/view_merge_request_diff_patch_spec.rb
@@ -15,7 +15,7 @@ module QA
merge_request.visit!
end
- it 'views the merge request email patches' do
+ it 'views the merge request email patches', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/416' do
Page::MergeRequest::Show.perform(&:view_email_patches)
expect(page.text).to start_with('From')
@@ -23,7 +23,7 @@ module QA
expect(page).to have_content("diff --git a/#{merge_request.file_name} b/#{merge_request.file_name}")
end
- it 'views the merge request plain diff' do
+ it 'views the merge request plain diff', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/417' do
Page::MergeRequest::Show.perform(&:view_plain_diff)
expect(page.text).to start_with("diff --git a/#{merge_request.file_name} b/#{merge_request.file_name}")
diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/add_list_delete_branches_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/add_list_delete_branches_spec.rb
index cab909756c1..98cbc5c0a93 100644
--- a/qa/qa/specs/features/browser_ui/3_create/repository/add_list_delete_branches_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/repository/add_list_delete_branches_spec.rb
@@ -55,7 +55,7 @@ module QA
project.visit!
end
- it 'lists branches correctly after CRUD operations' do
+ it 'lists branches correctly after CRUD operations', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/413' do
Page::Project::Menu.perform(&:go_to_repository_branches)
expect(page).to have_content(master_branch)
diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/clone_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/clone_spec.rb
index c9cbc68c254..47117c4d456 100644
--- a/qa/qa/specs/features/browser_ui/3_create/repository/clone_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/repository/clone_spec.rb
@@ -26,7 +26,7 @@ module QA
project.wait_for_push_new_branch
end
- it 'user performs a deep clone' do
+ it 'user performs a deep clone', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/475' do
Git::Repository.perform do |repository|
repository.uri = project.repository_http_location.uri
repository.use_default_credentials
@@ -37,7 +37,7 @@ module QA
end
end
- it 'user performs a shallow clone' do
+ it 'user performs a shallow clone', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/411' do
Git::Repository.perform do |repository|
repository.uri = project.repository_http_location.uri
repository.use_default_credentials
diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/create_edit_delete_file_via_web_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/create_edit_delete_file_via_web_spec.rb
index d66f0ddcda6..43f4b080c73 100644
--- a/qa/qa/specs/features/browser_ui/3_create/repository/create_edit_delete_file_via_web_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/repository/create_edit_delete_file_via_web_spec.rb
@@ -3,7 +3,7 @@
module QA
RSpec.describe 'Create' do
describe 'Files management' do
- it 'user creates, edits and deletes a file via the Web' do
+ it 'user creates, edits and deletes a file via the Web', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/451' do
Runtime::Browser.visit(:gitlab, Page::Main::Login)
Page::Main::Login.perform(&:sign_in_using_credentials)
diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/move_project_create_fork_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/move_project_create_fork_spec.rb
index 59e4bb038a7..7a727ffb291 100644
--- a/qa/qa/specs/features/browser_ui/3_create/repository/move_project_create_fork_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/repository/move_project_create_fork_spec.rb
@@ -1,8 +1,8 @@
# frozen_string_literal: true
module QA
- RSpec.describe 'Create', quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/217002', type: :investigating } do
- describe 'Gitaly repository storage', :orchestrated, :repository_storage, :requires_admin do
+ RSpec.describe 'Create', :orchestrated, :repository_storage, :requires_admin do
+ describe 'Gitaly repository storage' do
let(:user) { Resource::User.fabricate_or_use(Runtime::Env.gitlab_qa_username_1, Runtime::Env.gitlab_qa_password_1) }
let(:parent_project) do
Resource::Project.fabricate_via_api! do |project|
@@ -22,7 +22,7 @@ module QA
parent_project.add_member(user)
end
- it 'creates a 2nd fork after moving the parent project' do
+ it 'creates a 2nd fork after moving the parent project', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/713' do
Flow::Login.sign_in(as: user)
fork_project.visit!
@@ -30,7 +30,7 @@ module QA
parent_project.change_repository_storage(QA::Runtime::Env.additional_repository_storage)
second_fork_project = Resource::Fork.fabricate_via_api! do |fork|
- fork.name = "second-fork"
+ fork.name = "second-fork-of-#{parent_project.name}"
fork.user = user
fork.upstream = parent_project
end.project
diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/protocol_v2_push_http_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/protocol_v2_push_http_spec.rb
index e3b0d7de9ec..8ac7285d70c 100644
--- a/qa/qa/specs/features/browser_ui/3_create/repository/protocol_v2_push_http_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/repository/protocol_v2_push_http_spec.rb
@@ -3,7 +3,7 @@
module QA
RSpec.describe 'Create' do
describe 'Push over HTTP using Git protocol version 2', :requires_git_protocol_v2 do
- it 'user pushes to the repository' do
+ it 'user pushes to the repository', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/469' do
Flow::Login.sign_in
# Create a project to push to
diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/protocol_v2_push_ssh_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/protocol_v2_push_ssh_spec.rb
index 90beff343ab..8d966c9e46d 100644
--- a/qa/qa/specs/features/browser_ui/3_create/repository/protocol_v2_push_ssh_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/repository/protocol_v2_push_ssh_spec.rb
@@ -27,7 +27,7 @@ module QA
Page::Main::Menu.perform(&:sign_out_if_signed_in)
end
- it 'user pushes to the repository' do
+ it 'user pushes to the repository', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/386' do
project = Resource::Project.fabricate_via_api! do |project|
project.name = 'git-protocol-project'
end
diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/push_http_private_token_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/push_http_private_token_spec.rb
index ceacc73e3c3..08af18a992e 100644
--- a/qa/qa/specs/features/browser_ui/3_create/repository/push_http_private_token_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/repository/push_http_private_token_spec.rb
@@ -3,7 +3,7 @@
module QA
RSpec.describe 'Create' do
describe 'Git push over HTTP', :ldap_no_tls, :smoke do
- it 'user using a personal access token pushes code to the repository' do
+ it 'user using a personal access token pushes code to the repository', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/430' do
Flow::Login.sign_in
access_token = Resource::PersonalAccessToken.fabricate!.access_token
diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/push_mirroring_lfs_over_http_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/push_mirroring_lfs_over_http_spec.rb
new file mode 100644
index 00000000000..f96b424d233
--- /dev/null
+++ b/qa/qa/specs/features/browser_ui/3_create/repository/push_mirroring_lfs_over_http_spec.rb
@@ -0,0 +1,45 @@
+# frozen_string_literal: true
+
+module QA
+ RSpec.describe 'Create' do
+ describe 'Push mirror a repository over HTTP' do
+ it 'configures and syncs LFS objects for a (push) mirrored repository', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/414' do
+ Runtime::Feature.enable_and_verify('push_mirror_syncs_lfs')
+ Runtime::Browser.visit(:gitlab, Page::Main::Login)
+ Page::Main::Login.perform(&:sign_in_using_credentials)
+
+ target_project = Resource::Project.fabricate_via_api! do |project|
+ project.name = 'push-mirror-target-project'
+ end
+ target_project_uri = target_project.repository_http_location.uri
+ target_project_uri.user = Runtime::User.username
+
+ source_project_push = Resource::Repository::ProjectPush.fabricate! do |push|
+ push.file_name = 'README.md'
+ push.file_content = '# This is a test project'
+ push.commit_message = 'Add README.md'
+ push.use_lfs = true
+ end
+ source_project_push.project.visit!
+
+ Page::Project::Menu.perform(&:go_to_repository_settings)
+ Page::Project::Settings::Repository.perform do |settings|
+ settings.expand_mirroring_repositories do |mirror_settings|
+ # Configure the source project to push to the target project
+ mirror_settings.repository_url = target_project_uri
+ mirror_settings.mirror_direction = 'Push'
+ mirror_settings.authentication_method = 'Password'
+ mirror_settings.password = Runtime::User.password
+ mirror_settings.mirror_repository
+ mirror_settings.update target_project_uri
+ end
+ end
+
+ # Check that the target project has the commit from the source
+ target_project.visit!
+ expect(page).to have_content('README.md')
+ expect(page).to have_content('The rendered file could not be displayed because it is stored in LFS')
+ end
+ end
+ end
+end
diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/push_mirroring_over_http_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/push_mirroring_over_http_spec.rb
index 254e32a88ce..00d4acbd1e1 100644
--- a/qa/qa/specs/features/browser_ui/3_create/repository/push_mirroring_over_http_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/repository/push_mirroring_over_http_spec.rb
@@ -3,7 +3,7 @@
module QA
RSpec.describe 'Create' do
describe 'Push mirror a repository over HTTP' do
- it 'configures and syncs a (push) mirrored repository' do
+ it 'configures and syncs a (push) mirrored repository', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/414' do
Runtime::Browser.visit(:gitlab, Page::Main::Login)
Page::Main::Login.perform(&:sign_in_using_credentials)
diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/push_over_http_file_size_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/push_over_http_file_size_spec.rb
index 443ace0c9f0..2ebab7d2a30 100644
--- a/qa/qa/specs/features/browser_ui/3_create/repository/push_over_http_file_size_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/repository/push_over_http_file_size_spec.rb
@@ -26,7 +26,7 @@ module QA
set_file_size_limit(nil)
end
- it 'push successful when the file size is under the limit' do
+ it 'push successful when the file size is under the limit', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/456' do
set_file_size_limit(5)
retry_on_fail do
@@ -36,7 +36,7 @@ module QA
end
end
- it 'push fails when the file size is above the limit' do
+ it 'push fails when the file size is above the limit', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/458' do
set_file_size_limit(2)
retry_on_fail do
diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/push_over_http_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/push_over_http_spec.rb
index 2baf1e1d8fd..8b6973e6cea 100644
--- a/qa/qa/specs/features/browser_ui/3_create/repository/push_over_http_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/repository/push_over_http_spec.rb
@@ -3,7 +3,7 @@
module QA
RSpec.describe 'Create' do
describe 'Git push over HTTP', :ldap_no_tls do
- it 'user pushes code to the repository', :smoke do
+ it 'user pushes code to the repository', :smoke, testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/426' do
Flow::Login.sign_in
Resource::Repository::ProjectPush.fabricate! do |push|
@@ -18,7 +18,7 @@ module QA
end
end
- it 'pushes to a project using a specific Praefect repository storage', :smoke, :requires_admin, :requires_praefect do
+ it 'pushes to a project using a specific Praefect repository storage', :smoke, :requires_admin, :requires_praefect, testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/742' do
Flow::Login.sign_in_as_admin
project = Resource::Project.fabricate_via_api! do |storage_project|
diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/push_over_ssh_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/push_over_ssh_spec.rb
index d0f0cabbbca..5e7c17cbfaf 100644
--- a/qa/qa/specs/features/browser_ui/3_create/repository/push_over_ssh_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/repository/push_over_ssh_spec.rb
@@ -26,7 +26,7 @@ module QA
Flow::Login.sign_in
end
- it 'pushes code to the repository via SSH', :smoke do
+ it 'pushes code to the repository via SSH', :smoke, testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/969' do
Resource::Repository::ProjectPush.fabricate! do |push|
push.project = project
push.ssh_key = @key
@@ -41,7 +41,7 @@ module QA
end
end
- it 'pushes multiple branches and tags together', :smoke do
+ it 'pushes multiple branches and tags together', :smoke, testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/970' do
branches = []
tags = []
Git::Repository.perform do |repository|
diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/push_protected_branch_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/push_protected_branch_spec.rb
index 3e1e470d8c3..d20abd658c6 100644
--- a/qa/qa/specs/features/browser_ui/3_create/repository/push_protected_branch_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/repository/push_protected_branch_spec.rb
@@ -18,7 +18,7 @@ module QA
end
context 'when developers and maintainers are allowed to push to a protected branch' do
- it 'user with push rights successfully pushes to the protected branch' do
+ it 'user with push rights successfully pushes to the protected branch', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/447' do
create_protected_branch(allowed_to_push: {
roles: Resource::ProtectedBranch::Roles::DEVS_AND_MAINTAINERS
})
@@ -30,7 +30,7 @@ module QA
end
context 'when developers and maintainers are not allowed to push to a protected branch' do
- it 'user without push rights fails to push to the protected branch' do
+ it 'user without push rights fails to push to the protected branch', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/449' do
create_protected_branch(allowed_to_push: {
roles: Resource::ProtectedBranch::Roles::NO_ONE
})
diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/ssh_key_support_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/ssh_key_support_spec.rb
index c5a07c69620..2001069c2a4 100644
--- a/qa/qa/specs/features/browser_ui/3_create/repository/ssh_key_support_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/repository/ssh_key_support_spec.rb
@@ -9,7 +9,7 @@ module QA
Flow::Login.sign_in
end
- it 'user can add an SSH key' do
+ it 'user can add an SSH key', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/929' do
key = Resource::SSHKey.fabricate_via_browser_ui! do |resource|
resource.title = key_title
end
@@ -20,7 +20,7 @@ module QA
# Note this context ensures that the example it contains is executed after the example above. Be aware of the order of execution if you add new examples in either context.
context 'after adding an ssh key' do
- it 'can delete an ssh key' do
+ it 'can delete an ssh key', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/930' do
Page::Main::Menu.perform(&:click_settings_link)
Page::Profile::Menu.perform(&:click_ssh_keys)
Page::Profile::SSHKeys.perform do |ssh_keys|
diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/user_views_commit_diff_patch_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/user_views_commit_diff_patch_spec.rb
index cf91b829817..cd6ffdf4571 100644
--- a/qa/qa/specs/features/browser_ui/3_create/repository/user_views_commit_diff_patch_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/repository/user_views_commit_diff_patch_spec.rb
@@ -43,7 +43,7 @@ module QA
find('pre').text
end
- it 'user views raw email patch' do
+ it 'user views raw email patch', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/442' do
view_commit
Page::Project::Commit::Show.perform(&:select_email_patches)
@@ -53,7 +53,7 @@ module QA
expect(page).to have_content('diff --git a/second b/second')
end
- it 'user views raw commit diff' do
+ it 'user views raw commit diff', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/439' do
view_commit
Page::Project::Commit::Show.perform(&:select_plain_diff)
diff --git a/qa/qa/specs/features/browser_ui/3_create/snippet/clone_push_pull_personal_snippet_spec.rb b/qa/qa/specs/features/browser_ui/3_create/snippet/clone_push_pull_personal_snippet_spec.rb
index ddbeb434955..ef3b315506f 100644
--- a/qa/qa/specs/features/browser_ui/3_create/snippet/clone_push_pull_personal_snippet_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/snippet/clone_push_pull_personal_snippet_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
- RSpec.describe 'Create' do
+ RSpec.describe 'Create', quarantine: { only: { subdomain: :staging }, issue: 'https://gitlab.com/gitlab-org/gitaly/-/issues/3143', type: :bug } do
describe 'Version control for personal snippets' do
let(:new_file) { 'new_snippet_file' }
let(:changed_content) { 'changes' }
@@ -36,7 +36,7 @@ module QA
Flow::Login.sign_in
end
- it 'clones, pushes, and pulls a snippet over HTTP, edits via UI' do
+ it 'clones, pushes, and pulls a snippet over HTTP, edits via UI', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/826' do
Resource::Repository::Push.fabricate! do |push|
push.repository_http_uri = repository_uri_http
push.file_name = new_file
@@ -65,7 +65,7 @@ module QA
end
end
- it 'clones, pushes, and pulls a snippet over SSH, deletes via UI' do
+ it 'clones, pushes, and pulls a snippet over SSH, deletes via UI', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/825' do
Resource::Repository::Push.fabricate! do |push|
push.repository_ssh_uri = repository_uri_ssh
push.ssh_key = ssh_key
diff --git a/qa/qa/specs/features/browser_ui/3_create/snippet/clone_push_pull_project_snippet_spec.rb b/qa/qa/specs/features/browser_ui/3_create/snippet/clone_push_pull_project_snippet_spec.rb
index dc1654b44c8..34f6b464f29 100644
--- a/qa/qa/specs/features/browser_ui/3_create/snippet/clone_push_pull_project_snippet_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/snippet/clone_push_pull_project_snippet_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
- RSpec.describe 'Create' do
+ RSpec.describe 'Create', quarantine: { only: { subdomain: :staging }, issue: 'https://gitlab.com/gitlab-org/gitaly/-/issues/3143', type: :bug } do
describe 'Version control for project snippets' do
let(:new_file) { 'new_snippet_file' }
let(:changed_content) { 'changes' }
@@ -36,7 +36,7 @@ module QA
Flow::Login.sign_in
end
- it 'clones, pushes, and pulls a project snippet over HTTP, edits via UI' do
+ it 'clones, pushes, and pulls a project snippet over HTTP, edits via UI', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/833' do
Resource::Repository::Push.fabricate! do |push|
push.repository_http_uri = repository_uri_http
push.file_name = new_file
@@ -65,7 +65,7 @@ module QA
end
end
- it 'clones, pushes, and pulls a project snippet over SSH, deletes via UI' do
+ it 'clones, pushes, and pulls a project snippet over SSH, deletes via UI', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/832' do
Resource::Repository::Push.fabricate! do |push|
push.repository_ssh_uri = repository_uri_ssh
push.ssh_key = ssh_key
diff --git a/qa/qa/specs/features/browser_ui/3_create/snippet/create_personal_snippet_spec.rb b/qa/qa/specs/features/browser_ui/3_create/snippet/create_personal_snippet_spec.rb
index d2b86904cd3..8445fdafdd4 100644
--- a/qa/qa/specs/features/browser_ui/3_create/snippet/create_personal_snippet_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/snippet/create_personal_snippet_spec.rb
@@ -3,7 +3,7 @@
module QA
RSpec.describe 'Create', :smoke do
describe 'Personal snippet creation' do
- it 'User creates a personal snippet' do
+ it 'User creates a personal snippet', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/840' do
Flow::Login.sign_in
Page::Main::Menu.perform do |menu|
diff --git a/qa/qa/specs/features/browser_ui/3_create/snippet/create_project_snippet_spec.rb b/qa/qa/specs/features/browser_ui/3_create/snippet/create_project_snippet_spec.rb
index 05795e9b51e..0a8f6e13b2e 100644
--- a/qa/qa/specs/features/browser_ui/3_create/snippet/create_project_snippet_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/snippet/create_project_snippet_spec.rb
@@ -3,7 +3,7 @@
module QA
RSpec.describe 'Create' do # to be converted to a smoke test once proved to be stable
describe 'Project snippet creation' do
- it 'User creates a project snippet' do
+ it 'User creates a project snippet', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/839' do
Flow::Login.sign_in
Resource::ProjectSnippet.fabricate_via_browser_ui! do |snippet|
diff --git a/qa/qa/specs/features/browser_ui/3_create/snippet/share_snippet_spec.rb b/qa/qa/specs/features/browser_ui/3_create/snippet/share_snippet_spec.rb
new file mode 100644
index 00000000000..6b21d84cb13
--- /dev/null
+++ b/qa/qa/specs/features/browser_ui/3_create/snippet/share_snippet_spec.rb
@@ -0,0 +1,63 @@
+# frozen_string_literal: true
+
+module QA
+ RSpec.describe 'Create' do
+ describe 'Sharing snippets' do
+ let(:snippet) do
+ Resource::Snippet.fabricate! do |snippet|
+ snippet.title = 'Shared snippet'
+ snippet.visibility = 'Public'
+ snippet.file_content = 'code.py'
+ snippet.file_content = 'code to be shared'
+ end
+ end
+
+ before do
+ Flow::Login.sign_in
+ end
+
+ context 'when the snippet is public' do
+ it 'can be shared with not signed-in users', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1016' do
+ snippet
+
+ sharing_link = Page::Dashboard::Snippet::Show.perform do |snippet|
+ expect(snippet).to have_embed_dropdown
+ snippet.get_sharing_link
+ end
+
+ Page::Main::Menu.perform(&:sign_out)
+
+ page.visit(sharing_link)
+
+ Page::Dashboard::Snippet::Show.perform do |snippet|
+ expect(snippet).to have_snippet_title('Shared snippet')
+ expect(snippet).to have_visibility_type(/public/i)
+ expect(snippet).to have_file_content('code to be shared')
+ expect(snippet).to have_embed_dropdown
+ end
+ end
+ end
+
+ context 'when the snippet is changed to private' do
+ it 'does not display Embed/Share dropdown', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1015' do
+ snippet
+
+ Page::Dashboard::Snippet::Show.perform do |snippet|
+ expect(snippet).to have_embed_dropdown
+
+ snippet.click_edit_button
+ end
+
+ Page::Dashboard::Snippet::Edit.perform do |snippet|
+ snippet.change_visibility_to('Private')
+ snippet.save_changes
+ end
+
+ Page::Dashboard::Snippet::Show.perform do |snippet|
+ expect(snippet).not_to have_embed_dropdown
+ end
+ end
+ end
+ end
+ end
+end
diff --git a/qa/qa/specs/features/browser_ui/3_create/web_ide/create_first_file_in_web_ide_spec.rb b/qa/qa/specs/features/browser_ui/3_create/web_ide/create_first_file_in_web_ide_spec.rb
index fbf70153e1d..ea821f8b3e6 100644
--- a/qa/qa/specs/features/browser_ui/3_create/web_ide/create_first_file_in_web_ide_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/web_ide/create_first_file_in_web_ide_spec.rb
@@ -17,7 +17,7 @@ module QA
Flow::Login.sign_in
end
- it "creates the first file in an empty project via Web IDE" do
+ it "creates the first file in an empty project via Web IDE", testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/847' do
# In the first iteration, the test opens Web IDE by modifying the URL to address past regressions.
# Once the Web IDE button is introduced for empty projects, the test will be modified to go through UI.
# See https://gitlab.com/gitlab-org/gitlab/-/issues/27915 and https://gitlab.com/gitlab-org/gitlab/-/issues/27535.
diff --git a/qa/qa/specs/features/browser_ui/3_create/web_ide/open_fork_in_web_ide_spec.rb b/qa/qa/specs/features/browser_ui/3_create/web_ide/open_fork_in_web_ide_spec.rb
index ad7455242bc..e2fa487c937 100644
--- a/qa/qa/specs/features/browser_ui/3_create/web_ide/open_fork_in_web_ide_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/web_ide/open_fork_in_web_ide_spec.rb
@@ -14,7 +14,7 @@ module QA
let(:user) { Resource::User.fabricate_or_use(Runtime::Env.gitlab_qa_username_1, Runtime::Env.gitlab_qa_password_1) }
context 'when no fork is present' do
- it 'suggests to create a fork when a user clicks Web IDE in the main project' do
+ it 'suggests to create a fork when a user clicks Web IDE in the main project', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/959' do
Flow::Login.sign_in(as: user)
parent_project.visit!
@@ -34,7 +34,7 @@ module QA
end
end
- it 'opens the fork when a user clicks Web IDE in the main project' do
+ it 'opens the fork when a user clicks Web IDE in the main project', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/960' do
Flow::Login.sign_in(as: user)
fork_project.upstream.visit!
Page::Project::Show.perform do |project_page|
diff --git a/qa/qa/specs/features/browser_ui/3_create/web_ide/review_merge_request_spec.rb b/qa/qa/specs/features/browser_ui/3_create/web_ide/review_merge_request_spec.rb
index 7e0d8822101..4e1b6b6094e 100644
--- a/qa/qa/specs/features/browser_ui/3_create/web_ide/review_merge_request_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/web_ide/review_merge_request_spec.rb
@@ -20,7 +20,7 @@ module QA
merge_request.visit!
end
- it 'opens and edits a merge request in Web IDE' do
+ it 'opens and edits a merge request in Web IDE', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/705' do
Page::MergeRequest::Show.perform do |show|
show.click_open_in_web_ide
end
diff --git a/qa/qa/specs/features/browser_ui/3_create/wiki/project_based_content_creation_spec.rb b/qa/qa/specs/features/browser_ui/3_create/wiki/project_based_content_creation_spec.rb
index 77a5998362c..6044c87d24e 100644
--- a/qa/qa/specs/features/browser_ui/3_create/wiki/project_based_content_creation_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/wiki/project_based_content_creation_spec.rb
@@ -15,7 +15,7 @@ module QA
Flow::Login.sign_in
end
- it 'by adding a home page to the wiki' do
+ it 'by adding a home page to the wiki', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/856' do
project.visit!
Page::Project::Menu.perform(&:click_wiki)
@@ -35,7 +35,7 @@ module QA
end
end
- it 'by adding a second page to the wiki' do
+ it 'by adding a second page to the wiki', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/855' do
wiki.visit!
Page::Project::Wiki::Show.perform(&:click_new_page)
@@ -54,7 +54,7 @@ module QA
end
end
- it 'by adding a home page to the wiki using git push' do
+ it 'by adding a home page to the wiki using git push', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/853' do
empty_wiki = Resource::Wiki::ProjectPage.new do |empty_wiki|
empty_wiki.project = project
end
@@ -73,7 +73,7 @@ module QA
end
end
- it 'by adding a second page to the wiki using git push' do
+ it 'by adding a second page to the wiki using git push', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/854' do
Resource::Repository::WikiPush.fabricate! do |push|
push.file_name = "#{new_wiki_title}.md"
push.file_content = new_wiki_content
diff --git a/qa/qa/specs/features/browser_ui/3_create/wiki/project_based_content_manipulation_spec.rb b/qa/qa/specs/features/browser_ui/3_create/wiki/project_based_content_manipulation_spec.rb
index dbc7798a594..30a91c2e254 100644
--- a/qa/qa/specs/features/browser_ui/3_create/wiki/project_based_content_manipulation_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/wiki/project_based_content_manipulation_spec.rb
@@ -14,7 +14,7 @@ module QA
Flow::Login.sign_in
end
- it 'by manipulating content on the page' do
+ it 'by manipulating content on the page', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/857' do
wiki.visit!
Page::Project::Wiki::Show.perform(&:click_edit)
@@ -33,7 +33,7 @@ module QA
end
end
- it 'by manipulating content on the page using git push' do
+ it 'by manipulating content on the page using git push', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/858' do
Resource::Repository::WikiPush.fabricate! do |push|
push.file_content = new_wiki_content
push.commit_message = commit_message
diff --git a/qa/qa/specs/features/browser_ui/3_create/wiki/project_based_directory_management_spec.rb b/qa/qa/specs/features/browser_ui/3_create/wiki/project_based_directory_management_spec.rb
index e0d54611731..e8053600930 100644
--- a/qa/qa/specs/features/browser_ui/3_create/wiki/project_based_directory_management_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/wiki/project_based_directory_management_spec.rb
@@ -10,7 +10,7 @@ module QA
Flow::Login.sign_in
end
- it 'has changed the directory' do
+ it 'has changed the directory', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/948' do
initial_wiki.visit!
Page::Project::Wiki::Show.perform(&:click_edit)
diff --git a/qa/qa/specs/features/browser_ui/3_create/wiki/project_based_list_spec.rb b/qa/qa/specs/features/browser_ui/3_create/wiki/project_based_list_spec.rb
index d7f59abc361..dcf52f7c744 100644
--- a/qa/qa/specs/features/browser_ui/3_create/wiki/project_based_list_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/wiki/project_based_list_spec.rb
@@ -15,7 +15,7 @@ module QA
end
context 'Sidebar' do
- it 'has all expected links that work' do
+ it 'has all expected links that work', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/903' do
small_wiki.visit!
small_number_of_pages.times do |index|
@@ -35,7 +35,7 @@ module QA
end
context 'Page List' do
- it 'has all expected links that work' do
+ it 'has all expected links that work', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/902' do
large_wiki.visit!
Page::Project::Wiki::Show.perform(&:click_view_all_pages)
diff --git a/qa/qa/specs/features/browser_ui/3_create/wiki/project_based_page_deletion_spec.rb b/qa/qa/specs/features/browser_ui/3_create/wiki/project_based_page_deletion_spec.rb
index 923c7332748..d2b18d81670 100644
--- a/qa/qa/specs/features/browser_ui/3_create/wiki/project_based_page_deletion_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/wiki/project_based_page_deletion_spec.rb
@@ -10,7 +10,7 @@ module QA
end
context 'Page deletion' do
- it 'has removed the deleted page correctly' do
+ it 'has removed the deleted page correctly', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/921' do
initial_wiki.visit!
Page::Project::Wiki::Show.perform(&:click_edit)
diff --git a/qa/qa/specs/features/browser_ui/4_verify/ci_variable/add_remove_ci_variable_spec.rb b/qa/qa/specs/features/browser_ui/4_verify/ci_variable/add_remove_ci_variable_spec.rb
index fd342503a5c..cc4d0e1f6b5 100644
--- a/qa/qa/specs/features/browser_ui/4_verify/ci_variable/add_remove_ci_variable_spec.rb
+++ b/qa/qa/specs/features/browser_ui/4_verify/ci_variable/add_remove_ci_variable_spec.rb
@@ -16,7 +16,7 @@ module QA
open_ci_cd_settings
end
- it 'user adds a CI variable' do
+ it 'user adds a CI variable', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/395' do
Page::Project::Settings::CICD.perform do |settings|
settings.expand_ci_variables do |page|
expect(page).to have_text('VARIABLE_KEY')
@@ -29,7 +29,7 @@ module QA
end
end
- it 'user removes a CI variable' do
+ it 'user removes a CI variable', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/394' do
Page::Project::Settings::CICD.perform do |settings|
settings.expand_ci_variables do |page|
page.click_edit_ci_variable
diff --git a/qa/qa/specs/features/browser_ui/4_verify/pipeline/create_and_process_pipeline_spec.rb b/qa/qa/specs/features/browser_ui/4_verify/pipeline/create_and_process_pipeline_spec.rb
index 68b4a38a043..326647b25f7 100644
--- a/qa/qa/specs/features/browser_ui/4_verify/pipeline/create_and_process_pipeline_spec.rb
+++ b/qa/qa/specs/features/browser_ui/4_verify/pipeline/create_and_process_pipeline_spec.rb
@@ -24,7 +24,7 @@ module QA
runner.remove_via_api!
end
- it 'users creates a pipeline which gets processed', :smoke do
+ it 'users creates a pipeline which gets processed', :smoke, testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/391' do
Flow::Login.sign_in
Resource::Repository::Commit.fabricate_via_api! do |commit|
diff --git a/qa/qa/specs/features/browser_ui/4_verify/runner/register_runner_spec.rb b/qa/qa/specs/features/browser_ui/4_verify/runner/register_runner_spec.rb
index 82b15acb664..a296d60b27c 100644
--- a/qa/qa/specs/features/browser_ui/4_verify/runner/register_runner_spec.rb
+++ b/qa/qa/specs/features/browser_ui/4_verify/runner/register_runner_spec.rb
@@ -15,7 +15,7 @@ module QA
runner.remove_via_api!
end
- it 'user registers a new specific runner' do
+ it 'user registers a new specific runner', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/392' do
Flow::Login.sign_in
runner.project.visit!
diff --git a/qa/qa/specs/features/browser_ui/4_verify/testing/view_code_coverage_spec.rb b/qa/qa/specs/features/browser_ui/4_verify/testing/view_code_coverage_spec.rb
index 0436da40982..f4edaaa84a8 100644
--- a/qa/qa/specs/features/browser_ui/4_verify/testing/view_code_coverage_spec.rb
+++ b/qa/qa/specs/features/browser_ui/4_verify/testing/view_code_coverage_spec.rb
@@ -33,7 +33,7 @@ module QA
runner.remove_via_api!
end
- it 'creates an MR with code coverage statistics' do
+ it 'creates an MR with code coverage statistics', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/807' do
runner.project.visit!
configure_code_coverage(simplecov)
merge_request.visit!
diff --git a/qa/qa/specs/features/browser_ui/5_package/maven_repository_spec.rb b/qa/qa/specs/features/browser_ui/5_package/maven_repository_spec.rb
index 0f04b3b6186..a617f3b3e29 100644
--- a/qa/qa/specs/features/browser_ui/5_package/maven_repository_spec.rb
+++ b/qa/qa/specs/features/browser_ui/5_package/maven_repository_spec.rb
@@ -22,7 +22,7 @@ module QA
end
end
- it 'publishes a maven package and deletes it' do
+ it 'publishes a maven package and deletes it', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/943' do
uri = URI.parse(Runtime::Scenario.gitlab_address)
gitlab_address_with_port = "#{uri.scheme}://#{uri.host}:#{uri.port}"
pom_xml = {
@@ -95,7 +95,7 @@ module QA
end
Page::Project::Packages::Index.perform do |index|
- expect(index).to have_content("Package was removed")
+ expect(index).to have_content("Package deleted successfully")
expect(index).to have_no_package(package_name)
end
end
diff --git a/qa/qa/specs/features/browser_ui/5_package/npm_registry_spec.rb b/qa/qa/specs/features/browser_ui/5_package/npm_registry_spec.rb
index 471d66c2f21..e97ede35610 100644
--- a/qa/qa/specs/features/browser_ui/5_package/npm_registry_spec.rb
+++ b/qa/qa/specs/features/browser_ui/5_package/npm_registry_spec.rb
@@ -21,7 +21,7 @@ module QA
end
end
- it 'publishes an npm package and then deletes it' do
+ it 'publishes an npm package and then deletes it', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/944', quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/247281', type: :investigating } do
uri = URI.parse(Runtime::Scenario.gitlab_address)
gitlab_host_with_port = "#{uri.host}:#{uri.port}"
gitlab_address_with_port = "#{uri.scheme}://#{uri.host}:#{uri.port}"
diff --git a/qa/qa/specs/features/browser_ui/6_release/deploy_key/add_deploy_key_spec.rb b/qa/qa/specs/features/browser_ui/6_release/deploy_key/add_deploy_key_spec.rb
index d67fd96d338..87bd2b76560 100644
--- a/qa/qa/specs/features/browser_ui/6_release/deploy_key/add_deploy_key_spec.rb
+++ b/qa/qa/specs/features/browser_ui/6_release/deploy_key/add_deploy_key_spec.rb
@@ -3,7 +3,7 @@
module QA
RSpec.describe 'Release' do
describe 'Deploy key creation' do
- it 'user adds a deploy key' do
+ it 'user adds a deploy key', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/390' do
Flow::Login.sign_in
key = Runtime::Key::RSA.new
diff --git a/qa/qa/specs/features/browser_ui/6_release/deploy_token/add_deploy_token_spec.rb b/qa/qa/specs/features/browser_ui/6_release/deploy_token/add_deploy_token_spec.rb
index 9bee5c5ee08..de035e3278a 100644
--- a/qa/qa/specs/features/browser_ui/6_release/deploy_token/add_deploy_token_spec.rb
+++ b/qa/qa/specs/features/browser_ui/6_release/deploy_token/add_deploy_token_spec.rb
@@ -3,7 +3,7 @@
module QA
RSpec.describe 'Release', quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/213222', type: :flaky } do
describe 'Deploy token creation' do
- it 'user adds a deploy token' do
+ it 'user adds a deploy token', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/419' do
Flow::Login.sign_in
deploy_token_name = 'deploy token name'
diff --git a/qa/qa/specs/features/browser_ui/6_release/pipeline/parent_child_pipelines_dependent_relationship_spec.rb b/qa/qa/specs/features/browser_ui/6_release/pipeline/parent_child_pipelines_dependent_relationship_spec.rb
index ba36e4fa290..47a1b3b5670 100644
--- a/qa/qa/specs/features/browser_ui/6_release/pipeline/parent_child_pipelines_dependent_relationship_spec.rb
+++ b/qa/qa/specs/features/browser_ui/6_release/pipeline/parent_child_pipelines_dependent_relationship_spec.rb
@@ -25,7 +25,7 @@ module QA
runner.remove_via_api!
end
- it 'parent pipelines passes if child passes' do
+ it 'parent pipelines passes if child passes', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/751' do
add_ci_files(success_child_ci_file)
view_pipelines
@@ -35,7 +35,7 @@ module QA
end
end
- it 'parent pipeline fails if child fails' do
+ it 'parent pipeline fails if child fails', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/752' do
add_ci_files(fail_child_ci_file)
view_pipelines
diff --git a/qa/qa/specs/features/browser_ui/6_release/pipeline/parent_child_pipelines_independent_relationship_spec.rb b/qa/qa/specs/features/browser_ui/6_release/pipeline/parent_child_pipelines_independent_relationship_spec.rb
index 69f66ee4edf..9eb81244aa4 100644
--- a/qa/qa/specs/features/browser_ui/6_release/pipeline/parent_child_pipelines_independent_relationship_spec.rb
+++ b/qa/qa/specs/features/browser_ui/6_release/pipeline/parent_child_pipelines_independent_relationship_spec.rb
@@ -25,7 +25,7 @@ module QA
runner.remove_via_api!
end
- it 'parent pipelines passes if child passes' do
+ it 'parent pipelines passes if child passes', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/754' do
add_ci_files(success_child_ci_file)
view_pipelines
@@ -35,7 +35,7 @@ module QA
end
end
- it 'parent pipeline passes even if child fails' do
+ it 'parent pipeline passes even if child fails', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/753' do
add_ci_files(fail_child_ci_file)
view_pipelines
diff --git a/qa/qa/specs/features/browser_ui/7_configure/auto_devops/auto_devops_templates_spec.rb b/qa/qa/specs/features/browser_ui/7_configure/auto_devops/auto_devops_templates_spec.rb
new file mode 100644
index 00000000000..fe2d821576b
--- /dev/null
+++ b/qa/qa/specs/features/browser_ui/7_configure/auto_devops/auto_devops_templates_spec.rb
@@ -0,0 +1,64 @@
+# frozen_string_literal: true
+
+module QA
+ RSpec.describe 'Configure' do
+ describe 'AutoDevOps Templates', only: { subdomain: :staging } do
+ # specify jobs to be disabled in the pipeline.
+ # CANARY_ENABLED will allow the pipeline to be
+ # blocked by a manual job, rather than fail
+ # during the production run
+ let(:optional_jobs) do
+ %w[
+ LICENSE_MANAGEMENT_DISABLED
+ SAST_DISABLED DAST_DISABLED
+ DEPENDENCY_SCANNING_DISABLED
+ CONTAINER_SCANNING_DISABLED
+ CANARY_ENABLED
+ ]
+ end
+
+ where(:template) do
+ %w[rails spring express]
+ end
+
+ with_them do
+ let!(:project) do
+ Resource::Project.fabricate_via_api! do |project|
+ project.name = "#{template}-autodevops-project-template"
+ project.template_name = template
+ project.description = "Let's see if the #{template} project works..."
+ project.auto_devops_enabled = true
+ end
+ end
+
+ let(:pipeline) do
+ Resource::Pipeline.fabricate_via_api! do |pipeline|
+ pipeline.project = project
+ pipeline.variables =
+ optional_jobs.map do |job|
+ { key: job, value: '1', variable_type: 'env_var' }
+ end
+ end
+ end
+
+ before do
+ Flow::Login.sign_in
+ end
+
+ it 'works with Auto DevOps', quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/240946', type: :flaky } do
+ %w[build code_quality test].each do |job|
+ pipeline.visit!
+
+ Page::Project::Pipeline::Show.perform do |show_page|
+ show_page.click_job(job)
+ end
+
+ Page::Project::Job::Show.perform do |show|
+ expect(show).to have_passed(timeout: 360)
+ end
+ end
+ end
+ end
+ end
+ end
+end
diff --git a/qa/qa/specs/features/browser_ui/7_configure/auto_devops/create_project_with_auto_devops_spec.rb b/qa/qa/specs/features/browser_ui/7_configure/auto_devops/create_project_with_auto_devops_spec.rb
index 3e25ecfd45d..53a1c8010af 100644
--- a/qa/qa/specs/features/browser_ui/7_configure/auto_devops/create_project_with_auto_devops_spec.rb
+++ b/qa/qa/specs/features/browser_ui/7_configure/auto_devops/create_project_with_auto_devops_spec.rb
@@ -23,7 +23,7 @@ module QA
cluster&.remove!
end
- it 'runs auto devops' do
+ it 'runs auto devops', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/702' do
Flow::Login.sign_in
# Set an application secret CI variable (prefixed with K8S_SECRET_)
@@ -116,7 +116,7 @@ module QA
end
end
- it 'runs an AutoDevOps pipeline' do
+ it 'runs an AutoDevOps pipeline', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/444' do
Page::Project::Menu.perform(&:click_ci_cd_pipelines)
Page::Project::Pipeline::Index.perform(&:click_on_latest_pipeline)
diff --git a/qa/qa/specs/features/browser_ui/7_configure/kubernetes/kubernetes_integration_spec.rb b/qa/qa/specs/features/browser_ui/7_configure/kubernetes/kubernetes_integration_spec.rb
index 5073b715341..09fbbf5adc5 100644
--- a/qa/qa/specs/features/browser_ui/7_configure/kubernetes/kubernetes_integration_spec.rb
+++ b/qa/qa/specs/features/browser_ui/7_configure/kubernetes/kubernetes_integration_spec.rb
@@ -20,7 +20,7 @@ module QA
cluster.remove!
end
- it 'can create and associate a project cluster', :smoke do
+ it 'can create and associate a project cluster', :smoke, testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/707' do
Resource::KubernetesCluster::ProjectCluster.fabricate_via_browser_ui! do |k8s_cluster|
k8s_cluster.project = project
k8s_cluster.cluster = cluster
diff --git a/qa/qa/specs/features/browser_ui/8_monitor/all_monitor_core_features_spec.rb b/qa/qa/specs/features/browser_ui/8_monitor/all_monitor_core_features_spec.rb
index 54c7b75d1d1..07fc4f0e7fa 100644
--- a/qa/qa/specs/features/browser_ui/8_monitor/all_monitor_core_features_spec.rb
+++ b/qa/qa/specs/features/browser_ui/8_monitor/all_monitor_core_features_spec.rb
@@ -1,177 +1,141 @@
# frozen_string_literal: true
+require_relative 'cluster_with_prometheus.rb'
module QA
- RSpec.describe 'Monitor' do
- describe 'with Prometheus in a Gitlab-managed cluster', :orchestrated, :kubernetes, :requires_admin do
- before :all do
- @cluster = Service::KubernetesCluster.new(provider_class: Service::ClusterProvider::K3s).create!
- @project = Resource::Project.fabricate_via_api! do |project|
- project.name = 'monitoring-project'
- project.auto_devops_enabled = true
- project.template_name = 'express'
- end
-
- deploy_project_with_prometheus
- end
+ RSpec.describe 'Monitor', :orchestrated, :kubernetes, :requires_admin, quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/241448', type: :investigating } do
+ include_context "cluster with Prometheus installed"
- before do
- Flow::Login.sign_in_unless_signed_in
- @project.visit!
- end
+ before do
+ Flow::Login.sign_in_unless_signed_in
+ @project.visit!
+ end
- after :all do
- @cluster.remove!
- end
+ it 'configures custom metrics', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/872' do
+ verify_add_custom_metric
+ verify_edit_custom_metric
+ verify_delete_custom_metric
+ end
+
+ it 'duplicates to create dashboard to custom', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/871' do
+ Page::Project::Menu.perform(&:go_to_operations_metrics)
- it 'configures custom metrics' do
- verify_add_custom_metric
- verify_edit_custom_metric
- verify_delete_custom_metric
+ Page::Project::Operations::Metrics::Show.perform do |on_dashboard|
+ on_dashboard.duplicate_dashboard
+
+ expect(on_dashboard).to have_metrics
+ expect(on_dashboard).to have_edit_dashboard_enabled
end
+ end
- it 'duplicates to create dashboard to custom' do
- Page::Project::Menu.perform(&:go_to_operations_metrics)
+ it 'verifies data on filtered deployed environment', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/874' do
+ Page::Project::Menu.perform(&:go_to_operations_metrics)
- Page::Project::Operations::Metrics::Show.perform do |on_dashboard|
- on_dashboard.duplicate_dashboard
+ Page::Project::Operations::Metrics::Show.perform do |on_dashboard|
+ on_dashboard.filter_environment
- expect(on_dashboard).to have_metrics
- expect(on_dashboard).to have_edit_dashboard_enabled
- end
+ expect(on_dashboard).to have_metrics
end
+ end
- it 'verifies data on filtered deployed environment' do
- Page::Project::Menu.perform(&:go_to_operations_metrics)
+ it 'filters using the quick range', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/873' do
+ Page::Project::Menu.perform(&:go_to_operations_metrics)
- Page::Project::Operations::Metrics::Show.perform do |on_dashboard|
- on_dashboard.filter_environment
+ Page::Project::Operations::Metrics::Show.perform do |on_dashboard|
+ on_dashboard.show_last('30 minutes')
+ expect(on_dashboard).to have_metrics
- expect(on_dashboard).to have_metrics
- end
+ on_dashboard.show_last('3 hours')
+ expect(on_dashboard).to have_metrics
+
+ on_dashboard.show_last('1 day')
+ expect(on_dashboard).to have_metrics
end
+ end
- it 'filters using the quick range' do
- Page::Project::Menu.perform(&:go_to_operations_metrics)
+ it 'observes cluster health graph', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/920' do
+ Page::Project::Menu.perform(&:go_to_operations_kubernetes)
- Page::Project::Operations::Metrics::Show.perform do |on_dashboard|
- on_dashboard.show_last('30 minutes')
- expect(on_dashboard).to have_metrics
+ Page::Project::Operations::Kubernetes::Index.perform do |cluster_list|
+ cluster_list.click_on_cluster(@cluster)
+ end
- on_dashboard.show_last('3 hours')
- expect(on_dashboard).to have_metrics
+ Page::Project::Operations::Kubernetes::Show.perform do |cluster_panel|
+ cluster_panel.open_health
+ cluster_panel.wait_for_cluster_health
+ end
+ end
- on_dashboard.show_last('1 day')
- expect(on_dashboard).to have_metrics
- end
+ it 'uses templating variables for metrics dashboards' do
+ templating_dashboard_yml = Pathname
+ .new(__dir__)
+ .join('../../../../fixtures/metrics_dashboards/templating.yml')
+
+ Resource::Repository::ProjectPush.fabricate! do |push|
+ push.project = @project
+ push.file_name = '.gitlab/dashboards/templating.yml'
+ push.file_content = File.read(templating_dashboard_yml)
+ push.commit_message = 'Add templating in dashboard file'
+ push.new_branch = false
end
- it 'observes cluster health graph' do
- Page::Project::Menu.perform(&:go_to_operations_kubernetes)
+ Page::Project::Menu.perform(&:go_to_operations_metrics)
- Page::Project::Operations::Kubernetes::Index.perform do |cluster_list|
- cluster_list.click_on_cluster(@cluster)
- end
+ Page::Project::Operations::Metrics::Show.perform do |dashboard|
+ dashboard.select_dashboard('templating.yml')
- Page::Project::Operations::Kubernetes::Show.perform do |cluster_panel|
- cluster_panel.open_health
- cluster_panel.wait_for_cluster_health
- end
+ expect(dashboard).to have_template_metric('CPU usage GitLab Runner')
+ expect(dashboard).to have_template_metric('Memory usage Postgresql')
+ expect(dashboard).to have_templating_variable('GitLab Runner')
+ expect(dashboard).to have_templating_variable('Postgresql')
end
+ end
- private
-
- def deploy_project_with_prometheus
- %w[
- CODE_QUALITY_DISABLED TEST_DISABLED LICENSE_MANAGEMENT_DISABLED
- SAST_DISABLED DAST_DISABLED DEPENDENCY_SCANNING_DISABLED
- CONTAINER_SCANNING_DISABLED PERFORMANCE_DISABLED SECRET_DETECTION_DISABLED
- ].each do |key|
- Resource::CiVariable.fabricate_via_api! do |resource|
- resource.project = @project
- resource.key = key
- resource.value = '1'
- resource.masked = false
- end
- end
-
- Flow::Login.sign_in
-
- Resource::KubernetesCluster::ProjectCluster.fabricate! do |cluster_settings|
- cluster_settings.project = @project
- cluster_settings.cluster = @cluster
- cluster_settings.install_runner = true
- cluster_settings.install_ingress = true
- cluster_settings.install_prometheus = true
- end
-
- Resource::Pipeline.fabricate_via_api! do |pipeline|
- pipeline.project = @project
- end.visit!
-
- Page::Project::Pipeline::Show.perform do |pipeline|
- pipeline.click_job('build')
- end
- Page::Project::Job::Show.perform do |job|
- expect(job).to be_successful(timeout: 600)
-
- job.click_element(:pipeline_path)
- end
-
- Page::Project::Pipeline::Show.perform do |pipeline|
- pipeline.click_job('production')
- end
- Page::Project::Job::Show.perform do |job|
- expect(job).to be_successful(timeout: 1200)
-
- job.click_element(:pipeline_path)
- end
- end
+ private
- def verify_add_custom_metric
- Page::Project::Menu.perform(&:go_to_integrations_settings)
- Page::Project::Settings::Integrations.perform(&:click_on_prometheus_integration)
+ def verify_add_custom_metric
+ Page::Project::Menu.perform(&:go_to_integrations_settings)
+ Page::Project::Settings::Integrations.perform(&:click_on_prometheus_integration)
- Page::Project::Settings::Services::Prometheus.perform do |metrics_panel|
- metrics_panel.click_on_new_metric
- metrics_panel.add_custom_metric
- end
+ Page::Project::Settings::Services::Prometheus.perform do |metrics_panel|
+ metrics_panel.click_on_new_metric
+ metrics_panel.add_custom_metric
+ end
- Page::Project::Menu.perform(&:go_to_operations_metrics)
+ Page::Project::Menu.perform(&:go_to_operations_metrics)
- Page::Project::Operations::Metrics::Show.perform do |on_dashboard|
- expect(on_dashboard).to have_custom_metric('HTTP Requests Total')
- end
+ Page::Project::Operations::Metrics::Show.perform do |on_dashboard|
+ expect(on_dashboard).to have_custom_metric('HTTP Requests Total')
end
+ end
- def verify_edit_custom_metric
- Page::Project::Menu.perform(&:go_to_integrations_settings)
- Page::Project::Settings::Integrations.perform(&:click_on_prometheus_integration)
- Page::Project::Settings::Services::Prometheus.perform do |metrics_panel|
- metrics_panel.click_on_custom_metric('Business / HTTP Requests Total (req/sec)')
- metrics_panel.edit_custom_metric
- end
+ def verify_edit_custom_metric
+ Page::Project::Menu.perform(&:go_to_integrations_settings)
+ Page::Project::Settings::Integrations.perform(&:click_on_prometheus_integration)
+ Page::Project::Settings::Services::Prometheus.perform do |metrics_panel|
+ metrics_panel.click_on_custom_metric('Business / HTTP Requests Total (req/sec)')
+ metrics_panel.edit_custom_metric
+ end
- Page::Project::Menu.perform(&:go_to_operations_metrics)
+ Page::Project::Menu.perform(&:go_to_operations_metrics)
- Page::Project::Operations::Metrics::Show.perform do |on_dashboard|
- expect(on_dashboard).to have_custom_metric('Throughput')
- end
+ Page::Project::Operations::Metrics::Show.perform do |on_dashboard|
+ expect(on_dashboard).to have_custom_metric('Throughput')
end
+ end
- def verify_delete_custom_metric
- Page::Project::Menu.perform(&:go_to_integrations_settings)
- Page::Project::Settings::Integrations.perform(&:click_on_prometheus_integration)
+ def verify_delete_custom_metric
+ Page::Project::Menu.perform(&:go_to_integrations_settings)
+ Page::Project::Settings::Integrations.perform(&:click_on_prometheus_integration)
- Page::Project::Settings::Services::Prometheus.perform do |metrics_panel|
- metrics_panel.click_on_custom_metric('Business / Throughput (req/sec)')
- metrics_panel.delete_custom_metric
- end
+ Page::Project::Settings::Services::Prometheus.perform do |metrics_panel|
+ metrics_panel.click_on_custom_metric('Business / Throughput (req/sec)')
+ metrics_panel.delete_custom_metric
+ end
- Page::Project::Menu.perform(&:go_to_operations_metrics)
+ Page::Project::Menu.perform(&:go_to_operations_metrics)
- Page::Project::Operations::Metrics::Show.perform do |on_dashboard|
- expect(on_dashboard).not_to have_custom_metric('Throughput')
- end
+ Page::Project::Operations::Metrics::Show.perform do |on_dashboard|
+ expect(on_dashboard).not_to have_custom_metric('Throughput')
end
end
end
diff --git a/qa/qa/specs/features/browser_ui/8_monitor/cluster_with_prometheus.rb b/qa/qa/specs/features/browser_ui/8_monitor/cluster_with_prometheus.rb
new file mode 100644
index 00000000000..ed0064e8b6f
--- /dev/null
+++ b/qa/qa/specs/features/browser_ui/8_monitor/cluster_with_prometheus.rb
@@ -0,0 +1,67 @@
+# frozen_string_literal: true
+
+module QA
+ RSpec.shared_context "cluster with Prometheus installed" do
+ before :all do
+ @cluster = Service::KubernetesCluster.new(provider_class: Service::ClusterProvider::K3s).create!
+ @project = Resource::Project.fabricate_via_api! do |project|
+ project.name = 'monitoring-project'
+ project.auto_devops_enabled = true
+ project.template_name = 'express'
+ end
+
+ deploy_project_with_prometheus
+ end
+
+ def deploy_project_with_prometheus
+ %w[
+ CODE_QUALITY_DISABLED TEST_DISABLED LICENSE_MANAGEMENT_DISABLED
+ SAST_DISABLED DAST_DISABLED DEPENDENCY_SCANNING_DISABLED
+ CONTAINER_SCANNING_DISABLED PERFORMANCE_DISABLED SECRET_DETECTION_DISABLED
+ ].each do |key|
+ Resource::CiVariable.fabricate_via_api! do |resource|
+ resource.project = @project
+ resource.key = key
+ resource.value = '1'
+ resource.masked = false
+ end
+ end
+
+ Flow::Login.sign_in
+
+ Resource::KubernetesCluster::ProjectCluster.fabricate! do |cluster_settings|
+ cluster_settings.project = @project
+ cluster_settings.cluster = @cluster
+ cluster_settings.install_runner = true
+ cluster_settings.install_ingress = true
+ cluster_settings.install_prometheus = true
+ end
+
+ Resource::Pipeline.fabricate_via_api! do |pipeline|
+ pipeline.project = @project
+ end.visit!
+
+ Page::Project::Pipeline::Show.perform do |pipeline|
+ pipeline.click_job('build')
+ end
+ Page::Project::Job::Show.perform do |job|
+ expect(job).to be_successful(timeout: 600)
+
+ job.click_element(:pipeline_path)
+ end
+
+ Page::Project::Pipeline::Show.perform do |pipeline|
+ pipeline.click_job('production')
+ end
+ Page::Project::Job::Show.perform do |job|
+ expect(job).to be_successful(timeout: 1200)
+
+ job.click_element(:pipeline_path)
+ end
+ end
+
+ after :all do
+ @cluster&.remove!
+ end
+ end
+end
diff --git a/qa/qa/specs/features/browser_ui/non_devops/performance_bar_spec.rb b/qa/qa/specs/features/browser_ui/non_devops/performance_bar_spec.rb
index 73bb6aeb5fd..8dca0d6698e 100644
--- a/qa/qa/specs/features/browser_ui/non_devops/performance_bar_spec.rb
+++ b/qa/qa/specs/features/browser_ui/non_devops/performance_bar_spec.rb
@@ -20,7 +20,7 @@ module QA
end
end
- it 'shows results for the original request and AJAX requests' do
+ it 'shows results for the original request and AJAX requests', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/478', quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/247467', type: :investigating } do
# Issue pages always make AJAX requests
Resource::Issue.fabricate_via_browser_ui! do |issue|
issue.title = 'Performance bar test'
diff --git a/qa/qa/specs/features/sanity/version_spec.rb b/qa/qa/specs/features/sanity/version_spec.rb
new file mode 100644
index 00000000000..cace46c3590
--- /dev/null
+++ b/qa/qa/specs/features/sanity/version_spec.rb
@@ -0,0 +1,37 @@
+# frozen_string_literal: true
+
+require 'airborne'
+
+module QA
+ # This test ensures that the version described by the `DEPLOY_VERSION`
+ # environment variable is the version actually running.
+ #
+ # See https://gitlab.com/gitlab-com/gl-infra/delivery/-/issues/1179
+ RSpec.describe 'Version sanity check', :smoke do
+ let(:api_client) { Runtime::API::Client.new(:gitlab) }
+ let(:request) { Runtime::API::Request.new(api_client, '/version') }
+
+ it 'is the specified version' do
+ # The `DEPLOY_VERSION` variable will only be provided for deploys to the
+ # `pre` and `release` environments, which only receive packaged releases.
+ #
+ # For these releases, `deploy_version` will be a package string (e.g.,
+ # `13.1.3-ee.0`), and the reported version will be something like
+ # `13.1.3-ee`, so we only compare the leading SemVer string.
+ #
+ # | Package | Version |
+ # | ---------------- | -------------- |
+ # | 13.3.5-ee.0 | 13.3.5-ee |
+ # | 13.3.0-rc42.ee.0 | 13.3.0-rc42-ee |
+ deploy = Runtime::Env.deploy_version&.gsub(/\A(\d+\.\d+\.\d+).*\z/, '\1')
+
+ skip('No deploy version provided') if deploy.nil? || deploy.empty?
+
+ get request.url
+
+ expect_status(200)
+ expect(json_body).to have_key(:version)
+ expect(json_body[:version]).to start_with(deploy)
+ end
+ end
+end
diff --git a/qa/qa/support/json_formatter.rb b/qa/qa/support/json_formatter.rb
index 5d2a3e7b75f..f6e40436ec8 100644
--- a/qa/qa/support/json_formatter.rb
+++ b/qa/qa/support/json_formatter.rb
@@ -12,19 +12,21 @@ module QA
# implementation so that it's not included.
end
- def stop(notification)
+ def stop(example_notification)
# Based on https://github.com/rspec/rspec-core/blob/main/lib/rspec/core/formatters/json_formatter.rb#L35
- # But modified to include full details of multiple exceptions
- @output_hash[:examples] = notification.examples.map do |example|
- format_example(example).tap do |hash|
- e = example.exception
+ # But modified to include full details of multiple exceptions and to provide output similar to
+ # https://github.com/sj26/rspec_junit_formatter
+ @output_hash[:examples] = example_notification.notifications.map do |notification|
+ format_example(notification.example).tap do |hash|
+ e = notification.example.exception
if e
exceptions = e.respond_to?(:all_exceptions) ? e.all_exceptions : [e]
hash[:exceptions] = exceptions.map do |exception|
{
class: exception.class.name,
message: exception.message,
- backtrace: exception.backtrace
+ message_lines: strip_ansi_codes(notification.message_lines),
+ backtrace: notification.formatted_backtrace
}
end
end
@@ -35,20 +37,37 @@ module QA
private
def format_example(example)
+ file_path, line_number = location_including_shared_examples(example.metadata)
+
{
id: example.id,
description: example.description,
full_description: example.full_description,
status: example.execution_result.status.to_s,
- file_path: example.metadata[:file_path],
- line_number: example.metadata[:line_number],
+ file_path: file_path,
+ line_number: line_number.to_i,
run_time: example.execution_result.run_time,
pending_message: example.execution_result.pending_message,
- status_issue: example.metadata[:status_issue],
+ testcase: example.metadata[:testcase],
quarantine: example.metadata[:quarantine],
screenshot: example.metadata[:screenshot]
}
end
+
+ def location_including_shared_examples(metadata)
+ if metadata[:shared_group_inclusion_backtrace].empty?
+ [metadata[:file_path], metadata[:line_number]]
+ else
+ # If there are nested shared examples, the outermost location is last in the array
+ metadata[:shared_group_inclusion_backtrace].last.formatted_inclusion_location.split(':')
+ end
+ end
+
+ def strip_ansi_codes(strings)
+ # The code below is from https://github.com/piotrmurach/pastel/blob/master/lib/pastel/color.rb
+ modified = Array(strings).map { |string| string.dup.gsub(/\x1b\[{1,2}[0-9;:?]*m/m, '') }
+ modified.size == 1 ? modified[0] : modified
+ end
end
end
end
diff --git a/qa/spec/page/validator_spec.rb b/qa/spec/page/validator_spec.rb
index bdff96e267c..c727cfb686e 100644
--- a/qa/spec/page/validator_spec.rb
+++ b/qa/spec/page/validator_spec.rb
@@ -32,7 +32,7 @@ describe QA::Page::Validator do
let(:view) { spy('view') }
before do
- allow(QA::Page::Admin::Settings::Repository)
+ allow(QA::Page::Admin::Settings::Network)
.to receive(:views).and_return([view])
end
diff --git a/qa/spec/runtime/application_settings_spec.rb b/qa/spec/runtime/application_settings_spec.rb
index fce0361aee0..e48214b22e6 100644
--- a/qa/spec/runtime/application_settings_spec.rb
+++ b/qa/spec/runtime/application_settings_spec.rb
@@ -16,12 +16,14 @@ describe QA::Runtime::ApplicationSettings do
.with(api_client, '/application/settings')
.and_return(request)
+ expect(described_class).to receive(:get_application_settings)
+
expect(described_class)
.to receive(:put)
.with(request.url, { allow_local_requests_from_web_hooks_and_services: true })
.and_return(Struct.new(:code).new(200))
- subject.set_application_settings(allow_local_requests_from_web_hooks_and_services: true)
+ described_class.set_application_settings(allow_local_requests_from_web_hooks_and_services: true)
end
end
@@ -37,7 +39,7 @@ describe QA::Runtime::ApplicationSettings do
.with(request.url)
.and_return(get_response)
- subject.get_application_settings
+ described_class.get_application_settings
end
end
end
diff --git a/qa/spec/runtime/namespace_spec.rb b/qa/spec/runtime/namespace_spec.rb
new file mode 100644
index 00000000000..d24fa509f30
--- /dev/null
+++ b/qa/spec/runtime/namespace_spec.rb
@@ -0,0 +1,51 @@
+# frozen_string_literal: true
+
+describe QA::Runtime::Namespace do
+ include Helpers::StubENV
+
+ describe '.name' do
+ context 'when CACHE_NAMESPACE_NAME is not defined' do
+ before do
+ stub_env('CACHE_NAMESPACE_NAME', nil)
+ end
+
+ it 'caches name by default' do
+ name = described_class.name
+ expect(described_class.name).to eq(name)
+ end
+
+ it 'does not cache name when reset_cache is true' do
+ name = described_class.name
+ expect(described_class.name(reset_cache: true)).not_to eq(name)
+ end
+ end
+
+ context 'when CACHE_NAMESPACE_NAME is defined' do
+ before do
+ stub_env('CACHE_NAMESPACE_NAME', 'true')
+ end
+
+ it 'caches name by default' do
+ name = described_class.name
+ expect(described_class.name).to eq(name)
+ end
+
+ it 'caches name when reset_cache is false' do
+ name = described_class.name
+ expect(described_class.name(reset_cache: false)).to eq(name)
+ end
+
+ it 'does not cache name when reset_cache is true' do
+ name = described_class.name
+ expect(described_class.name(reset_cache: true)).not_to eq(name)
+ end
+ end
+ end
+
+ describe '.path' do
+ it 'is always cached' do
+ path = described_class.path
+ expect(described_class.path).to eq(path)
+ end
+ end
+end
diff --git a/qa/spec/spec_helper.rb b/qa/spec/spec_helper.rb
index 0f818b9f89a..81730c3ab13 100644
--- a/qa/spec/spec_helper.rb
+++ b/qa/spec/spec_helper.rb
@@ -2,6 +2,7 @@
require_relative '../qa'
require 'rspec/retry'
+require 'rspec-parameterized'
if ENV['CI'] && QA::Runtime::Env.knapsack? && !ENV['NO_KNAPSACK']
require 'knapsack'
@@ -12,9 +13,9 @@ QA::Runtime::Browser.configure!
QA::Runtime::Scenario.from_env(QA::Runtime::Env.runtime_scenario_attributes) if QA::Runtime::Env.runtime_scenario_attributes
-Dir[::File.join(__dir__, "support/helpers/*.rb")].each { |f| require f }
-Dir[::File.join(__dir__, "support/shared_contexts/*.rb")].each { |f| require f }
-Dir[::File.join(__dir__, "support/shared_examples/*.rb")].each { |f| require f }
+Dir[::File.join(__dir__, "support/helpers/*.rb")].sort.each { |f| require f }
+Dir[::File.join(__dir__, "support/shared_contexts/*.rb")].sort.each { |f| require f }
+Dir[::File.join(__dir__, "support/shared_examples/*.rb")].sort.each { |f| require f }
RSpec.configure do |config|
QA::Specs::Helpers::Quarantine.configure_rspec