summaryrefslogtreecommitdiff
path: root/qa/qa/specs/features/browser_ui
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-07-20 12:26:25 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-07-20 12:26:25 +0000
commita09983ae35713f5a2bbb100981116d31ce99826e (patch)
tree2ee2af7bd104d57086db360a7e6d8c9d5d43667a /qa/qa/specs/features/browser_ui
parent18c5ab32b738c0b6ecb4d0df3994000482f34bd8 (diff)
downloadgitlab-ce-a09983ae35713f5a2bbb100981116d31ce99826e.tar.gz
Add latest changes from gitlab-org/gitlab@13-2-stable-ee
Diffstat (limited to 'qa/qa/specs/features/browser_ui')
-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.rb26
-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.rb110
-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.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/1_manage/project/import_github_repo_spec.rb17
-rw-r--r--qa/qa/specs/features/browser_ui/1_manage/project/protected_tags_spec.rb109
-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.rb2
-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.rb77
-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.rb85
-rw-r--r--qa/qa/specs/features/browser_ui/2_plan/milestone/create_group_milestone_spec.rb41
-rw-r--r--qa/qa/specs/features/browser_ui/2_plan/milestone/create_project_milestone_spec.rb41
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/gitaly/high_availability_spec.rb14
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/jira/jira_basic_integration_spec.rb23
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/merge_request/create_merge_request_spec.rb45
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/merge_request/merge_merge_request_from_fork_spec.rb15
-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.rb24
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/merge_request/view_merge_request_diff_patch_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/repository/add_file_template_spec.rb20
-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/add_ssh_key_spec.rb30
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/repository/clone_spec.rb16
-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.rb2
-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_over_http_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/repository/push_over_http_file_size_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/repository/push_over_http_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/repository/push_protected_branch_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/repository/ssh_key_support_spec.rb35
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/repository/use_ssh_key_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/repository/user_views_commit_diff_patch_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/snippet/add_comment_to_snippet_spec.rb81
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/snippet/clone_push_pull_personal_snippet_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/snippet/clone_push_pull_project_snippet_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/snippet/create_personal_snippet_spec.rb15
-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/web_ide/add_file_template_spec.rb7
-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/review_merge_request_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/wiki/project_based_content_creation_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/wiki/project_based_content_manipulation_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/wiki/project_based_list_spec.rb73
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/wiki/project_based_page_deletion_spec.rb26
-rw-r--r--qa/qa/specs/features/browser_ui/4_verify/ci_variable/add_remove_ci_variable_spec.rb2
-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/6_release/deploy_key/add_deploy_key_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/6_release/deploy_key/clone_using_deploy_key_spec.rb5
-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.rb14
-rw-r--r--qa/qa/specs/features/browser_ui/6_release/pipeline/parent_child_pipelines_independent_relationship_spec.rb14
-rw-r--r--qa/qa/specs/features/browser_ui/7_configure/auto_devops/create_project_with_auto_devops_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/7_configure/kubernetes/kubernetes_integration_spec.rb4
-rw-r--r--qa/qa/specs/features/browser_ui/8_monitor/all_monitor_core_features_spec.rb15
-rw-r--r--qa/qa/specs/features/browser_ui/non_devops/performance_bar_spec.rb4
76 files changed, 876 insertions, 210 deletions
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 7143cc574b8..5b89bcc7375 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
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
- context 'Configure', :orchestrated, :mattermost do
+ RSpec.describe 'Configure', :orchestrated, :mattermost do
describe 'Mattermost support' do
it 'user creates a group with a mattermost team' do
Flow::Login.sign_in
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 9eab03323a8..f307d286587 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
@@ -1,24 +1,32 @@
# frozen_string_literal: true
module QA
- context 'Manage' do
+ RSpec.describe 'Manage' do
describe 'Project transfer between groups' do
- it 'user transfers a project between groups' do
- Flow::Login.sign_in
-
- source_group = Resource::Group.fabricate_via_api! do |group|
+ let(:source_group) do
+ Resource::Group.fabricate_via_api! do |group|
group.path = 'source-group'
end
+ end
- target_group = Resource::Group.fabricate_via_api! do |group|
+ let(:target_group) do
+ Resource::Group.fabricate_via_api! do |group|
group.path = 'target-group'
end
+ end
- project = Resource::Project.fabricate_via_api! do |project|
+ let(:project) do
+ Resource::Project.fabricate_via_api! do |project|
project.group = source_group
project.name = 'transfer-project'
project.initialize_with_readme = true
end
+ end
+
+ let(:edited_readme_content) { 'Here is the edited content.' }
+
+ before do
+ Flow::Login.sign_in
project.visit!
@@ -28,14 +36,14 @@ module QA
Page::File::Show.perform(&:click_edit)
- edited_readme_content = 'Here is the edited content.'
-
Page::File::Edit.perform do |file|
file.remove_content
file.add_content(edited_readme_content)
file.commit_changes
end
+ end
+ it 'user transfers a project between groups' do
Page::File::Show.perform(&:go_to_general_settings)
Page::Project::Settings::Main.perform(&:expand_advanced_settings)
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 1050005a231..9cb765705e0 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
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
- context 'Manage', :smoke do
+ RSpec.describe 'Manage', :smoke do
describe 'basic user login' do
it 'user logs in using basic credentials and logs out' do
Flow::Login.sign_in
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
new file mode 100644
index 00000000000..d0ab945124b
--- /dev/null
+++ b/qa/qa/specs/features/browser_ui/1_manage/login/log_in_with_2fa_spec.rb
@@ -0,0 +1,110 @@
+# frozen_string_literal: true
+
+module QA
+ context 'Manage', :requires_admin, :skip_live_env do
+ describe '2FA' do
+ let(:owner_user) do
+ Resource::User.fabricate_or_use(Runtime::Env.gitlab_qa_2fa_owner_username_1, Runtime::Env.gitlab_qa_2fa_owner_password_1)
+ end
+
+ let(:sandbox_group) do
+ Resource::Sandbox.fabricate! do |sandbox_group|
+ sandbox_group.path = "gitlab-qa-2fa-sandbox-group"
+ sandbox_group.api_client = owner_api_client
+ end
+ end
+
+ let(:group) do
+ QA::Resource::Group.fabricate_via_api! do |group|
+ group.sandbox = sandbox_group
+ group.api_client = owner_api_client
+ group.name = 'group-with-2fa'
+ end
+ end
+
+ let(:developer_user) do
+ Resource::User.fabricate_via_api! do |resource|
+ resource.api_client = admin_api_client
+ end
+ end
+
+ let(:two_fa_expected_text) { /The group settings for.*require you to enable Two-Factor Authentication for your account.*You need to do this before/ }
+
+ before do
+ group.add_member(developer_user, Resource::Members::AccessLevel::DEVELOPER)
+ end
+
+ it 'allows enforcing 2FA via UI and logging in with 2FA' do
+ enforce_two_factor_authentication_on_group(group)
+
+ enable_two_factor_authentication_for_user(developer_user)
+
+ Flow::Login.sign_in(as: developer_user, skip_page_validation: true)
+
+ Page::Main::TwoFactorAuth.perform do |two_fa_auth|
+ two_fa_auth.set_2fa_code('000000')
+ two_fa_auth.click_verify_code_button
+ end
+
+ expect(page).to have_text('Invalid two-factor code')
+
+ Page::Main::TwoFactorAuth.perform do |two_fa_auth|
+ two_fa_auth.set_2fa_code(@otp.fresh_otp)
+ two_fa_auth.click_verify_code_button
+ end
+
+ expect(Page::Main::Menu.perform(&:signed_in?)).to be_truthy
+ end
+
+ after do
+ group.set_require_two_factor_authentication(value: 'false')
+ group.remove_via_api! do |resource|
+ resource.api_client = admin_api_client
+ end
+ developer_user.remove_via_api!
+ end
+
+ def admin_api_client
+ @admin_api_client ||= Runtime::API::Client.as_admin
+ end
+
+ def owner_api_client
+ @owner_api_client ||= Runtime::API::Client.new(:gitlab, user: owner_user)
+ end
+
+ # We are intentionally using the UI to enforce 2FA to exercise the flow with UI.
+ # Any future tests should use the API for this purpose.
+ def enforce_two_factor_authentication_on_group(group)
+ Flow::Login.while_signed_in(as: owner_user) do
+ group.visit!
+
+ Page::Group::Menu.perform(&:click_group_general_settings_item)
+ Page::Group::Settings::General.perform(&:set_require_2fa_enabled)
+
+ expect(page).to have_text(two_fa_expected_text)
+
+ Page::Profile::TwoFactorAuth.perform(&:click_configure_it_later_button)
+
+ expect(page).not_to have_text(two_fa_expected_text)
+ end
+ end
+
+ def enable_two_factor_authentication_for_user(user)
+ Flow::Login.while_signed_in(as: user) do
+ expect(page).to have_text(two_fa_expected_text)
+
+ Page::Profile::TwoFactorAuth.perform do |two_fa_auth|
+ @otp = QA::Support::OTP.new(two_fa_auth.otp_secret_content)
+
+ two_fa_auth.set_pin_code(@otp.fresh_otp)
+ two_fa_auth.click_register_2fa_app_button
+
+ expect(two_fa_auth).to have_text('Congratulations! You have enabled Two-factor Authentication!')
+
+ two_fa_auth.click_proceed_button
+ end
+ end
+ end
+ end
+ end
+end
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 46a0f1a4c8b..5933637045f 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
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
- context 'Manage', :orchestrated, :ldap_no_tls, :ldap_tls do
+ RSpec.describe 'Manage', :orchestrated, :ldap_no_tls, :ldap_tls do
describe 'LDAP login' do
it 'user logs into GitLab using LDAP credentials' do
Flow::Login.sign_in
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 a680cfa96bd..c7bd372c144 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
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
- context 'Manage', :orchestrated, :mattermost do
+ RSpec.describe 'Manage', :orchestrated, :mattermost do
describe 'Mattermost login' do
it 'user logs into Mattermost using GitLab OAuth' do
Flow::Login.sign_in
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 ad67f02eaca..505da623d66 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
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
- context 'Manage', :orchestrated, :instance_saml do
+ RSpec.describe 'Manage', :orchestrated, :instance_saml do
describe 'Instance wide SAML SSO' do
it 'User logs in to gitlab with SAML SSO' do
Runtime::Browser.visit(:gitlab, Page::Main::Login)
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 a0e3fe0d91a..9dfeec37869 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
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
- shared_examples 'registration and login' do
+ RSpec.shared_examples 'registration and login' do
it 'user registers and logs in' do
Runtime::Browser.visit(:gitlab, Page::Main::Login)
@@ -13,13 +13,13 @@ module QA
end
end
- context 'Manage', :skip_signup_disabled do
+ RSpec.describe 'Manage', :skip_signup_disabled do
describe 'standard' do
it_behaves_like 'registration and login'
end
end
- context 'Manage', :orchestrated, :ldap_no_tls, :skip_signup_disabled do
+ RSpec.describe 'Manage', :orchestrated, :ldap_no_tls, :skip_signup_disabled do
describe 'while LDAP is enabled' do
it_behaves_like 'registration and login'
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 67055537567..8d1fa3ee62d 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
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
- context 'Manage' do
+ RSpec.describe 'Manage' do
describe 'Add project member' do
it 'user adds project member' do
Flow::Login.sign_in
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 9ca933a957f..80b5e332abe 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
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
- context 'Manage', :smoke do
+ RSpec.describe 'Manage', :smoke do
describe 'Project creation' do
it 'user creates a new project' do
Flow::Login.sign_in
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 1f1adf9afb4..6ce97188d66 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
@@ -3,7 +3,7 @@
require 'nokogiri'
module QA
- context 'Manage', quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/212145', type: :stale } do
+ RSpec.describe 'Manage', quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/212145', type: :stale } do
describe 'Check for broken images', :requires_admin do
before(:context) do
admin = QA::Resource::User.new.tap do |user|
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 409d67d51b1..94cf1fe1f8c 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
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
- context 'Manage', :github, quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/issues/26952', type: :bug } do
+ RSpec.describe 'Manage', :github, quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/issues/26952', type: :bug } do
describe 'Project import from GitHub' do
let(:imported_project) do
Resource::ProjectImportedFromGithub.fabricate! do |project|
@@ -62,12 +62,9 @@ module QA
Page::Project::Issue::Show.perform do |issue_page|
expect(issue_page).to have_comment(comment_text)
- end
-
- Page::Issuable::Sidebar.perform do |issuable|
- expect(issuable).to have_label('enhancement')
- expect(issuable).to have_label('help wanted')
- expect(issuable).to have_label('good first issue')
+ expect(issue_page).to have_label('enhancement')
+ expect(issue_page).to have_label('help wanted')
+ expect(issue_page).to have_label('good first issue')
end
end
end
@@ -91,9 +88,9 @@ module QA
expect(page).to have_content('[Review comment] Nice blank line.')
expect(page).to have_content('[Single diff comment] Much better without this line!')
- Page::Issuable::Sidebar.perform do |issuable|
- expect(issuable).to have_label('bug')
- expect(issuable).to have_label('enhancement')
+ Page::MergeRequest::Show.perform do |merge_request|
+ expect(merge_request).to have_label('bug')
+ expect(merge_request).to have_label('enhancement')
end
end
diff --git a/qa/qa/specs/features/browser_ui/1_manage/project/protected_tags_spec.rb b/qa/qa/specs/features/browser_ui/1_manage/project/protected_tags_spec.rb
new file mode 100644
index 00000000000..e40dde64675
--- /dev/null
+++ b/qa/qa/specs/features/browser_ui/1_manage/project/protected_tags_spec.rb
@@ -0,0 +1,109 @@
+# frozen_string_literal: true
+
+module QA
+ RSpec.describe 'Manage' do
+ describe 'Repository tags' do
+ let(:project) do
+ Resource::Project.fabricate_via_api! do |project|
+ project.name = 'project-for-tags'
+ project.initialize_with_readme = true
+ end
+ end
+
+ let(:developer_user) { Resource::User.fabricate_or_use(Runtime::Env.gitlab_qa_username_1, Runtime::Env.gitlab_qa_password_1) }
+ let(:maintainer_user) { Resource::User.fabricate_or_use(Runtime::Env.gitlab_qa_username_2, Runtime::Env.gitlab_qa_password_2) }
+ let(:tag_name) { 'v0.0.1' }
+ let(:tag_message) { 'Version 0.0.1' }
+ let(:tag_release_notes) { 'Release It!' }
+
+ shared_examples 'successful tag creation' do |user|
+ it "can be created by #{user}" do
+ Flow::Login.sign_in(as: send(user))
+
+ create_tag_for_project(project, tag_name, tag_message, tag_release_notes)
+
+ Page::Project::Tag::Show.perform do |show|
+ expect(show).to have_tag_name(tag_name)
+ expect(show).to have_tag_message(tag_message)
+ expect(show).to have_tag_release_notes(tag_release_notes)
+ expect(show).not_to have_element(:create_tag_button)
+ end
+ end
+ end
+
+ shared_examples 'unsuccessful tag creation' do |user|
+ it "cannot be created by an unauthorized #{user}" do
+ Flow::Login.sign_in(as: send(user))
+
+ create_tag_for_project(project, tag_name, tag_message, tag_release_notes)
+
+ Page::Project::Tag::New.perform do |new_tag|
+ expect(new_tag).to have_content('You are not allowed to create this tag as it is protected.')
+ expect(new_tag).to have_element(:create_tag_button)
+ end
+ end
+ end
+
+ context 'when not protected' do
+ before do
+ add_members_to_project(project)
+ end
+
+ it_behaves_like 'successful tag creation', :developer_user
+ it_behaves_like 'successful tag creation', :maintainer_user
+ end
+
+ context 'when protected' do
+ before do
+ add_members_to_project(project)
+
+ Flow::Login.sign_in
+
+ protect_tag_for_project(project, 'v*', 'Maintainers')
+
+ Page::Main::Menu.perform(&:sign_out)
+ end
+
+ it_behaves_like 'unsuccessful tag creation', :developer_user
+ it_behaves_like 'successful tag creation', :maintainer_user
+ end
+
+ def create_tag_for_project(project, name, message, release_notes)
+ project.visit!
+
+ Page::Project::Menu.perform(&:go_to_repository_tags)
+ Page::Project::Tag::Index.perform(&:click_new_tag_button)
+
+ Page::Project::Tag::New.perform do |new_tag|
+ new_tag.fill_tag_name(name)
+ new_tag.fill_tag_message(message)
+ new_tag.fill_release_notes(release_notes)
+ new_tag.click_create_tag_button
+ end
+ end
+
+ def protect_tag_for_project(project, tag, role)
+ project.visit!
+
+ Page::Project::Menu.perform(&:go_to_repository_settings)
+
+ Page::Project::Settings::Repository.perform do |setting|
+ setting.expand_protected_tags do |protected_tags|
+ protected_tags.set_tag(tag)
+ protected_tags.choose_access_level_role(role)
+
+ protected_tags.click_protect_tag_button
+ end
+ end
+ end
+
+ def add_members_to_project(project)
+ @developer_user = developer_user
+ @maintainer_user = maintainer_user
+
+ project.add_member(@developer_user, Resource::Members::AccessLevel::DEVELOPER)
+ project.add_member(@maintainer_user, Resource::Members::AccessLevel::MAINTAINER)
+ end
+ end
+ end
+end
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 d483dcc97a7..b98d2982684 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
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
- context 'Manage' do
+ RSpec.describe 'Manage' do
describe 'Project activity' do
it 'user creates an event in the activity page upon Git push' do
Flow::Login.sign_in
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 0a577aa07f8..3717bc8a9ff 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
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
- context 'Plan', :orchestrated, :smtp do
+ RSpec.describe 'Plan', :orchestrated, :smtp do
describe 'Email Notification' do
include Support::Api
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 57d2c02a27b..784f474a7d5 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
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
- context 'Plan', :reliable do
+ RSpec.describe 'Plan', :reliable do
describe 'check xss occurence in @mentions in issues', :requires_admin do
it 'mentions a user in a comment' do
QA::Runtime::Env.personal_access_token = QA::Runtime::Env.admin_personal_access_token
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 33d2c7026b3..478f6b8177c 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
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
- context 'Plan', :reliable do
+ RSpec.describe 'Plan', :reliable do
describe 'collapse comments in issue discussions' do
let(:my_first_reply) { 'My first 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 4667eb6c587..0347de42b96 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
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
- context 'Plan', :reliable do
+ RSpec.describe 'Plan', :reliable do
describe 'Issue comments' do
before do
Flow::Login.sign_in
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 57b0859856e..e41024e5d14 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
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
- context 'Plan', :smoke do
+ RSpec.describe 'Plan', :smoke do
describe 'Issue creation' do
let(:closed_issue) { Resource::Issue.fabricate_via_api! }
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 3727aae2270..aa03a514f04 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
@@ -3,7 +3,7 @@
require 'securerandom'
module QA
- context 'Plan', :reliable do
+ RSpec.describe 'Plan', :reliable do
describe 'Issues list' do
let(:project) do
Resource::Project.fabricate_via_api! do |project|
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 b7687f785a8..082933e9878 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
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
- context 'Plan', :reliable do
+ RSpec.describe 'Plan', :reliable do
describe 'filter issue comments activities' do
before do
Flow::Login.sign_in
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 623573a1397..43f4415c90d 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
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
- context 'Plan', :reliable do
+ RSpec.describe 'Plan', :reliable do
describe 'issue suggestions' do
let(:issue_title) { 'Issue Lists are awesome' }
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
new file mode 100644
index 00000000000..a2e7d10f313
--- /dev/null
+++ b/qa/qa/specs/features/browser_ui/2_plan/issue/jira_issue_import_spec.rb
@@ -0,0 +1,77 @@
+# frozen_string_literal: true
+
+module QA
+ RSpec.describe 'Plan' do
+ describe 'Jira issue import', :jira, :orchestrated, :requires_admin do
+ let(:jira_project_key) { "JITD" }
+ let(:jira_issue_title) { "[#{jira_project_key}-1] Jira to GitLab Test Issue" }
+ let(:jira_issue_description) { "This issue is for testing importing Jira issues to GitLab." }
+ let(:jira_issue_label_1) { "jira-import::#{jira_project_key}-1" }
+ let(:jira_issue_label_2) { "QA" }
+ let(:project) do
+ Resource::Project.fabricate_via_api! do |project|
+ project.name = "jira_issue_import"
+ end
+ end
+
+ it 'imports issues from Jira' do
+ set_up_jira_integration
+ import_jira_issues
+
+ QA::Support::Retrier.retry_on_exception do
+ Page::Project::Menu.perform(&:click_issues)
+
+ Page::Project::Issue::Index.perform do |issues_page|
+ expect(issues_page).to have_content("2 issues successfully imported")
+
+ issues_page.click_issue_link(jira_issue_title)
+ end
+ end
+
+ expect(page).to have_content(jira_issue_description)
+
+ Page::Project::Issue::Show.perform do |issue|
+ expect(issue).to have_label(jira_issue_label_1)
+ expect(issue).to have_label(jira_issue_label_2)
+ end
+ end
+
+ private
+
+ def set_up_jira_integration
+ # Retry is required because allow_local_requests_from_web_hooks_and_services
+ # takes some time to get enabled.
+ # Bug issue: https://gitlab.com/gitlab-org/gitlab/-/issues/217010
+ QA::Support::Retrier.retry_on_exception(max_attempts: 5, sleep_interval: 3) do
+ Runtime::ApplicationSettings.set_application_settings(allow_local_requests_from_web_hooks_and_services: true)
+
+ page.visit Runtime::Scenario.gitlab_address
+ Flow::Login.sign_in_unless_signed_in
+
+ project.visit!
+
+ Page::Project::Menu.perform(&:go_to_integrations_settings)
+ QA::Page::Project::Settings::Integrations.perform(&:click_jira_link)
+
+ QA::Page::Project::Settings::Services::Jira.perform do |jira|
+ jira.setup_service_with(url: Vendor::Jira::JiraAPI.perform(&:base_url))
+ end
+
+ expect(page).not_to have_text("Url is blocked")
+ expect(page).to have_text("Jira activated")
+ end
+ end
+
+ def import_jira_issues
+ Page::Project::Menu.perform(&:click_issues)
+ Page::Project::Issue::Index.perform(&:go_to_jira_import_form)
+
+ Page::Project::Issue::JiraImport.perform do |form|
+ form.select_project_and_import(jira_project_key)
+ end
+
+ expect(page).to have_content("Import in progress")
+ end
+ end
+ 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 3e575517ecb..50df1c3ef01 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
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
- context 'Plan', :smoke, :reliable do
+ RSpec.describe 'Plan', :smoke, :reliable do
describe 'mention' do
before do
Flow::Login.sign_in
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 c81a6f9281c..932eef8e38b 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
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
- context 'Plan', :reliable do
+ RSpec.describe 'Plan', :reliable do
describe 'Issue board focus mode' do
let(:project) do
QA::Resource::Project.fabricate_via_api! do |project|
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
new file mode 100644
index 00000000000..115701c5c02
--- /dev/null
+++ b/qa/qa/specs/features/browser_ui/2_plan/milestone/assign_milestone_spec.rb
@@ -0,0 +1,85 @@
+# frozen_string_literal: true
+
+module QA
+ RSpec.describe 'Plan' do
+ describe 'Milestones' do
+ include Support::Dates
+
+ let(:start_date) { current_date_yyyy_mm_dd }
+ let(:due_date) { next_month_yyyy_mm_dd }
+
+ let(:group) do
+ Resource::Group.fabricate_via_api! do |group|
+ group.name = 'group-to-test-milestones'
+ end
+ end
+
+ let(:project) do
+ Resource::Project.fabricate_via_api! do |project|
+ project.name = 'project-to-test-milestones'
+ end
+ end
+
+ let(:issue) do
+ Resource::Issue.fabricate_via_api! do |issue|
+ issue.project = project
+ end
+ end
+
+ before do
+ Flow::Login.sign_in
+ end
+
+ shared_examples 'milestone assigned to existing issue' do
+ it 'is assigned to an existing issue' do
+ issue.visit!
+
+ Page::Project::Issue::Show.perform do |existing_issue|
+ existing_issue.assign_milestone(milestone)
+
+ expect(existing_issue).to have_milestone(milestone.title)
+ end
+ end
+ end
+
+ shared_examples 'milestone assigned to new issue' do
+ it 'is assigned to a new issue' do
+ Resource::Issue.fabricate_via_browser_ui! do |new_issue|
+ new_issue.project = project
+ new_issue.milestone = milestone
+ end
+
+ Page::Project::Issue::Show.perform do |issue|
+ expect(issue).to have_milestone(milestone.title)
+ end
+ end
+ end
+
+ context 'Group milestone' do
+ let(:milestone) do
+ Resource::GroupMilestone.fabricate_via_api! do |milestone|
+ milestone.group = group
+ milestone.start_date = start_date
+ milestone.due_date = due_date
+ end
+ end
+
+ it_behaves_like 'milestone assigned to existing issue'
+ it_behaves_like 'milestone assigned to new issue'
+ end
+
+ context 'Project milestone' do
+ let(:milestone) do
+ Resource::ProjectMilestone.fabricate_via_api! do |milestone|
+ milestone.project = project
+ milestone.start_date = start_date
+ milestone.due_date = due_date
+ end
+ end
+
+ it_behaves_like 'milestone assigned to existing issue'
+ it_behaves_like 'milestone assigned to new issue'
+ end
+ end
+ 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
new file mode 100644
index 00000000000..35c42796aeb
--- /dev/null
+++ b/qa/qa/specs/features/browser_ui/2_plan/milestone/create_group_milestone_spec.rb
@@ -0,0 +1,41 @@
+# frozen_string_literal: true
+
+module QA
+ RSpec.describe 'Plan' do
+ describe 'Group milestone' do
+ include Support::Dates
+
+ let(:title) { 'Group milestone' }
+ let(:description) { 'This milestone tests out group milestones.' }
+ let(:start_date) { current_date_yyyy_mm_dd }
+ let(:due_date) { next_month_yyyy_mm_dd }
+
+ before do
+ Flow::Login.sign_in
+ end
+
+ it 'creates a group milestone' do
+ group_milestone = Resource::GroupMilestone.fabricate_via_browser_ui! do |milestone|
+ milestone.title = title
+ milestone.description = description
+ milestone.start_date = start_date
+ milestone.due_date = due_date
+ end
+
+ Page::Group::Menu.perform(&:go_to_milestones)
+ Page::Group::Milestone::Index.perform do |milestone_list|
+ expect(milestone_list).to have_milestone(group_milestone)
+
+ milestone_list.click_milestone(group_milestone)
+ end
+
+ Page::Milestone::Show.perform do |milestone|
+ expect(milestone).to have_element(:milestone_title_content, text: title)
+ expect(milestone).to have_element(:milestone_description_content, text: description)
+ expect(milestone).to have_start_date(start_date)
+ expect(milestone).to have_due_date(due_date)
+ end
+ end
+ end
+ end
+end
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
new file mode 100644
index 00000000000..143fdf5728b
--- /dev/null
+++ b/qa/qa/specs/features/browser_ui/2_plan/milestone/create_project_milestone_spec.rb
@@ -0,0 +1,41 @@
+# frozen_string_literal: true
+
+module QA
+ RSpec.describe 'Plan' do
+ describe 'Project milestone' do
+ include Support::Dates
+
+ let(:title) { 'Project milestone' }
+ let(:description) { 'This issue tests out project milestones.' }
+ let(:start_date) { current_date_yyyy_mm_dd }
+ let(:due_date) { next_month_yyyy_mm_dd }
+
+ before do
+ Flow::Login.sign_in
+ end
+
+ it 'creates a project milestone' do
+ project_milestone = Resource::ProjectMilestone.fabricate_via_browser_ui! do |milestone|
+ milestone.title = title
+ milestone.description = description
+ milestone.start_date = start_date
+ milestone.due_date = due_date
+ end
+
+ Page::Project::Menu.perform(&:go_to_milestones)
+ Page::Project::Milestone::Index.perform do |milestone_list|
+ expect(milestone_list).to have_milestone(project_milestone)
+
+ milestone_list.click_milestone(project_milestone)
+ end
+
+ Page::Milestone::Show.perform do |milestone|
+ expect(milestone).to have_element(:milestone_title_content, text: title)
+ expect(milestone).to have_element(:milestone_description_content, text: description)
+ expect(milestone).to have_start_date(start_date)
+ expect(milestone).to have_due_date(due_date)
+ end
+ end
+ end
+ end
+end
diff --git a/qa/qa/specs/features/browser_ui/3_create/gitaly/high_availability_spec.rb b/qa/qa/specs/features/browser_ui/3_create/gitaly/high_availability_spec.rb
index 3bb03f68d51..97a76c1aa01 100644
--- a/qa/qa/specs/features/browser_ui/3_create/gitaly/high_availability_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/gitaly/high_availability_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
- context 'Create' do
+ RSpec.describe 'Create' do
context 'Gitaly' do
describe 'High Availability', :orchestrated, :gitaly_ha do
let(:project) do
@@ -10,15 +10,15 @@ module QA
end
end
let(:initial_file) { 'pushed_to_primary.txt' }
- let(:final_file) { 'pushed_to_secondary.txt' }
+ let(:final_file) { 'committed_to_primary.txt' }
+ let(:praefect_manager) { Service::PraefectManager.new }
before do
- @praefect_manager = Service::PraefectManager.new
Flow::Login.sign_in
end
after do
- @praefect_manager.reset
+ praefect_manager.reset_cluster
end
it 'makes sure that automatic failover is happening' do
@@ -30,7 +30,7 @@ module QA
push.file_content = "This should exist on both nodes"
end
- @praefect_manager.stop_primary_node
+ praefect_manager.trigger_failover_by_stopping_primary_node
project.visit!
@@ -41,11 +41,13 @@ module QA
expect(show).to have_file(initial_file)
end
+ praefect_manager.enable_writes
+
Resource::Repository::Commit.fabricate_via_api! do |commit|
commit.project = project
commit.add_files([
{
- file_path: 'committed_to_primary.txt',
+ file_path: final_file,
content: 'This should exist on both nodes too'
}
])
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 05a932fd53e..28338475cb5 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
@@ -1,23 +1,24 @@
# frozen_string_literal: true
module QA
- context 'Create' do
+ RSpec.describe 'Create' do
include Support::Api
describe 'Jira integration', :jira, :orchestrated, :requires_admin do
let(:jira_project_key) { 'JITP' }
+ let(:project) do
+ Resource::Project.fabricate_via_api! do |project|
+ project.name = "project_with_jira_integration"
+ end
+ end
- before(:all) do
+ before do
page.visit Vendor::Jira::JiraAPI.perform(&:base_url)
QA::Support::Retrier.retry_until(sleep_interval: 3, reload_page: page, max_attempts: 20, raise_on_failure: true) do
page.has_text? 'Welcome to Jira'
end
- @project = Resource::Project.fabricate_via_api! do |project|
- project.name = "project_with_jira_integration"
- end
-
# Retry is required because allow_local_requests_from_web_hooks_and_services
# takes some time to get enabled.
# Bug issue: https://gitlab.com/gitlab-org/gitlab/-/issues/217010
@@ -27,7 +28,7 @@ module QA
page.visit Runtime::Scenario.gitlab_address
Flow::Login.sign_in_unless_signed_in
- @project.visit!
+ project.visit!
Page::Project::Menu.perform(&:go_to_integrations_settings)
QA::Page::Project::Settings::Integrations.perform(&:click_jira_link)
@@ -67,9 +68,11 @@ module QA
expect_issue_done(issue_key)
end
+ private
+
def create_mr_with_description(description)
Resource::MergeRequest.fabricate! do |merge_request|
- merge_request.project = @project
+ merge_request.project = project
merge_request.target_new_branch = !master_branch_exists?
merge_request.description = description
end
@@ -80,7 +83,7 @@ module QA
push.branch_name = 'master'
push.commit_message = commit_message
push.file_content = commit_message
- push.project = @project
+ push.project = project
push.new_branch = !master_branch_exists?
end
end
@@ -98,7 +101,7 @@ module QA
end
def master_branch_exists?
- @project.repository_branches.map { |item| item[:name] }.include?("master")
+ project.repository_branches.map { |item| item[:name] }.include?("master")
end
end
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 4a9901f2a84..a002779d7d9 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
@@ -1,29 +1,31 @@
# frozen_string_literal: true
module QA
- context 'Create' do
+ RSpec.describe 'Create' do
describe 'Create a new merge request' do
- before do
- Flow::Login.sign_in
-
- @project = Resource::Project.fabricate_via_api! do |project|
+ let(:project) do
+ Resource::Project.fabricate_via_api! do |project|
project.name = 'project'
end
+ end
+
+ let(:merge_request_title) { 'One merge request to rule them all' }
+ let(:merge_request_description) { '... to find them, to bring them all, and in the darkness bind them' }
- @merge_request_title = 'One merge request to rule them all'
- @merge_request_description = '... to find them, to bring them all, and in the darkness bind them'
+ before do
+ Flow::Login.sign_in
end
it 'creates a basic merge request' do
Resource::MergeRequest.fabricate_via_browser_ui! do |merge_request|
- merge_request.project = @project
- merge_request.title = @merge_request_title
- merge_request.description = @merge_request_description
+ merge_request.project = project
+ merge_request.title = merge_request_title
+ merge_request.description = merge_request_description
end
Page::MergeRequest::Show.perform do |merge_request|
- expect(merge_request).to have_title(@merge_request_title)
- expect(merge_request).to have_description(@merge_request_description)
+ expect(merge_request).to have_title(merge_request_title)
+ expect(merge_request).to have_description(merge_request_description)
end
end
@@ -31,32 +33,29 @@ module QA
gitlab_account_username = "@#{Runtime::User.username}"
milestone = Resource::ProjectMilestone.fabricate_via_api! do |milestone|
- milestone.project = @project
+ milestone.project = project
end
label = Resource::Label.fabricate_via_api! do |label|
- label.project = @project
+ label.project = project
label.title = 'label'
end
Resource::MergeRequest.fabricate_via_browser_ui! do |merge_request|
- merge_request.title = @merge_request_title
- merge_request.description = @merge_request_description
- merge_request.project = @project
+ merge_request.title = merge_request_title
+ merge_request.description = merge_request_description
+ merge_request.project = project
merge_request.milestone = milestone
merge_request.assignee = 'me'
merge_request.labels.push(label)
end
Page::MergeRequest::Show.perform do |merge_request|
- expect(merge_request).to have_title(@merge_request_title)
- expect(merge_request).to have_description(@merge_request_description)
+ expect(merge_request).to have_title(merge_request_title)
+ expect(merge_request).to have_description(merge_request_description)
expect(merge_request).to have_assignee(gitlab_account_username)
expect(merge_request).to have_label(label.title)
- end
-
- Page::Issuable::Sidebar.perform do |sidebar|
- expect(sidebar).to have_milestone(milestone.title)
+ expect(merge_request).to have_milestone(milestone.title)
end
end
end
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 3964ae7eada..5b89bf046fb 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
@@ -1,19 +1,16 @@
# frozen_string_literal: true
module QA
- context 'Create' do
+ RSpec.describe 'Create' do
describe 'Merge request creation from fork' do
- it 'user forks a project, submits a merge request and maintainer merges it' do
- Flow::Login.sign_in
-
- merge_request = Resource::MergeRequestFromFork.fabricate_via_browser_ui! do |merge_request|
+ let(:merge_request) do
+ Resource::MergeRequestFromFork.fabricate_via_api! do |merge_request|
merge_request.fork_branch = 'feature-branch'
end
+ end
- merge_request.project.api_put(auto_devops_enabled: false)
-
- Page::Main::Menu.perform(&:sign_out)
- Page::Main::Login.perform(&:sign_in_using_credentials)
+ it 'can merge feature branch fork to mainline' 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 4e189faec6e..a1c604bdcfc 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
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
- context 'Create', quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/30226', type: :bug } do
+ 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
Flow::Login.sign_in
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 9236609934e..cb660a3e40b 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
@@ -1,19 +1,23 @@
# frozen_string_literal: true
module QA
- context 'Create' do
+ RSpec.describe 'Create' do
describe 'Merge request squashing' do
- it 'user squashes commits while merging' do
- Flow::Login.sign_in
-
- project = Resource::Project.fabricate_via_api! do |project|
+ let(:project) do
+ Resource::Project.fabricate_via_api! do |project|
project.name = "squash-before-merge"
end
+ end
- merge_request = Resource::MergeRequest.fabricate! do |merge_request|
+ let(:merge_request) do
+ Resource::MergeRequest.fabricate_via_api! do |merge_request|
merge_request.project = project
merge_request.title = 'Squashing commits'
end
+ end
+
+ before do
+ Flow::Login.sign_in
Resource::Repository::ProjectPush.fabricate! do |push|
push.project = project
@@ -25,7 +29,9 @@ module QA
end
merge_request.visit!
+ end
+ it 'user squashes commits while merging' 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')
@@ -34,13 +40,9 @@ module QA
merge_request_page.mark_to_squash
merge_request_page.merge!
- merge_request.project.visit!
-
Git::Repository.perform do |repository|
- repository.uri = merge_request.project.repository_http_location.uri
-
+ repository.uri = project.repository_http_location.uri
repository.use_default_credentials
-
repository.clone
expect(repository.commits.size).to eq 3
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 604b6c10aee..3c2c068dfd1 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
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
- context 'Create' do
+ RSpec.describe 'Create' do
describe 'Download merge request patch and diff' do
before(:context) do
@merge_request = Resource::MergeRequest.fabricate_via_api! do |merge_request|
diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/add_file_template_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/add_file_template_spec.rb
index d5346546efe..c02632c2c60 100644
--- a/qa/qa/specs/features/browser_ui/3_create/repository/add_file_template_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/repository/add_file_template_spec.rb
@@ -1,12 +1,14 @@
# frozen_string_literal: true
+require 'securerandom'
+
module QA
- context 'Create' do
+ RSpec.describe 'Create' do
describe 'File templates' do
include Runtime::Fixtures
- before(:all) do
- @project = Resource::Project.fabricate_via_api! do |project|
+ let(:project) do
+ Resource::Project.fabricate_via_api! do |project|
project.name = 'file-template-project'
project.description = 'Add file templates via the Files view'
project.initialize_with_readme = true
@@ -46,7 +48,7 @@ module QA
Flow::Login.sign_in
- @project.visit!
+ project.visit!
Page::Project::Show.perform(&:create_new_file!)
Page::File::Form.perform do |form|
@@ -54,12 +56,14 @@ module QA
expect(form).to have_normalized_ws_text(content[0..100])
+ form.add_name("#{SecureRandom.hex(8)}/#{template[:file_name]}")
form.commit_changes
- expect(form).to have_content('The file has been successfully created.')
- expect(form).to have_content(template[:file_name])
- expect(form).to have_content('Add new file')
- expect(form).to have_normalized_ws_text(content[0..100])
+ aggregate_failures "indications of file created" do
+ expect(form).to have_content(template[:file_name])
+ expect(form).to have_normalized_ws_text(content[0..100])
+ expect(form).to have_content('Add new file')
+ end
end
end
end
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 bf5a9501cba..cab909756c1 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
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
- context 'Create' do
+ RSpec.describe 'Create' do
describe 'Create, list, and delete branches via web' do
master_branch = 'master'
second_branch = 'second-branch'
diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/add_ssh_key_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/add_ssh_key_spec.rb
deleted file mode 100644
index 68bbc1719fc..00000000000
--- a/qa/qa/specs/features/browser_ui/3_create/repository/add_ssh_key_spec.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-# frozen_string_literal: true
-
-module QA
- context 'Create' do
- describe 'SSH keys support' do
- let(:key_title) { "key for ssh tests #{Time.now.to_f}" }
-
- it 'user adds and then removes an SSH key', :smoke do
- Flow::Login.sign_in
-
- key = Resource::SSHKey.fabricate_via_browser_ui! do |resource|
- resource.title = key_title
- end
-
- expect(page).to have_content(key.title)
- expect(page).to have_content(key.md5_fingerprint)
-
- Page::Main::Menu.perform(&:click_settings_link)
- Page::Profile::Menu.perform(&:click_ssh_keys)
-
- Page::Profile::SSHKeys.perform do |ssh_keys|
- ssh_keys.remove_key(key_title)
- end
-
- expect(page).not_to have_content("Title: #{key_title}")
- expect(page).not_to have_content(key.md5_fingerprint)
- end
- end
- end
-end
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 0650c8395c7..c9cbc68c254 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
@@ -1,16 +1,18 @@
# frozen_string_literal: true
module QA
- context 'Create' do
+ RSpec.describe 'Create' do
describe 'Git clone over HTTP', :ldap_no_tls do
- before(:all) do
- @project = Resource::Project.fabricate_via_api! do |scenario|
+ let(:project) do
+ Resource::Project.fabricate_via_api! do |scenario|
scenario.name = 'project-with-code'
scenario.description = 'project for git clone tests'
end
+ end
+ before do
Git::Repository.perform do |repository|
- repository.uri = @project.repository_http_location.uri
+ repository.uri = project.repository_http_location.uri
repository.use_default_credentials
repository.act do
@@ -21,12 +23,12 @@ module QA
push_changes
end
end
- @project.wait_for_push_new_branch
+ project.wait_for_push_new_branch
end
it 'user performs a deep clone' do
Git::Repository.perform do |repository|
- repository.uri = @project.repository_http_location.uri
+ repository.uri = project.repository_http_location.uri
repository.use_default_credentials
repository.clone
@@ -37,7 +39,7 @@ module QA
it 'user performs a shallow clone' do
Git::Repository.perform do |repository|
- repository.uri = @project.repository_http_location.uri
+ repository.uri = project.repository_http_location.uri
repository.use_default_credentials
repository.shallow_clone
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 51a1c19f0f7..d66f0ddcda6 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
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
- context 'Create' do
+ RSpec.describe 'Create' do
describe 'Files management' do
it 'user creates, edits and deletes a file via the Web' do
Runtime::Browser.visit(:gitlab, Page::Main::Login)
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 d0123da53bb..f586c25165c 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,7 +1,7 @@
# frozen_string_literal: true
module QA
- context 'Create', quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/217002', type: :investigating } do
+ 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
let(:user) { Resource::User.fabricate_or_use(Runtime::Env.gitlab_qa_username_1, Runtime::Env.gitlab_qa_password_1) }
let(:parent_project) do
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 b210e747614..e3b0d7de9ec 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
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
- context 'Create' do
+ 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
Flow::Login.sign_in
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 e3d5b755317..90beff343ab 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
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
- context 'Create' do
+ RSpec.describe 'Create' do
describe 'Push over SSH using Git protocol version 2', :requires_git_protocol_v2 do
# Note: If you run this test against GDK make sure you've enabled sshd and
# enabled setting the Git protocol by adding `AcceptEnv GIT_PROTOCOL` to
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 d8aaffc3713..c01558d3702 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
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
- context 'Create' do
+ RSpec.describe 'Create' do
describe 'Git push over HTTP', :ldap_no_tls do
it 'user using a personal access token pushes code to the repository' do
Flow::Login.sign_in
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 ae95f5a7a44..254e32a88ce 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
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
- context 'Create' do
+ RSpec.describe 'Create' do
describe 'Push mirror a repository over HTTP' do
it 'configures and syncs a (push) mirrored repository' do
Runtime::Browser.visit(:gitlab, Page::Main::Login)
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 21ae10774c9..443ace0c9f0 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
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
- context 'Create', :requires_admin do
+ RSpec.describe 'Create', :requires_admin do
describe 'push after setting the file size limit via admin/application_settings' do
# Note: The file size limits in this test should be greater than the limits in
# ee/browser_ui/3_create/repository/push_rules_spec to prevent that test from
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 6c0d55cc69a..b918b2ff268 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
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
- context 'Create' do
+ RSpec.describe 'Create' do
describe 'Git push over HTTP', :ldap_no_tls do
it 'user pushes code to the repository' do
Flow::Login.sign_in
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 455db4d811d..3e1e470d8c3 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
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
- context 'Create' do
+ RSpec.describe 'Create' do
describe 'Protected branch support', :ldap_no_tls do
let(:branch_name) { 'protected-branch' }
let(:commit_message) { 'Protected push commit message' }
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
new file mode 100644
index 00000000000..d67e4a4ea83
--- /dev/null
+++ b/qa/qa/specs/features/browser_ui/3_create/repository/ssh_key_support_spec.rb
@@ -0,0 +1,35 @@
+# frozen_string_literal: true
+
+module QA
+ RSpec.describe 'SSH keys support', :smoke do
+ key_title = "key for ssh tests #{Time.now.to_f}"
+ key = nil
+
+ before do
+ Flow::Login.sign_in
+ end
+
+ it 'user can add an SSH key' do
+ key = Resource::SSHKey.fabricate_via_browser_ui! do |resource|
+ resource.title = key_title
+ end
+
+ expect(page).to have_content(key.title)
+ expect(page).to have_content(key.md5_fingerprint)
+ end
+
+ # 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
+ Page::Main::Menu.perform(&:click_settings_link)
+ Page::Profile::Menu.perform(&:click_ssh_keys)
+ Page::Profile::SSHKeys.perform do |ssh_keys|
+ ssh_keys.remove_key(key_title)
+ end
+
+ expect(page).not_to have_content("Title: #{key_title}")
+ expect(page).not_to have_content(key.md5_fingerprint)
+ end
+ end
+ end
+end
diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/use_ssh_key_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/use_ssh_key_spec.rb
index 1a3c6d03098..e91717b0f5f 100644
--- a/qa/qa/specs/features/browser_ui/3_create/repository/use_ssh_key_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/repository/use_ssh_key_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
- context 'Create' do
+ RSpec.describe 'Create' do
describe 'SSH key support' do
# Note: If you run this test against GDK make sure you've enabled sshd
# See: https://gitlab.com/gitlab-org/gitlab-qa/blob/master/docs/run_qa_against_gdk.md
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 aee62bacfa8..cf91b829817 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
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
- context 'Create' do
+ RSpec.describe 'Create' do
describe 'Commit data' do
before(:context) do
# Get the user's details to confirm they're included in the email patch
diff --git a/qa/qa/specs/features/browser_ui/3_create/snippet/add_comment_to_snippet_spec.rb b/qa/qa/specs/features/browser_ui/3_create/snippet/add_comment_to_snippet_spec.rb
new file mode 100644
index 00000000000..a867d9cb973
--- /dev/null
+++ b/qa/qa/specs/features/browser_ui/3_create/snippet/add_comment_to_snippet_spec.rb
@@ -0,0 +1,81 @@
+# frozen_string_literal: true
+
+module QA
+ RSpec.describe 'Create' do
+ describe 'Adding comments on snippets' do
+ let(:comment_author) { Resource::User.fabricate_or_use(Runtime::Env.gitlab_qa_username_1, Runtime::Env.gitlab_qa_password_1) }
+ let(:comment_content) { 'Comment 123' }
+ let(:edited_comment_content) { 'Nice snippet!' }
+
+ let(:personal_snippet) do
+ Resource::Snippet.fabricate! do |snippet|
+ snippet.title = 'Personal snippet with a comment'
+ end
+ end
+
+ let(:project_snippet) do
+ Resource::ProjectSnippet.fabricate! do |snippet|
+ snippet.title = 'Project snippet with a comment'
+ end
+ end
+
+ before do
+ Flow::Login.sign_in
+ end
+
+ shared_examples 'comments on snippets' do |snippet_type|
+ it "adds, edits, and deletes a comment on a #{snippet_type}" do
+ send(snippet_type)
+
+ Page::Main::Menu.perform(&:sign_out)
+
+ Flow::Login.sign_in(as: comment_author)
+
+ send(snippet_type).visit!
+
+ create_comment
+ verify_comment_content(comment_author.username, comment_content)
+
+ edit_comment
+ verify_comment_content(comment_author.username, edited_comment_content)
+
+ delete_comment
+ verify_comment_deleted
+ end
+ end
+
+ it_behaves_like 'comments on snippets', :personal_snippet
+ it_behaves_like 'comments on snippets', :project_snippet
+
+ def create_comment
+ Page::Dashboard::Snippet::Show.perform do |snippet|
+ snippet.add_comment(comment_content)
+ end
+ end
+
+ def edit_comment
+ Page::Dashboard::Snippet::Show.perform do |snippet|
+ snippet.edit_comment(edited_comment_content)
+ end
+ end
+
+ def delete_comment
+ Page::Dashboard::Snippet::Show.perform do |snippet|
+ snippet.delete_comment(edited_comment_content)
+ end
+ end
+
+ def verify_comment_content(author, comment_content)
+ Page::Dashboard::Snippet::Show.perform do |comment|
+ expect(comment).to have_comment_author(author)
+ expect(comment).to have_comment_content(comment_content)
+ end
+ end
+
+ def verify_comment_deleted
+ expect(page).not_to have_content(comment_author.username)
+ expect(page).not_to have_content(edited_comment_content)
+ end
+ end
+ end
+end
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 341ff39fdf1..e6589851dd9 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
- context 'Create' do
+ RSpec.describe 'Create' do
describe 'Version control for personal snippets' do
let(:new_file) { 'new_snippet_file' }
let(:changed_content) { 'changes' }
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 a3011550db8..1660944fccd 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
- context 'Create' do
+ RSpec.describe 'Create' do
describe 'Version control for project snippets' do
let(:new_file) { 'new_snippet_file' }
let(:changed_content) { 'changes' }
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 451a7847f8b..d2b86904cd3 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
@@ -1,27 +1,30 @@
# frozen_string_literal: true
module QA
- context 'Create', :smoke do
+ RSpec.describe 'Create', :smoke do
describe 'Personal snippet creation' do
it 'User creates a personal snippet' do
Flow::Login.sign_in
- Page::Main::Menu.perform(&:go_to_snippets)
+ Page::Main::Menu.perform do |menu|
+ menu.go_to_more_dropdown_option(:snippets_link)
+ end
Resource::Snippet.fabricate_via_browser_ui! do |snippet|
snippet.title = 'Snippet title'
snippet.description = 'Snippet description'
snippet.visibility = 'Private'
- snippet.file_name = 'New snippet file name'
- snippet.file_content = 'Snippet file text'
+ snippet.file_name = 'ruby_file.rb'
+ snippet.file_content = 'File.read("test.txt").split(/\n/)'
end
Page::Dashboard::Snippet::Show.perform do |snippet|
expect(snippet).to have_snippet_title('Snippet title')
expect(snippet).to have_snippet_description('Snippet description')
expect(snippet).to have_visibility_type(/private/i)
- expect(snippet).to have_file_name('New snippet file name')
- expect(snippet).to have_file_content('Snippet file text')
+ expect(snippet).to have_file_name('ruby_file.rb')
+ expect(snippet).to have_file_content('File.read("test.txt").split(/\n/)')
+ expect(snippet).to have_syntax_highlighting('ruby')
end
end
end
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 8fc4427bda7..05795e9b51e 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
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
- context 'Create' do # to be converted to a smoke test once proved to be stable
+ 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
Flow::Login.sign_in
diff --git a/qa/qa/specs/features/browser_ui/3_create/web_ide/add_file_template_spec.rb b/qa/qa/specs/features/browser_ui/3_create/web_ide/add_file_template_spec.rb
index 7c9db5ee496..1e3cb0e2ffc 100644
--- a/qa/qa/specs/features/browser_ui/3_create/web_ide/add_file_template_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/web_ide/add_file_template_spec.rb
@@ -1,7 +1,9 @@
# frozen_string_literal: true
+require 'securerandom'
+
module QA
- context 'Create' do
+ RSpec.describe 'Create' do
describe 'Web IDE file templates' do
include Runtime::Fixtures
@@ -53,10 +55,11 @@ module QA
ide.create_new_file_from_template template[:file_name], template[:name]
expect(ide.has_file?(template[:file_name])).to be_truthy
-
expect(ide).to have_button('Undo')
expect(ide).to have_normalized_ws_text(content[0..100])
+ ide.rename_file(template[:file_name], "#{SecureRandom.hex(8)}/#{template[:file_name]}")
+
ide.commit_changes
expect(ide).to have_content(template[:file_name])
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 3bf6e156967..fbf70153e1d 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
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
- context 'Create' do
+ RSpec.describe 'Create' do
describe 'First file using Web IDE' do
let(:project) do
Resource::Project.fabricate_via_api! do |project|
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 ed988bdf046..7e0d8822101 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
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
- context 'Create' do
+ RSpec.describe 'Create' do
describe 'Review a merge request in Web IDE' do
let(:new_file) { 'awesome_new_file.txt' }
let(:original_text) { 'Text' }
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 1d0c8ee60d4..77a5998362c 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
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
- context 'Create' do
+ RSpec.describe 'Create' do
context 'Wiki' do
describe 'testing wiki content creation inside a project' do
let(:new_wiki_title) { "just_another_wiki_page" }
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 10370c80476..dbc7798a594 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
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
- context 'Create' do
+ RSpec.describe 'Create' do
context 'Wiki' do
describe 'testing wiki content manipulation inside a project' do
let(:new_wiki_title) { "just_another_wiki_page" }
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
new file mode 100644
index 00000000000..d7f59abc361
--- /dev/null
+++ b/qa/qa/specs/features/browser_ui/3_create/wiki/project_based_list_spec.rb
@@ -0,0 +1,73 @@
+# frozen_string_literal: true
+
+module QA
+ RSpec.describe 'Create' do
+ context 'Wiki' do
+ let(:small_number_of_pages) { 5 }
+ let(:large_number_of_pages) { 15 }
+ let(:random_page) { "bulk_#{rand(0..4)}" }
+
+ let(:small_wiki) { create_wiki_pages small_number_of_pages }
+ let(:large_wiki) { create_wiki_pages large_number_of_pages }
+
+ before do
+ Flow::Login.sign_in
+ end
+
+ context 'Sidebar' do
+ it 'has all expected links that work' do
+ small_wiki.visit!
+
+ small_number_of_pages.times do |index|
+ Page::Project::Wiki::Show.perform do |list|
+ expect(list).to have_page_listed "bulk_#{index}"
+ end
+ end
+
+ Page::Project::Wiki::Show.perform do |list|
+ list.click_page_link random_page
+ end
+
+ Page::Project::Wiki::Show.perform do |wiki|
+ expect(wiki).to have_title random_page
+ end
+ end
+ end
+
+ context 'Page List' do
+ it 'has all expected links that work' do
+ large_wiki.visit!
+
+ Page::Project::Wiki::Show.perform(&:click_view_all_pages)
+
+ large_number_of_pages.times do |index|
+ Page::Project::Wiki::List.perform do |list|
+ expect(list).to have_page_listed "bulk_#{index}"
+ end
+ end
+
+ Page::Project::Wiki::List.perform do |list|
+ list.click_page_link random_page
+ end
+
+ Page::Project::Wiki::Show.perform do |wiki|
+ expect(wiki).to have_title random_page
+ end
+ end
+ end
+
+ private
+
+ def create_wiki_pages(no_of_pages)
+ wiki = Resource::Wiki::ProjectPage.fabricate_via_api!
+ no_of_pages.times do |index|
+ Resource::Wiki::ProjectPage.fabricate_via_api! do |page|
+ page.title = "bulk_#{index}"
+ page.project = wiki.project
+ end
+ end
+ wiki
+ end
+ end
+ end
+end
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
new file mode 100644
index 00000000000..923c7332748
--- /dev/null
+++ b/qa/qa/specs/features/browser_ui/3_create/wiki/project_based_page_deletion_spec.rb
@@ -0,0 +1,26 @@
+# frozen_string_literal: true
+
+module QA
+ RSpec.describe 'Create' do
+ context 'Wiki' do
+ let(:initial_wiki) { Resource::Wiki::ProjectPage.fabricate_via_api! }
+
+ before do
+ Flow::Login.sign_in
+ end
+
+ context 'Page deletion' do
+ it 'has removed the deleted page correctly' do
+ initial_wiki.visit!
+
+ Page::Project::Wiki::Show.perform(&:click_edit)
+ Page::Project::Wiki::Edit.perform(&:delete_page)
+
+ Page::Project::Wiki::Show.perform do |wiki|
+ expect(wiki).to have_no_page
+ end
+ end
+ end
+ end
+ end
+end
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 f05634bc3c8..41baaa02544 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
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
- context 'Verify' do
+ RSpec.describe 'Verify', quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/229724', type: :investigating } do
describe 'Add or Remove CI variable via UI', :smoke do
let!(:project) do
Resource::Project.fabricate_via_api! do |project|
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 2502e8beda7..68b4a38a043 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
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
- context 'Verify', :docker, :runner do
+ RSpec.describe 'Verify', :docker, :runner do
describe 'Pipeline creation and processing' do
let(:executor) { "qa-runner-#{Time.now.to_i}" }
let(:max_wait) { 30 }
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 f8a589ad93b..82b15acb664 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
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
- context 'Verify', :docker, :runner do
+ RSpec.describe 'Verify', :docker, :runner do
describe 'Runner registration' do
let(:executor) { "qa-runner-#{Time.now.to_i}" }
let!(:runner) do
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 4d549dde858..0436da40982 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
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
- context 'Verify', :docker, :runner do
+ RSpec.describe 'Verify', :docker, :runner do
describe 'Code coverage statistics' do
let(:simplecov) { '\(\d+.\d+\%\) covered' }
let(:executor) { "qa-runner-#{Time.now.to_i}" }
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 89aba112407..d67fd96d338 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
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
- context 'Release' do
+ RSpec.describe 'Release' do
describe 'Deploy key creation' do
it 'user adds a deploy key' do
Flow::Login.sign_in
diff --git a/qa/qa/specs/features/browser_ui/6_release/deploy_key/clone_using_deploy_key_spec.rb b/qa/qa/specs/features/browser_ui/6_release/deploy_key/clone_using_deploy_key_spec.rb
index 73f2fef5f1d..18eb52830a2 100644
--- a/qa/qa/specs/features/browser_ui/6_release/deploy_key/clone_using_deploy_key_spec.rb
+++ b/qa/qa/specs/features/browser_ui/6_release/deploy_key/clone_using_deploy_key_spec.rb
@@ -3,7 +3,7 @@
require 'digest/sha1'
module QA
- context 'Release', :docker, :runner do
+ RSpec.describe 'Release', :docker, :runner do
describe 'Git clone using a deploy key' do
before do
Flow::Login.sign_in
@@ -20,7 +20,7 @@ module QA
resource.project = @project
resource.name = @runner_name
resource.tags = %w[qa docker]
- resource.image = 'gitlab/gitlab-runner:ubuntu'
+ resource.image = 'gitlab/gitlab-runner:alpine'
end
end
@@ -51,6 +51,7 @@ module QA
gitlab_ci = <<~YAML
cat-config:
script:
+ - apk add --update --no-cache openssh-client
- mkdir -p ~/.ssh
- ssh-keyscan -p #{@repository_location.port} #{@repository_location.host} >> ~/.ssh/known_hosts
- eval $(ssh-agent -s)
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 a07f0bd5e54..9bee5c5ee08 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
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
- context 'Release', quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/213222', type: :flaky } do
+ 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
Flow::Login.sign_in
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 e1d8c50ab75..673125c90f2 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
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
- context 'Release', :docker, quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/217250', type: :investigating } do
+ RSpec.describe 'Release', :docker, :runner, :reliable do
describe 'Parent-child pipelines dependent relationship' do
let!(:project) do
Resource::Project.fabricate_via_api! do |project|
@@ -29,12 +29,8 @@ module QA
view_pipelines
Page::Project::Pipeline::Show.perform do |parent_pipeline|
+ expect(parent_pipeline).to have_child_pipeline
expect(parent_pipeline).to have_passed
-
- parent_pipeline.retry_on_exception(sleep_interval: 1.0) do
- parent_pipeline.click_linked_job(project.name)
- end
- expect(parent_pipeline).to have_job("child_job")
end
end
@@ -43,12 +39,8 @@ module QA
view_pipelines
Page::Project::Pipeline::Show.perform do |parent_pipeline|
+ expect(parent_pipeline).to have_child_pipeline
expect(parent_pipeline).to have_failed
-
- parent_pipeline.retry_on_exception(sleep_interval: 1.0) do
- parent_pipeline.click_linked_job(project.name)
- end
- expect(parent_pipeline).to have_job("child_job")
end
end
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 c365e084991..05b9859f112 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
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
- context 'Release', :docker, quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/217250', type: :investigating } do
+ RSpec.describe 'Release', :docker, :runner, :reliable do
describe 'Parent-child pipelines independent relationship' do
let!(:project) do
Resource::Project.fabricate_via_api! do |project|
@@ -29,12 +29,8 @@ module QA
view_pipelines
Page::Project::Pipeline::Show.perform do |parent_pipeline|
+ expect(parent_pipeline).to have_child_pipeline
expect(parent_pipeline).to have_passed
-
- parent_pipeline.retry_on_exception(reload: true, sleep_interval: 1.0) do
- parent_pipeline.click_linked_job(project.name)
- end
- expect(parent_pipeline).to have_job("child_job")
end
end
@@ -43,12 +39,8 @@ module QA
view_pipelines
Page::Project::Pipeline::Show.perform do |parent_pipeline|
+ expect(parent_pipeline).to have_child_pipeline
expect(parent_pipeline).to have_passed
-
- parent_pipeline.retry_on_exception(reload: true, sleep_interval: 1.0) do
- parent_pipeline.click_linked_job(project.name)
- end
- expect(parent_pipeline).to have_job("child_job")
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 292fc40bec4..ad87ee173f5 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
@@ -3,7 +3,7 @@
require 'pathname'
module QA
- context 'Configure' do
+ RSpec.describe 'Configure' do
let(:project) do
Resource::Project.fabricate_via_api! do |project|
project.name = Runtime::Env.auto_devops_project_name || 'autodevops-project'
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 0e9c369e97f..5073b715341 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
@@ -1,8 +1,8 @@
# frozen_string_literal: true
module QA
- context 'Configure' do
- describe 'Kubernetes Cluster Integration', :orchestrated, :kubernetes, :requires_admin, :skip_live_env do
+ RSpec.describe 'Configure' do
+ describe 'Kubernetes Cluster Integration', :orchestrated, :kubernetes, :requires_admin, :skip_live_env, quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/225315', type: :flaky } do
context 'Project Clusters' do
let!(:cluster) { Service::KubernetesCluster.new(provider_class: Service::ClusterProvider::K3s).create! }
let(:project) do
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 a9ed6651069..9cfdc4277a7 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,7 +1,7 @@
# frozen_string_literal: true
module QA
- context 'Monitor' do
+ RSpec.describe 'Monitor' do
describe 'with Prometheus in a Gitlab-managed cluster', :orchestrated, :kubernetes do
before :all do
@cluster = Service::KubernetesCluster.new.create!
@@ -64,6 +64,19 @@ module QA
end
end
+ it 'observes cluster health graph' do
+ Page::Project::Menu.perform(&:go_to_operations_kubernetes)
+
+ Page::Project::Operations::Kubernetes::Index.perform do |cluster_list|
+ cluster_list.click_on_cluster(@cluster)
+ end
+
+ Page::Project::Operations::Kubernetes::Show.perform do |cluster_panel|
+ cluster_panel.open_health
+ cluster_panel.wait_for_cluster_health
+ end
+ end
+
private
def deploy_project_with_prometheus
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 c6d5fba919b..73bb6aeb5fd 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
@@ -1,8 +1,8 @@
# frozen_string_literal: true
module QA
- context 'Non-devops' do
- describe 'Performance bar display', :requires_admin do
+ RSpec.describe 'Non-devops' do
+ describe 'Performance bar display', :requires_admin, :skip_live_env do
context 'when logged in as an admin user' do
# performance metrics: pg, gitaly, redis, rugged (feature flagged), total (not always provided)
let(:minimum_metrics_count) { 3 }