diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-16 21:09:01 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-16 21:09:01 +0300 |
commit | 4f5c8572e988e8c0c6871fb59ccfbfd39b9c2a06 (patch) | |
tree | 5a88f2b76e947bce06488dc6c091fbd970ee73ea /spec | |
parent | 10fd79745df7b572fc79fd84b58e818e64bf2571 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec')
616 files changed, 960 insertions, 683 deletions
diff --git a/spec/controllers/jwks_controller_spec.rb b/spec/controllers/jwks_controller_spec.rb deleted file mode 100644 index 5e4e81421aa..00000000000 --- a/spec/controllers/jwks_controller_spec.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe JwksController do - describe 'GET #index' do - let(:oidc_jwk) { OpenSSL::PKey::RSA.new(Rails.application.secrets.openid_connect_signing_key).to_jwk } - let(:ci_jwk) { OpenSSL::PKey::RSA.new(Rails.application.secrets.ci_jwt_signing_key).to_jwk } - - it 'returns signing keys used to sign CI_JOB_JWT' do - get :index - - expect(response).to have_gitlab_http_status(:ok) - - ids = json_response['keys'].map { |jwk| jwk['kid'] } - expect(ids).to contain_exactly(ci_jwk['kid'], oidc_jwk['kid']) - end - - it 'does not leak private key data' do - get :index - - aggregate_failures do - json_response['keys'].each do |jwk| - expect(jwk.keys).to contain_exactly('kty', 'kid', 'e', 'n', 'use', 'alg') - expect(jwk['use']).to eq('sig') - expect(jwk['alg']).to eq('RS256') - end - end - end - end -end diff --git a/spec/factories/ci/builds.rb b/spec/factories/ci/builds.rb index 5fee23f1365..9403967aa0a 100644 --- a/spec/factories/ci/builds.rb +++ b/spec/factories/ci/builds.rb @@ -378,6 +378,21 @@ FactoryBot.define do end end + trait :release_options do + options do + { + only: 'tags', + script: ['make changelog | tee release_changelog.txt'], + release: { + name: 'Release $CI_COMMIT_SHA', + description: 'Created using the release-cli $EXTRA_DESCRIPTION', + tag_name: 'release-$CI_COMMIT_SHA', + ref: '$CI_COMMIT_SHA' + } + } + end + end + trait :no_options do options { {} } end diff --git a/spec/features/admin/admin_runners_spec.rb b/spec/features/admin/admin_runners_spec.rb index ca2fd2f2e9e..0e20ccf6bec 100644 --- a/spec/features/admin/admin_runners_spec.rb +++ b/spec/features/admin/admin_runners_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe "Admin Runners" do +RSpec.describe "Admin Runners" do include StubENV include FilteredSearchHelpers include SortingHelper diff --git a/spec/features/admin/admin_sees_project_statistics_spec.rb b/spec/features/admin/admin_sees_project_statistics_spec.rb index ecd0aab925b..6e8211a9b4e 100644 --- a/spec/features/admin/admin_sees_project_statistics_spec.rb +++ b/spec/features/admin/admin_sees_project_statistics_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe "Admin > Admin sees project statistics" do +RSpec.describe "Admin > Admin sees project statistics" do let(:current_user) { create(:admin) } before do diff --git a/spec/features/admin/admin_sees_projects_statistics_spec.rb b/spec/features/admin/admin_sees_projects_statistics_spec.rb index 6a6f369ac7c..786fa98255c 100644 --- a/spec/features/admin/admin_sees_projects_statistics_spec.rb +++ b/spec/features/admin/admin_sees_projects_statistics_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe "Admin > Admin sees projects statistics" do +RSpec.describe "Admin > Admin sees projects statistics" do let(:current_user) { create(:admin) } before do diff --git a/spec/features/admin/admin_serverless_domains_spec.rb b/spec/features/admin/admin_serverless_domains_spec.rb index 48f6af8d4bd..256887f425f 100644 --- a/spec/features/admin/admin_serverless_domains_spec.rb +++ b/spec/features/admin/admin_serverless_domains_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Admin Serverless Domains', :js do +RSpec.describe 'Admin Serverless Domains', :js do let(:sample_domain) { build(:pages_domain) } before do diff --git a/spec/features/admin/admin_settings_spec.rb b/spec/features/admin/admin_settings_spec.rb index 2bb93940921..55f6a9930ff 100644 --- a/spec/features/admin/admin_settings_spec.rb +++ b/spec/features/admin/admin_settings_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Admin updates settings', :clean_gitlab_redis_shared_state, :do_not_mock_admin_mode do +RSpec.describe 'Admin updates settings', :clean_gitlab_redis_shared_state, :do_not_mock_admin_mode do include StubENV include TermsHelper include UsageDataHelpers diff --git a/spec/features/admin/admin_system_info_spec.rb b/spec/features/admin/admin_system_info_spec.rb index 3dacf63e25a..6a0448fd890 100644 --- a/spec/features/admin/admin_system_info_spec.rb +++ b/spec/features/admin/admin_system_info_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Admin System Info' do +RSpec.describe 'Admin System Info' do before do sign_in(create(:admin)) end diff --git a/spec/features/admin/admin_users_impersonation_tokens_spec.rb b/spec/features/admin/admin_users_impersonation_tokens_spec.rb index b9de858e3b9..ec3dd322f97 100644 --- a/spec/features/admin/admin_users_impersonation_tokens_spec.rb +++ b/spec/features/admin/admin_users_impersonation_tokens_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Admin > Users > Impersonation Tokens', :js do +RSpec.describe 'Admin > Users > Impersonation Tokens', :js do let(:admin) { create(:admin) } let!(:user) { create(:user) } diff --git a/spec/features/admin/admin_users_spec.rb b/spec/features/admin/admin_users_spec.rb index 0c8cd895c00..369f91c6faa 100644 --- a/spec/features/admin/admin_users_spec.rb +++ b/spec/features/admin/admin_users_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe "Admin::Users" do +RSpec.describe "Admin::Users" do include Spec::Support::Helpers::Features::ResponsiveTableHelpers let!(:user) do diff --git a/spec/features/admin/admin_uses_repository_checks_spec.rb b/spec/features/admin/admin_uses_repository_checks_spec.rb index 954773e766d..b8851c28531 100644 --- a/spec/features/admin/admin_uses_repository_checks_spec.rb +++ b/spec/features/admin/admin_uses_repository_checks_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Admin uses repository checks', :request_store, :clean_gitlab_redis_shared_state, :do_not_mock_admin_mode do +RSpec.describe 'Admin uses repository checks', :request_store, :clean_gitlab_redis_shared_state, :do_not_mock_admin_mode do include StubENV let(:admin) { create(:admin) } diff --git a/spec/features/admin/clusters/applications_spec.rb b/spec/features/admin/clusters/applications_spec.rb index 8310811b43d..3bcadfdbfc1 100644 --- a/spec/features/admin/clusters/applications_spec.rb +++ b/spec/features/admin/clusters/applications_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' require_relative '../../../../spec/features/clusters/installing_applications_shared_examples' -describe 'Instance-level Cluster Applications', :js do +RSpec.describe 'Instance-level Cluster Applications', :js do include GoogleApi::CloudPlatformHelpers let(:user) { create(:admin) } diff --git a/spec/features/admin/clusters/eks_spec.rb b/spec/features/admin/clusters/eks_spec.rb index 40561aa508c..ef49aebc7c5 100644 --- a/spec/features/admin/clusters/eks_spec.rb +++ b/spec/features/admin/clusters/eks_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Instance-level AWS EKS Cluster', :js do +RSpec.describe 'Instance-level AWS EKS Cluster', :js do let(:user) { create(:admin) } before do diff --git a/spec/features/admin/dashboard_spec.rb b/spec/features/admin/dashboard_spec.rb index 018ef13cbb6..4ffa5e3be0b 100644 --- a/spec/features/admin/dashboard_spec.rb +++ b/spec/features/admin/dashboard_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'admin visits dashboard' do +RSpec.describe 'admin visits dashboard' do include ProjectForksHelper before do diff --git a/spec/features/admin/services/admin_activates_prometheus_spec.rb b/spec/features/admin/services/admin_activates_prometheus_spec.rb index 2e94e27ccc4..35af9dd6c68 100644 --- a/spec/features/admin/services/admin_activates_prometheus_spec.rb +++ b/spec/features/admin/services/admin_activates_prometheus_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Admin activates Prometheus', :js do +RSpec.describe 'Admin activates Prometheus', :js do let(:admin) { create(:user, :admin) } before do diff --git a/spec/features/atom/dashboard_issues_spec.rb b/spec/features/atom/dashboard_issues_spec.rb index d523e2992db..511cdcc2940 100644 --- a/spec/features/atom/dashboard_issues_spec.rb +++ b/spec/features/atom/dashboard_issues_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe "Dashboard Issues Feed" do +RSpec.describe "Dashboard Issues Feed" do describe "GET /issues" do let!(:user) { create(:user, email: 'private1@example.com', public_email: 'public1@example.com') } let!(:assignee) { create(:user, email: 'private2@example.com', public_email: 'public2@example.com') } diff --git a/spec/features/atom/dashboard_spec.rb b/spec/features/atom/dashboard_spec.rb index 7df0e47cd14..851ae7b02a0 100644 --- a/spec/features/atom/dashboard_spec.rb +++ b/spec/features/atom/dashboard_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe "Dashboard Feed" do +RSpec.describe "Dashboard Feed" do describe "GET /" do let!(:user) { create(:user, name: "Jonh") } diff --git a/spec/features/atom/issues_spec.rb b/spec/features/atom/issues_spec.rb index c0413f0f352..13798a94fe9 100644 --- a/spec/features/atom/issues_spec.rb +++ b/spec/features/atom/issues_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Issues Feed' do +RSpec.describe 'Issues Feed' do describe 'GET /issues' do let!(:user) { create(:user, email: 'private1@example.com', public_email: 'public1@example.com') } let!(:assignee) { create(:user, email: 'private2@example.com', public_email: 'public2@example.com') } diff --git a/spec/features/atom/users_spec.rb b/spec/features/atom/users_spec.rb index 6f013e13ae4..c79b812df46 100644 --- a/spec/features/atom/users_spec.rb +++ b/spec/features/atom/users_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe "User Feed" do +RSpec.describe "User Feed" do describe "GET /" do let!(:user) { create(:user) } diff --git a/spec/features/boards/add_issues_modal_spec.rb b/spec/features/boards/add_issues_modal_spec.rb index 0412dc2b69c..d432825e113 100644 --- a/spec/features/boards/add_issues_modal_spec.rb +++ b/spec/features/boards/add_issues_modal_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Issue Boards add issue modal', :js do +RSpec.describe 'Issue Boards add issue modal', :js do let(:project) { create(:project, :public) } let(:board) { create(:board, project: project) } let(:user) { create(:user) } diff --git a/spec/features/boards/boards_spec.rb b/spec/features/boards/boards_spec.rb index e82b1be4310..8e2a9381aa0 100644 --- a/spec/features/boards/boards_spec.rb +++ b/spec/features/boards/boards_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Issue Boards', :js do +RSpec.describe 'Issue Boards', :js do include DragTo include MobileHelpers diff --git a/spec/features/boards/focus_mode_spec.rb b/spec/features/boards/focus_mode_spec.rb index fff3cce3c1a..b1684ad69a6 100644 --- a/spec/features/boards/focus_mode_spec.rb +++ b/spec/features/boards/focus_mode_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Issue Boards focus mode', :js do +RSpec.describe 'Issue Boards focus mode', :js do let(:project) { create(:project, :public) } before do diff --git a/spec/features/boards/issue_ordering_spec.rb b/spec/features/boards/issue_ordering_spec.rb index 4c723ddf324..03a76d9d3fd 100644 --- a/spec/features/boards/issue_ordering_spec.rb +++ b/spec/features/boards/issue_ordering_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Issue Boards', :js do +RSpec.describe 'Issue Boards', :js do include DragTo let(:project) { create(:project, :public) } diff --git a/spec/features/boards/keyboard_shortcut_spec.rb b/spec/features/boards/keyboard_shortcut_spec.rb index 6074c559701..f51b4d21e3b 100644 --- a/spec/features/boards/keyboard_shortcut_spec.rb +++ b/spec/features/boards/keyboard_shortcut_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Issue Boards shortcut', :js do +RSpec.describe 'Issue Boards shortcut', :js do context 'issues are enabled' do let(:project) { create(:project) } diff --git a/spec/features/boards/modal_filter_spec.rb b/spec/features/boards/modal_filter_spec.rb index 31f4c502c61..5aeb9eb5e50 100644 --- a/spec/features/boards/modal_filter_spec.rb +++ b/spec/features/boards/modal_filter_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Issue Boards add issue modal filtering', :js do +RSpec.describe 'Issue Boards add issue modal filtering', :js do let(:project) { create(:project, :public) } let(:board) { create(:board, project: project) } let(:planning) { create(:label, project: project, name: 'Planning') } diff --git a/spec/features/boards/multi_select_spec.rb b/spec/features/boards/multi_select_spec.rb index 885dc08e38d..162455f75e6 100644 --- a/spec/features/boards/multi_select_spec.rb +++ b/spec/features/boards/multi_select_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Multi Select Issue', :js do +RSpec.describe 'Multi Select Issue', :js do include DragTo let(:group) { create(:group, :nested) } diff --git a/spec/features/boards/multiple_boards_spec.rb b/spec/features/boards/multiple_boards_spec.rb index 8e56be6bdd0..2894d5c7666 100644 --- a/spec/features/boards/multiple_boards_spec.rb +++ b/spec/features/boards/multiple_boards_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Multiple Issue Boards', :js do +RSpec.describe 'Multiple Issue Boards', :js do let_it_be(:user) { create(:user) } let_it_be(:project) { create(:project, :public) } let_it_be(:planning) { create(:label, project: project, name: 'Planning') } diff --git a/spec/features/boards/new_issue_spec.rb b/spec/features/boards/new_issue_spec.rb index 2d41b5d612d..efa1f8cfc0d 100644 --- a/spec/features/boards/new_issue_spec.rb +++ b/spec/features/boards/new_issue_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Issue Boards new issue', :js do +RSpec.describe 'Issue Boards new issue', :js do let(:project) { create(:project, :public) } let(:board) { create(:board, project: project) } let!(:list) { create(:list, board: board, position: 0) } diff --git a/spec/features/boards/reload_boards_on_browser_back_spec.rb b/spec/features/boards/reload_boards_on_browser_back_spec.rb index 6528b8f58bb..181cbcc9811 100644 --- a/spec/features/boards/reload_boards_on_browser_back_spec.rb +++ b/spec/features/boards/reload_boards_on_browser_back_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Ensure Boards do not show stale data on browser back', :js do +RSpec.describe 'Ensure Boards do not show stale data on browser back', :js do let(:project) {create(:project, :public)} let(:board) {create(:board, project: project)} let(:user) {create(:user)} diff --git a/spec/features/boards/sidebar_spec.rb b/spec/features/boards/sidebar_spec.rb index d05709b7e2f..65f2e5dfc0d 100644 --- a/spec/features/boards/sidebar_spec.rb +++ b/spec/features/boards/sidebar_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Issue Boards', :js do +RSpec.describe 'Issue Boards', :js do include BoardHelpers include FilteredSearchHelpers diff --git a/spec/features/boards/sub_group_project_spec.rb b/spec/features/boards/sub_group_project_spec.rb index 4384a1a9379..cd3d61726f6 100644 --- a/spec/features/boards/sub_group_project_spec.rb +++ b/spec/features/boards/sub_group_project_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Sub-group project issue boards', :js do +RSpec.describe 'Sub-group project issue boards', :js do let(:group) { create(:group) } let(:nested_group_1) { create(:group, parent: group) } let(:project) { create(:project, group: nested_group_1) } diff --git a/spec/features/broadcast_messages_spec.rb b/spec/features/broadcast_messages_spec.rb index c770e6e4f81..f339d45671d 100644 --- a/spec/features/broadcast_messages_spec.rb +++ b/spec/features/broadcast_messages_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Broadcast Messages' do +RSpec.describe 'Broadcast Messages' do let_it_be(:user) { create(:user) } shared_examples 'a Broadcast Messages' do |type| diff --git a/spec/features/calendar_spec.rb b/spec/features/calendar_spec.rb index 0d0912a9ed9..5b78d93ae04 100644 --- a/spec/features/calendar_spec.rb +++ b/spec/features/calendar_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Contributions Calendar', :js do +RSpec.describe 'Contributions Calendar', :js do include MobileHelpers let(:user) { create(:user) } diff --git a/spec/features/clusters/cluster_detail_page_spec.rb b/spec/features/clusters/cluster_detail_page_spec.rb index 4b478163952..6058c35c2cf 100644 --- a/spec/features/clusters/cluster_detail_page_spec.rb +++ b/spec/features/clusters/cluster_detail_page_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Clusterable > Show page' do +RSpec.describe 'Clusterable > Show page' do include KubernetesHelpers let(:current_user) { create(:user) } diff --git a/spec/features/clusters/installing_applications_shared_examples.rb b/spec/features/clusters/installing_applications_shared_examples.rb index 5b565c0a304..d2f28f5b219 100644 --- a/spec/features/clusters/installing_applications_shared_examples.rb +++ b/spec/features/clusters/installing_applications_shared_examples.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -shared_examples "installing applications for a cluster" do |managed_apps_local_tiller| +RSpec.shared_examples "installing applications for a cluster" do |managed_apps_local_tiller| before do stub_feature_flags(managed_apps_local_tiller: managed_apps_local_tiller) @@ -279,7 +279,7 @@ shared_examples "installing applications for a cluster" do |managed_apps_local_t end end -shared_examples "installing applications on a cluster" do +RSpec.shared_examples "installing applications on a cluster" do it_behaves_like "installing applications for a cluster", false it_behaves_like "installing applications for a cluster", true end diff --git a/spec/features/commits/user_uses_quick_actions_spec.rb b/spec/features/commits/user_uses_quick_actions_spec.rb index 70ea920b7ec..12e7865e490 100644 --- a/spec/features/commits/user_uses_quick_actions_spec.rb +++ b/spec/features/commits/user_uses_quick_actions_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Commit > User uses quick actions', :js do +RSpec.describe 'Commit > User uses quick actions', :js do include Spec::Support::Helpers::Features::NotesHelpers include RepoHelpers diff --git a/spec/features/commits/user_view_commits_spec.rb b/spec/features/commits/user_view_commits_spec.rb index 133baca8b1c..5907534220d 100644 --- a/spec/features/commits/user_view_commits_spec.rb +++ b/spec/features/commits/user_view_commits_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Commit > User view commits' do +RSpec.describe 'Commit > User view commits' do let_it_be(:project) { create(:project, :public, :repository) } let_it_be(:user) { project.creator } diff --git a/spec/features/commits_spec.rb b/spec/features/commits_spec.rb index d8b886b239f..60c37d1e125 100644 --- a/spec/features/commits_spec.rb +++ b/spec/features/commits_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Commits' do +RSpec.describe 'Commits' do let_it_be(:project) { create(:project, :repository) } let_it_be(:user) { create(:user) } diff --git a/spec/features/contextual_sidebar_spec.rb b/spec/features/contextual_sidebar_spec.rb index e250e8cc90a..8ea1ebac6b7 100644 --- a/spec/features/contextual_sidebar_spec.rb +++ b/spec/features/contextual_sidebar_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Contextual sidebar', :js do +RSpec.describe 'Contextual sidebar', :js do let(:user) { create(:user) } let(:project) { create(:project) } diff --git a/spec/features/cycle_analytics_spec.rb b/spec/features/cycle_analytics_spec.rb index 50d9cb1c833..0294ebbe13f 100644 --- a/spec/features/cycle_analytics_spec.rb +++ b/spec/features/cycle_analytics_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Value Stream Analytics', :js do +RSpec.describe 'Value Stream Analytics', :js do let(:user) { create(:user) } let(:guest) { create(:user) } let(:project) { create(:project, :repository) } diff --git a/spec/features/dashboard/activity_spec.rb b/spec/features/dashboard/activity_spec.rb index 0a3b550c0c4..b419a063858 100644 --- a/spec/features/dashboard/activity_spec.rb +++ b/spec/features/dashboard/activity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Dashboard > Activity' do +RSpec.describe 'Dashboard > Activity' do let(:user) { create(:user) } before do diff --git a/spec/features/dashboard/datetime_on_tooltips_spec.rb b/spec/features/dashboard/datetime_on_tooltips_spec.rb index 42ec40f21da..ed28ec6099d 100644 --- a/spec/features/dashboard/datetime_on_tooltips_spec.rb +++ b/spec/features/dashboard/datetime_on_tooltips_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Tooltips on .timeago dates', :js do +RSpec.describe 'Tooltips on .timeago dates', :js do let(:user) { create(:user) } let(:project) { create(:project, name: 'test', namespace: user.namespace) } let(:created_date) { Date.yesterday.to_time } diff --git a/spec/features/dashboard/group_dashboard_with_external_authorization_service_spec.rb b/spec/features/dashboard/group_dashboard_with_external_authorization_service_spec.rb index aebc2eb1916..c2a3b90b6f4 100644 --- a/spec/features/dashboard/group_dashboard_with_external_authorization_service_spec.rb +++ b/spec/features/dashboard/group_dashboard_with_external_authorization_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'The group dashboard' do +RSpec.describe 'The group dashboard' do include ExternalAuthorizationServiceHelpers let(:user) { create(:user) } diff --git a/spec/features/dashboard/groups_list_spec.rb b/spec/features/dashboard/groups_list_spec.rb index 5b336f994f7..8c941b27cd2 100644 --- a/spec/features/dashboard/groups_list_spec.rb +++ b/spec/features/dashboard/groups_list_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Dashboard Groups page', :js do +RSpec.describe 'Dashboard Groups page', :js do let(:user) { create :user } let(:group) { create(:group) } let(:nested_group) { create(:group, :nested) } diff --git a/spec/features/dashboard/instance_statistics_spec.rb b/spec/features/dashboard/instance_statistics_spec.rb index feb568d8ef4..f85b8454113 100644 --- a/spec/features/dashboard/instance_statistics_spec.rb +++ b/spec/features/dashboard/instance_statistics_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Showing analytics' do +RSpec.describe 'Showing analytics' do before do sign_in user if user end diff --git a/spec/features/dashboard/issuables_counter_spec.rb b/spec/features/dashboard/issuables_counter_spec.rb index eca78749171..7526a55a3c1 100644 --- a/spec/features/dashboard/issuables_counter_spec.rb +++ b/spec/features/dashboard/issuables_counter_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Navigation bar counter', :use_clean_rails_memory_store_caching do +RSpec.describe 'Navigation bar counter', :use_clean_rails_memory_store_caching do let(:user) { create(:user) } let(:project) { create(:project, namespace: user.namespace) } let(:issue) { create(:issue, project: project) } diff --git a/spec/features/dashboard/issues_filter_spec.rb b/spec/features/dashboard/issues_filter_spec.rb index 8e2a3d983b1..4bd00bd0a80 100644 --- a/spec/features/dashboard/issues_filter_spec.rb +++ b/spec/features/dashboard/issues_filter_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Dashboard Issues filtering', :js do +RSpec.describe 'Dashboard Issues filtering', :js do include Spec::Support::Helpers::Features::SortingHelpers include FilteredSearchHelpers diff --git a/spec/features/dashboard/label_filter_spec.rb b/spec/features/dashboard/label_filter_spec.rb index 630b2b636b4..ebe5c3e1091 100644 --- a/spec/features/dashboard/label_filter_spec.rb +++ b/spec/features/dashboard/label_filter_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Dashboard > label filter', :js do +RSpec.describe 'Dashboard > label filter', :js do include FilteredSearchHelpers let(:filtered_search) { find('.filtered-search') } diff --git a/spec/features/dashboard/merge_requests_spec.rb b/spec/features/dashboard/merge_requests_spec.rb index 0c728ab22de..5331b5559d8 100644 --- a/spec/features/dashboard/merge_requests_spec.rb +++ b/spec/features/dashboard/merge_requests_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Dashboard Merge Requests' do +RSpec.describe 'Dashboard Merge Requests' do include Spec::Support::Helpers::Features::SortingHelpers include FilteredSearchHelpers include ProjectForksHelper diff --git a/spec/features/dashboard/milestones_spec.rb b/spec/features/dashboard/milestones_spec.rb index 4ad19710d90..308432b7a1b 100644 --- a/spec/features/dashboard/milestones_spec.rb +++ b/spec/features/dashboard/milestones_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Dashboard > Milestones' do +RSpec.describe 'Dashboard > Milestones' do describe 'as anonymous user' do before do visit dashboard_milestones_path diff --git a/spec/features/dashboard/project_member_activity_index_spec.rb b/spec/features/dashboard/project_member_activity_index_spec.rb index 120c0357495..6e6e466294f 100644 --- a/spec/features/dashboard/project_member_activity_index_spec.rb +++ b/spec/features/dashboard/project_member_activity_index_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Project member activity', :js do +RSpec.describe 'Project member activity', :js do let(:user) { create(:user) } let(:project) { create(:project, :public, name: 'x', namespace: user.namespace) } diff --git a/spec/features/dashboard/projects_spec.rb b/spec/features/dashboard/projects_spec.rb index 5201d56cc44..e1beaf923e8 100644 --- a/spec/features/dashboard/projects_spec.rb +++ b/spec/features/dashboard/projects_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Dashboard Projects' do +RSpec.describe 'Dashboard Projects' do let(:user) { create(:user) } let(:project) { create(:project, :repository, name: 'awesome stuff') } let(:project2) { create(:project, :public, name: 'Community project') } diff --git a/spec/features/dashboard/root_explore_spec.rb b/spec/features/dashboard/root_explore_spec.rb index 0e065dbed67..a3c346ffe2a 100644 --- a/spec/features/dashboard/root_explore_spec.rb +++ b/spec/features/dashboard/root_explore_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Root explore' do +RSpec.describe 'Root explore' do let_it_be(:public_project) { create(:project, :public) } let_it_be(:archived_project) { create(:project, :archived) } let_it_be(:internal_project) { create(:project, :internal) } diff --git a/spec/features/dashboard/shortcuts_spec.rb b/spec/features/dashboard/shortcuts_spec.rb index 6907c681417..04bbc3059de 100644 --- a/spec/features/dashboard/shortcuts_spec.rb +++ b/spec/features/dashboard/shortcuts_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Dashboard shortcuts', :js do +RSpec.describe 'Dashboard shortcuts', :js do context 'logged in' do let(:user) { create(:user) } let(:project) { create(:project) } diff --git a/spec/features/dashboard/snippets_spec.rb b/spec/features/dashboard/snippets_spec.rb index 94aef03e093..224f2111014 100644 --- a/spec/features/dashboard/snippets_spec.rb +++ b/spec/features/dashboard/snippets_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Dashboard snippets' do +RSpec.describe 'Dashboard snippets' do let_it_be(:user) { create(:user) } context 'when the project has snippets' do diff --git a/spec/features/dashboard/todos/target_state_spec.rb b/spec/features/dashboard/todos/target_state_spec.rb index 0ea1f43e34b..4c43948201c 100644 --- a/spec/features/dashboard/todos/target_state_spec.rb +++ b/spec/features/dashboard/todos/target_state_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Dashboard > Todo target states' do +RSpec.describe 'Dashboard > Todo target states' do let(:user) { create(:user) } let(:author) { create(:user) } let(:project) { create(:project, :public) } diff --git a/spec/features/dashboard/todos/todos_filtering_spec.rb b/spec/features/dashboard/todos/todos_filtering_spec.rb index efa163042f9..f60b07c976e 100644 --- a/spec/features/dashboard/todos/todos_filtering_spec.rb +++ b/spec/features/dashboard/todos/todos_filtering_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Dashboard > User filters todos', :js do +RSpec.describe 'Dashboard > User filters todos', :js do let(:user_1) { create(:user, username: 'user_1', name: 'user_1') } let(:user_2) { create(:user, username: 'user_2', name: 'user_2') } diff --git a/spec/features/dashboard/todos/todos_sorting_spec.rb b/spec/features/dashboard/todos/todos_sorting_spec.rb index 421a66c6d48..d0f9a2b35f3 100644 --- a/spec/features/dashboard/todos/todos_sorting_spec.rb +++ b/spec/features/dashboard/todos/todos_sorting_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Dashboard > User sorts todos' do +RSpec.describe 'Dashboard > User sorts todos' do let(:user) { create(:user) } let(:project) { create(:project) } diff --git a/spec/features/dashboard/todos/todos_spec.rb b/spec/features/dashboard/todos/todos_spec.rb index c4f6d9a279f..cf773d2caed 100644 --- a/spec/features/dashboard/todos/todos_spec.rb +++ b/spec/features/dashboard/todos/todos_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Dashboard Todos' do +RSpec.describe 'Dashboard Todos' do let_it_be(:user) { create(:user, username: 'john') } let_it_be(:author) { create(:user) } let_it_be(:project) { create(:project, :public) } diff --git a/spec/features/dashboard/user_filters_projects_spec.rb b/spec/features/dashboard/user_filters_projects_spec.rb index c4e4eb8affe..832f50932f4 100644 --- a/spec/features/dashboard/user_filters_projects_spec.rb +++ b/spec/features/dashboard/user_filters_projects_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Dashboard > User filters projects' do +RSpec.describe 'Dashboard > User filters projects' do let(:user) { create(:user) } let(:project) { create(:project, name: 'Victorialand', namespace: user.namespace, created_at: 2.seconds.ago, updated_at: 2.seconds.ago) } let(:user2) { create(:user) } diff --git a/spec/features/discussion_comments/commit_spec.rb b/spec/features/discussion_comments/commit_spec.rb index f594a30165b..5a744e43bb6 100644 --- a/spec/features/discussion_comments/commit_spec.rb +++ b/spec/features/discussion_comments/commit_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Thread Comments Commit', :js do +RSpec.describe 'Thread Comments Commit', :js do include RepoHelpers let(:user) { create(:user) } diff --git a/spec/features/discussion_comments/issue_spec.rb b/spec/features/discussion_comments/issue_spec.rb index fbceb2a51ae..2ad77a2884c 100644 --- a/spec/features/discussion_comments/issue_spec.rb +++ b/spec/features/discussion_comments/issue_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Thread Comments Issue', :js do +RSpec.describe 'Thread Comments Issue', :js do let(:user) { create(:user) } let(:project) { create(:project) } let(:issue) { create(:issue, project: project) } diff --git a/spec/features/discussion_comments/merge_request_spec.rb b/spec/features/discussion_comments/merge_request_spec.rb index c5457522c8e..43801b30608 100644 --- a/spec/features/discussion_comments/merge_request_spec.rb +++ b/spec/features/discussion_comments/merge_request_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Thread Comments Merge Request', :js do +RSpec.describe 'Thread Comments Merge Request', :js do let(:user) { create(:user) } let(:project) { create(:project, :repository) } let(:merge_request) { create(:merge_request, source_project: project) } diff --git a/spec/features/discussion_comments/snippets_spec.rb b/spec/features/discussion_comments/snippets_spec.rb index bf78a5261c5..50201bbdb21 100644 --- a/spec/features/discussion_comments/snippets_spec.rb +++ b/spec/features/discussion_comments/snippets_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Thread Comments Snippet', :js do +RSpec.describe 'Thread Comments Snippet', :js do let_it_be(:user) { create(:user) } let_it_be(:project) { create(:project) } let_it_be(:snippet) { create(:project_snippet, :private, :repository, project: project, author: user) } diff --git a/spec/features/display_system_header_and_footer_bar_spec.rb b/spec/features/display_system_header_and_footer_bar_spec.rb index e32da1a02bc..0979371a574 100644 --- a/spec/features/display_system_header_and_footer_bar_spec.rb +++ b/spec/features/display_system_header_and_footer_bar_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Display system header and footer bar' do +RSpec.describe 'Display system header and footer bar' do let(:header_message) { "Foo" } let(:footer_message) { "Bar" } diff --git a/spec/features/error_pages_spec.rb b/spec/features/error_pages_spec.rb index 562277388bb..77f8aa87237 100644 --- a/spec/features/error_pages_spec.rb +++ b/spec/features/error_pages_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Error Pages' do +RSpec.describe 'Error Pages' do let(:user) { create(:user) } let(:project) { create(:project, :public) } diff --git a/spec/features/error_tracking/user_filters_errors_by_status_spec.rb b/spec/features/error_tracking/user_filters_errors_by_status_spec.rb index 4b5bc16c4db..a0d93b791d9 100644 --- a/spec/features/error_tracking/user_filters_errors_by_status_spec.rb +++ b/spec/features/error_tracking/user_filters_errors_by_status_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'When a user filters Sentry errors by status', :js, :use_clean_rails_memory_store_caching, :sidekiq_inline do +RSpec.describe 'When a user filters Sentry errors by status', :js, :use_clean_rails_memory_store_caching, :sidekiq_inline do include_context 'sentry error tracking context feature' let_it_be(:issues_response_body) { fixture_file('sentry/issues_sample_response.json') } diff --git a/spec/features/error_tracking/user_searches_sentry_errors_spec.rb b/spec/features/error_tracking/user_searches_sentry_errors_spec.rb index c5559081feb..025a6261957 100644 --- a/spec/features/error_tracking/user_searches_sentry_errors_spec.rb +++ b/spec/features/error_tracking/user_searches_sentry_errors_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'When a user searches for Sentry errors', :js, :use_clean_rails_memory_store_caching, :sidekiq_inline do +RSpec.describe 'When a user searches for Sentry errors', :js, :use_clean_rails_memory_store_caching, :sidekiq_inline do include_context 'sentry error tracking context feature' let_it_be(:issues_response_body) { fixture_file('sentry/issues_sample_response.json') } diff --git a/spec/features/error_tracking/user_sees_error_details_spec.rb b/spec/features/error_tracking/user_sees_error_details_spec.rb index 6f72c44c689..e4a09d04ca1 100644 --- a/spec/features/error_tracking/user_sees_error_details_spec.rb +++ b/spec/features/error_tracking/user_sees_error_details_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'View error details page', :js, :use_clean_rails_memory_store_caching, :sidekiq_inline do +RSpec.describe 'View error details page', :js, :use_clean_rails_memory_store_caching, :sidekiq_inline do include_context 'sentry error tracking context feature' context 'with current user as project owner' do diff --git a/spec/features/error_tracking/user_sees_error_index_spec.rb b/spec/features/error_tracking/user_sees_error_index_spec.rb index 34a3a4b5a49..a4b15432ef3 100644 --- a/spec/features/error_tracking/user_sees_error_index_spec.rb +++ b/spec/features/error_tracking/user_sees_error_index_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'View error index page', :js, :use_clean_rails_memory_store_caching, :sidekiq_inline do +RSpec.describe 'View error index page', :js, :use_clean_rails_memory_store_caching, :sidekiq_inline do include_context 'sentry error tracking context feature' let_it_be(:issues_response_body) { fixture_file('sentry/issues_sample_response.json') } diff --git a/spec/features/expand_collapse_diffs_spec.rb b/spec/features/expand_collapse_diffs_spec.rb index 4bd2a305dfa..6b8df8467e5 100644 --- a/spec/features/expand_collapse_diffs_spec.rb +++ b/spec/features/expand_collapse_diffs_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Expand and collapse diffs', :js do +RSpec.describe 'Expand and collapse diffs', :js do let(:branch) { 'expand-collapse-diffs' } let(:project) { create(:project, :repository) } diff --git a/spec/features/explore/groups_list_spec.rb b/spec/features/explore/groups_list_spec.rb index c14144ab3d5..ba09cc20154 100644 --- a/spec/features/explore/groups_list_spec.rb +++ b/spec/features/explore/groups_list_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Explore Groups page', :js do +RSpec.describe 'Explore Groups page', :js do let!(:user) { create :user } let!(:group) { create(:group) } let!(:public_group) { create(:group, :public) } diff --git a/spec/features/explore/groups_spec.rb b/spec/features/explore/groups_spec.rb index aee0a7c5573..6e9749f29c3 100644 --- a/spec/features/explore/groups_spec.rb +++ b/spec/features/explore/groups_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Explore Groups', :js do +RSpec.describe 'Explore Groups', :js do let(:user) { create :user } let(:group) { create :group } let!(:private_project) do diff --git a/spec/features/explore/user_explores_projects_spec.rb b/spec/features/explore/user_explores_projects_spec.rb index 6adf51a1cf6..e217638f62b 100644 --- a/spec/features/explore/user_explores_projects_spec.rb +++ b/spec/features/explore/user_explores_projects_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User explores projects' do +RSpec.describe 'User explores projects' do let_it_be(:archived_project) { create(:project, :archived) } let_it_be(:internal_project) { create(:project, :internal) } let_it_be(:private_project) { create(:project, :private) } diff --git a/spec/features/global_search_spec.rb b/spec/features/global_search_spec.rb index 6a6743f914d..c878ee7329f 100644 --- a/spec/features/global_search_spec.rb +++ b/spec/features/global_search_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Global search' do +RSpec.describe 'Global search' do let(:user) { create(:user) } let(:project) { create(:project, namespace: user.namespace) } diff --git a/spec/features/graphiql_spec.rb b/spec/features/graphiql_spec.rb index 329758113ab..91f53b4bb7c 100644 --- a/spec/features/graphiql_spec.rb +++ b/spec/features/graphiql_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'GraphiQL' do +RSpec.describe 'GraphiQL' do context 'without relative_url_root' do before do visit '/-/graphql-explorer' diff --git a/spec/features/group_variables_spec.rb b/spec/features/group_variables_spec.rb index 524ae837b5e..9a3dca61680 100644 --- a/spec/features/group_variables_spec.rb +++ b/spec/features/group_variables_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Group variables', :js do +RSpec.describe 'Group variables', :js do let(:user) { create(:user) } let(:group) { create(:group) } let!(:variable) { create(:ci_group_variable, key: 'test_key', value: 'test_value', masked: true, group: group) } diff --git a/spec/features/groups/activity_spec.rb b/spec/features/groups/activity_spec.rb index c102e19d477..6ca69e76d33 100644 --- a/spec/features/groups/activity_spec.rb +++ b/spec/features/groups/activity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Group activity page' do +RSpec.describe 'Group activity page' do let(:user) { create(:group_member, :developer, user: create(:user), group: group ).user } let(:group) { create(:group) } let(:path) { activity_group_path(group) } diff --git a/spec/features/groups/board_sidebar_spec.rb b/spec/features/groups/board_sidebar_spec.rb index ed874141ef4..3bbeed10948 100644 --- a/spec/features/groups/board_sidebar_spec.rb +++ b/spec/features/groups/board_sidebar_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Group Issue Boards', :js do +RSpec.describe 'Group Issue Boards', :js do include BoardHelpers let(:group) { create(:group) } diff --git a/spec/features/groups/board_spec.rb b/spec/features/groups/board_spec.rb index f95e2e91cd7..29d0347086c 100644 --- a/spec/features/groups/board_spec.rb +++ b/spec/features/groups/board_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Group Boards' do +RSpec.describe 'Group Boards' do let(:group) { create(:group) } let!(:project) { create(:project_empty_repo, group: group) } let(:user) { create(:group_member, :maintainer, user: create(:user), group: group ).user } diff --git a/spec/features/groups/clusters/applications_spec.rb b/spec/features/groups/clusters/applications_spec.rb index 5d48df234eb..324ef24efc4 100644 --- a/spec/features/groups/clusters/applications_spec.rb +++ b/spec/features/groups/clusters/applications_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' require_relative '../../../../spec/features/clusters/installing_applications_shared_examples' -describe 'Group-level Cluster Applications', :js do +RSpec.describe 'Group-level Cluster Applications', :js do include GoogleApi::CloudPlatformHelpers let(:group) { create(:group) } diff --git a/spec/features/groups/clusters/eks_spec.rb b/spec/features/groups/clusters/eks_spec.rb index a9267d58739..5a62741250a 100644 --- a/spec/features/groups/clusters/eks_spec.rb +++ b/spec/features/groups/clusters/eks_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Group AWS EKS Cluster', :js do +RSpec.describe 'Group AWS EKS Cluster', :js do let(:group) { create(:group) } let(:user) { create(:user) } diff --git a/spec/features/groups/clusters/user_spec.rb b/spec/features/groups/clusters/user_spec.rb index a29afba99e4..c6e5da92160 100644 --- a/spec/features/groups/clusters/user_spec.rb +++ b/spec/features/groups/clusters/user_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User Cluster', :js do +RSpec.describe 'User Cluster', :js do include GoogleApi::CloudPlatformHelpers let(:group) { create(:group) } diff --git a/spec/features/groups/container_registry_spec.rb b/spec/features/groups/container_registry_spec.rb index 505e9b004fa..87ef2131211 100644 --- a/spec/features/groups/container_registry_spec.rb +++ b/spec/features/groups/container_registry_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Container Registry', :js do +RSpec.describe 'Container Registry', :js do let(:user) { create(:user) } let(:group) { create(:group) } let(:project) { create(:project, namespace: group) } @@ -24,6 +24,13 @@ describe 'Container Registry', :js do expect(page).to have_title _('Container Registry') end + it 'sidebar menu is open' do + visit_container_registry + + sidebar = find('.nav-sidebar') + expect(sidebar).to have_link _('Container Registry') + end + context 'when there are no image repositories' do it 'list page has no container title' do visit_container_registry diff --git a/spec/features/groups/empty_states_spec.rb b/spec/features/groups/empty_states_spec.rb index bbc80b7eec4..d76cf993004 100644 --- a/spec/features/groups/empty_states_spec.rb +++ b/spec/features/groups/empty_states_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Group empty states' do +RSpec.describe 'Group empty states' do let(:group) { create(:group) } let(:user) { create(:group_member, :developer, user: create(:user), group: group ).user } diff --git a/spec/features/groups/group_page_with_external_authorization_service_spec.rb b/spec/features/groups/group_page_with_external_authorization_service_spec.rb index a71b930d35f..8ef1b60d8ca 100644 --- a/spec/features/groups/group_page_with_external_authorization_service_spec.rb +++ b/spec/features/groups/group_page_with_external_authorization_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'The group page' do +RSpec.describe 'The group page' do include ExternalAuthorizationServiceHelpers let(:user) { create(:user) } diff --git a/spec/features/groups/group_settings_spec.rb b/spec/features/groups/group_settings_spec.rb index d686e0ed9d2..8972be45acb 100644 --- a/spec/features/groups/group_settings_spec.rb +++ b/spec/features/groups/group_settings_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Edit group settings' do +RSpec.describe 'Edit group settings' do let(:user) { create(:user) } let(:group) { create(:group, path: 'foo') } diff --git a/spec/features/groups/import_export/export_file_spec.rb b/spec/features/groups/import_export/export_file_spec.rb index 5829e659722..9feb8085e66 100644 --- a/spec/features/groups/import_export/export_file_spec.rb +++ b/spec/features/groups/import_export/export_file_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Group Export', :js do +RSpec.describe 'Group Export', :js do include ExportFileHelper let_it_be(:user) { create(:user) } diff --git a/spec/features/groups/issues_spec.rb b/spec/features/groups/issues_spec.rb index 1cefcd18989..c76e0c311a6 100644 --- a/spec/features/groups/issues_spec.rb +++ b/spec/features/groups/issues_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Group issues page' do +RSpec.describe 'Group issues page' do include FilteredSearchHelpers include DragTo diff --git a/spec/features/groups/labels/create_spec.rb b/spec/features/groups/labels/create_spec.rb index f5062a65321..9c1a3672ebd 100644 --- a/spec/features/groups/labels/create_spec.rb +++ b/spec/features/groups/labels/create_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Create a group label' do +RSpec.describe 'Create a group label' do let(:user) { create(:user) } let(:group) { create(:group) } diff --git a/spec/features/groups/labels/edit_spec.rb b/spec/features/groups/labels/edit_spec.rb index 43f067b89d6..2be7f61eeb9 100644 --- a/spec/features/groups/labels/edit_spec.rb +++ b/spec/features/groups/labels/edit_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Edit group label' do +RSpec.describe 'Edit group label' do let(:user) { create(:user) } let(:group) { create(:group) } let(:label) { create(:group_label, group: group) } diff --git a/spec/features/groups/labels/index_spec.rb b/spec/features/groups/labels/index_spec.rb index 62308d3b518..3de29231f5c 100644 --- a/spec/features/groups/labels/index_spec.rb +++ b/spec/features/groups/labels/index_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Group labels' do +RSpec.describe 'Group labels' do let(:user) { create(:user) } let(:group) { create(:group) } let!(:label) { create(:group_label, group: group) } diff --git a/spec/features/groups/labels/search_labels_spec.rb b/spec/features/groups/labels/search_labels_spec.rb index 14b88a561b1..fbb0acfb923 100644 --- a/spec/features/groups/labels/search_labels_spec.rb +++ b/spec/features/groups/labels/search_labels_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Search for labels', :js do +RSpec.describe 'Search for labels', :js do let(:user) { create(:user) } let(:group) { create(:group) } let!(:label1) { create(:group_label, title: 'Foo', description: 'Lorem ipsum', group: group) } diff --git a/spec/features/groups/labels/sort_labels_spec.rb b/spec/features/groups/labels/sort_labels_spec.rb index 2aea4d77675..b5657db23cb 100644 --- a/spec/features/groups/labels/sort_labels_spec.rb +++ b/spec/features/groups/labels/sort_labels_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Sort labels', :js do +RSpec.describe 'Sort labels', :js do let(:user) { create(:user) } let(:group) { create(:group) } let!(:label1) { create(:group_label, title: 'Foo', description: 'Lorem ipsum', group: group) } diff --git a/spec/features/groups/labels/subscription_spec.rb b/spec/features/groups/labels/subscription_spec.rb index cbccf4f3880..dedded777ac 100644 --- a/spec/features/groups/labels/subscription_spec.rb +++ b/spec/features/groups/labels/subscription_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Labels subscription' do +RSpec.describe 'Labels subscription' do let(:user) { create(:user) } let(:group) { create(:group) } let!(:label1) { create(:group_label, group: group, title: 'foo') } diff --git a/spec/features/groups/labels/user_sees_links_to_issuables_spec.rb b/spec/features/groups/labels/user_sees_links_to_issuables_spec.rb index 38561c71323..b0508633065 100644 --- a/spec/features/groups/labels/user_sees_links_to_issuables_spec.rb +++ b/spec/features/groups/labels/user_sees_links_to_issuables_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Groups > Labels > User sees links to issuables' do +RSpec.describe 'Groups > Labels > User sees links to issuables' do let_it_be(:group) { create(:group, :public) } before do diff --git a/spec/features/groups/members/filter_members_spec.rb b/spec/features/groups/members/filter_members_spec.rb index cba86f7e651..643c8407578 100644 --- a/spec/features/groups/members/filter_members_spec.rb +++ b/spec/features/groups/members/filter_members_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Groups > Members > Filter members' do +RSpec.describe 'Groups > Members > Filter members' do let(:user) { create(:user) } let(:nested_group_user) { create(:user) } let(:user_with_2fa) { create(:user, :two_factor_via_otp) } diff --git a/spec/features/groups/members/leave_group_spec.rb b/spec/features/groups/members/leave_group_spec.rb index 4c5033bb1ed..fecc90f20c7 100644 --- a/spec/features/groups/members/leave_group_spec.rb +++ b/spec/features/groups/members/leave_group_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Groups > Members > Leave group' do +RSpec.describe 'Groups > Members > Leave group' do let(:user) { create(:user) } let(:other_user) { create(:user) } let(:group) { create(:group) } diff --git a/spec/features/groups/members/list_members_spec.rb b/spec/features/groups/members/list_members_spec.rb index 8df807186be..415c6927320 100644 --- a/spec/features/groups/members/list_members_spec.rb +++ b/spec/features/groups/members/list_members_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Groups > Members > List members' do +RSpec.describe 'Groups > Members > List members' do include Select2Helper include Spec::Support::Helpers::Features::ListRowsHelpers diff --git a/spec/features/groups/members/manage_groups_spec.rb b/spec/features/groups/members/manage_groups_spec.rb index 593c450c6d6..f1cf04417c0 100644 --- a/spec/features/groups/members/manage_groups_spec.rb +++ b/spec/features/groups/members/manage_groups_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Groups > Members > Manage groups', :js do +RSpec.describe 'Groups > Members > Manage groups', :js do include Select2Helper include Spec::Support::Helpers::Features::ListRowsHelpers diff --git a/spec/features/groups/members/manage_members_spec.rb b/spec/features/groups/members/manage_members_spec.rb index e4ba3022d8b..e29d8fd651e 100644 --- a/spec/features/groups/members/manage_members_spec.rb +++ b/spec/features/groups/members/manage_members_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Groups > Members > Manage members' do +RSpec.describe 'Groups > Members > Manage members' do include Select2Helper include Spec::Support::Helpers::Features::ListRowsHelpers diff --git a/spec/features/groups/members/master_adds_member_with_expiration_date_spec.rb b/spec/features/groups/members/master_adds_member_with_expiration_date_spec.rb index 491937ce4ab..f80925186ed 100644 --- a/spec/features/groups/members/master_adds_member_with_expiration_date_spec.rb +++ b/spec/features/groups/members/master_adds_member_with_expiration_date_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Groups > Members > Owner adds member with expiration date', :js do +RSpec.describe 'Groups > Members > Owner adds member with expiration date', :js do include Select2Helper include ActiveSupport::Testing::TimeHelpers diff --git a/spec/features/groups/members/master_manages_access_requests_spec.rb b/spec/features/groups/members/master_manages_access_requests_spec.rb index 1c13bd3d59e..2a17e7d2a5c 100644 --- a/spec/features/groups/members/master_manages_access_requests_spec.rb +++ b/spec/features/groups/members/master_manages_access_requests_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Groups > Members > Maintainer manages access requests' do +RSpec.describe 'Groups > Members > Maintainer manages access requests' do it_behaves_like 'Maintainer manages access requests' do let(:entity) { create(:group, :public) } let(:members_page_path) { group_group_members_path(entity) } diff --git a/spec/features/groups/members/request_access_spec.rb b/spec/features/groups/members/request_access_spec.rb index 5f22af3529c..307cb63ec8e 100644 --- a/spec/features/groups/members/request_access_spec.rb +++ b/spec/features/groups/members/request_access_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Groups > Members > Request access' do +RSpec.describe 'Groups > Members > Request access' do let(:user) { create(:user) } let(:owner) { create(:user) } let(:group) { create(:group, :public) } diff --git a/spec/features/groups/members/search_members_spec.rb b/spec/features/groups/members/search_members_spec.rb index fda129ce422..4c34ccf87c3 100644 --- a/spec/features/groups/members/search_members_spec.rb +++ b/spec/features/groups/members/search_members_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Search group member' do +RSpec.describe 'Search group member' do let(:user) { create :user } let(:member) { create :user } diff --git a/spec/features/groups/members/sort_members_spec.rb b/spec/features/groups/members/sort_members_spec.rb index 76709199942..cfc0e421aeb 100644 --- a/spec/features/groups/members/sort_members_spec.rb +++ b/spec/features/groups/members/sort_members_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Groups > Members > Sort members' do +RSpec.describe 'Groups > Members > Sort members' do let(:owner) { create(:user, name: 'John Doe') } let(:developer) { create(:user, name: 'Mary Jane', last_sign_in_at: 5.days.ago) } let(:group) { create(:group) } diff --git a/spec/features/groups/merge_requests_spec.rb b/spec/features/groups/merge_requests_spec.rb index f87fa10e2f4..43d4b6b23e0 100644 --- a/spec/features/groups/merge_requests_spec.rb +++ b/spec/features/groups/merge_requests_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Group merge requests page' do +RSpec.describe 'Group merge requests page' do include FilteredSearchHelpers let(:path) { merge_requests_group_path(group) } diff --git a/spec/features/groups/milestone_spec.rb b/spec/features/groups/milestone_spec.rb index b5790c40355..2217bd9d6b5 100644 --- a/spec/features/groups/milestone_spec.rb +++ b/spec/features/groups/milestone_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Group milestones' do +RSpec.describe 'Group milestones' do let_it_be(:group) { create(:group) } let_it_be(:project) { create(:project_empty_repo, group: group) } let_it_be(:user) { create(:group_member, :maintainer, user: create(:user), group: group ).user } diff --git a/spec/features/groups/milestones_sorting_spec.rb b/spec/features/groups/milestones_sorting_spec.rb index 9ebb04e6f97..a06e64fdee0 100644 --- a/spec/features/groups/milestones_sorting_spec.rb +++ b/spec/features/groups/milestones_sorting_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Milestones sorting', :js do +RSpec.describe 'Milestones sorting', :js do let(:group) { create(:group) } let!(:project) { create(:project_empty_repo, group: group) } let!(:other_project) { create(:project_empty_repo, group: group) } diff --git a/spec/features/groups/navbar_spec.rb b/spec/features/groups/navbar_spec.rb index 1f608c3a337..cfa1f3338a1 100644 --- a/spec/features/groups/navbar_spec.rb +++ b/spec/features/groups/navbar_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Group navbar' do +RSpec.describe 'Group navbar' do include NavbarStructureHelper include_context 'group navbar structure' diff --git a/spec/features/groups/settings/ci_cd_spec.rb b/spec/features/groups/settings/ci_cd_spec.rb index 5b1a9512c55..9c2f9512b9d 100644 --- a/spec/features/groups/settings/ci_cd_spec.rb +++ b/spec/features/groups/settings/ci_cd_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Group CI/CD settings' do +RSpec.describe 'Group CI/CD settings' do include WaitForRequests let(:user) { create(:user) } diff --git a/spec/features/groups/settings/group_badges_spec.rb b/spec/features/groups/settings/group_badges_spec.rb index 72e74df368b..5bf736cc7ce 100644 --- a/spec/features/groups/settings/group_badges_spec.rb +++ b/spec/features/groups/settings/group_badges_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Group Badges' do +RSpec.describe 'Group Badges' do include WaitForRequests let(:user) { create(:user) } diff --git a/spec/features/groups/settings/repository_spec.rb b/spec/features/groups/settings/repository_spec.rb index 722fd98ce59..d20303027e5 100644 --- a/spec/features/groups/settings/repository_spec.rb +++ b/spec/features/groups/settings/repository_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Group Repository settings' do +RSpec.describe 'Group Repository settings' do include WaitForRequests let(:user) { create(:user) } diff --git a/spec/features/groups/share_lock_spec.rb b/spec/features/groups/share_lock_spec.rb index 777f5d98720..d8207899e24 100644 --- a/spec/features/groups/share_lock_spec.rb +++ b/spec/features/groups/share_lock_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Group share with group lock' do +RSpec.describe 'Group share with group lock' do let(:root_owner) { create(:user) } let(:root_group) { create(:group) } diff --git a/spec/features/groups/show_spec.rb b/spec/features/groups/show_spec.rb index bcaed2a5f18..ec30f34199d 100644 --- a/spec/features/groups/show_spec.rb +++ b/spec/features/groups/show_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Group show page' do +RSpec.describe 'Group show page' do let(:group) { create(:group) } let(:path) { group_path(group) } diff --git a/spec/features/groups/user_browse_projects_group_page_spec.rb b/spec/features/groups/user_browse_projects_group_page_spec.rb index 68221e3fefe..999449a94b0 100644 --- a/spec/features/groups/user_browse_projects_group_page_spec.rb +++ b/spec/features/groups/user_browse_projects_group_page_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User browse group projects page' do +RSpec.describe 'User browse group projects page' do let(:user) { create :user } let(:group) { create :group } diff --git a/spec/features/groups/user_sees_package_sidebar_spec.rb b/spec/features/groups/user_sees_package_sidebar_spec.rb index f85b6841636..ee216488232 100644 --- a/spec/features/groups/user_sees_package_sidebar_spec.rb +++ b/spec/features/groups/user_sees_package_sidebar_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Groups > sidebar' do +RSpec.describe 'Groups > sidebar' do let(:user) { create(:user) } let(:group) { create(:group) } diff --git a/spec/features/groups/user_sees_users_dropdowns_in_issuables_list_spec.rb b/spec/features/groups/user_sees_users_dropdowns_in_issuables_list_spec.rb index 742021ae4a1..9fe11070187 100644 --- a/spec/features/groups/user_sees_users_dropdowns_in_issuables_list_spec.rb +++ b/spec/features/groups/user_sees_users_dropdowns_in_issuables_list_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Groups > User sees users dropdowns in issuables list' do +RSpec.describe 'Groups > User sees users dropdowns in issuables list' do let(:entity) { create(:group) } let(:user_in_dropdown) { create(:user) } let!(:user_not_in_dropdown) { create(:user) } diff --git a/spec/features/groups_spec.rb b/spec/features/groups_spec.rb index c1cb0b4951e..78a35fe1d3f 100644 --- a/spec/features/groups_spec.rb +++ b/spec/features/groups_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Group' do +RSpec.describe 'Group' do let(:user) { create(:admin) } before do diff --git a/spec/features/help_pages_spec.rb b/spec/features/help_pages_spec.rb index 1ba3849fe2c..1f8397e45f7 100644 --- a/spec/features/help_pages_spec.rb +++ b/spec/features/help_pages_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Help Pages' do +RSpec.describe 'Help Pages' do describe 'Get the main help page' do before do allow(File).to receive(:read).and_call_original diff --git a/spec/features/ics/dashboard_issues_spec.rb b/spec/features/ics/dashboard_issues_spec.rb index bde5488f375..4a93a4b490a 100644 --- a/spec/features/ics/dashboard_issues_spec.rb +++ b/spec/features/ics/dashboard_issues_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Dashboard Issues Calendar Feed' do +RSpec.describe 'Dashboard Issues Calendar Feed' do describe 'GET /issues' do let!(:user) { create(:user, email: 'private1@example.com', public_email: 'public1@example.com') } let!(:assignee) { create(:user, email: 'private2@example.com', public_email: 'public2@example.com') } diff --git a/spec/features/ics/group_issues_spec.rb b/spec/features/ics/group_issues_spec.rb index 0b317095678..05caca4b5a8 100644 --- a/spec/features/ics/group_issues_spec.rb +++ b/spec/features/ics/group_issues_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Group Issues Calendar Feed' do +RSpec.describe 'Group Issues Calendar Feed' do describe 'GET /issues' do let!(:user) { create(:user, email: 'private1@example.com', public_email: 'public1@example.com') } let!(:assignee) { create(:user, email: 'private2@example.com', public_email: 'public2@example.com') } diff --git a/spec/features/ics/project_issues_spec.rb b/spec/features/ics/project_issues_spec.rb index 3c940149670..58a1a32eac2 100644 --- a/spec/features/ics/project_issues_spec.rb +++ b/spec/features/ics/project_issues_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Project Issues Calendar Feed' do +RSpec.describe 'Project Issues Calendar Feed' do describe 'GET /issues' do let!(:user) { create(:user, email: 'private1@example.com', public_email: 'public1@example.com') } let!(:assignee) { create(:user, email: 'private2@example.com', public_email: 'public2@example.com') } diff --git a/spec/features/ide/clientside_preview_csp_spec.rb b/spec/features/ide/clientside_preview_csp_spec.rb index e097513def3..eadcb9cd008 100644 --- a/spec/features/ide/clientside_preview_csp_spec.rb +++ b/spec/features/ide/clientside_preview_csp_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'IDE Clientside Preview CSP' do +RSpec.describe 'IDE Clientside Preview CSP' do let_it_be(:user) { create(:user) } shared_context 'disable feature' do diff --git a/spec/features/ide/static_object_external_storage_csp_spec.rb b/spec/features/ide/static_object_external_storage_csp_spec.rb index 739b3fe2471..24d37f25739 100644 --- a/spec/features/ide/static_object_external_storage_csp_spec.rb +++ b/spec/features/ide/static_object_external_storage_csp_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Static Object External Storage Content Security Policy' do +RSpec.describe 'Static Object External Storage Content Security Policy' do let_it_be(:user) { create(:user) } shared_context 'disable feature' do diff --git a/spec/features/ide/user_commits_changes_spec.rb b/spec/features/ide/user_commits_changes_spec.rb index f53abde1523..1b1e71e2862 100644 --- a/spec/features/ide/user_commits_changes_spec.rb +++ b/spec/features/ide/user_commits_changes_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'IDE user commits changes', :js do +RSpec.describe 'IDE user commits changes', :js do include WebIdeSpecHelpers let(:project) { create(:project, :public, :repository) } diff --git a/spec/features/ide/user_opens_merge_request_spec.rb b/spec/features/ide/user_opens_merge_request_spec.rb index 03318287db9..e6101e90a83 100644 --- a/spec/features/ide/user_opens_merge_request_spec.rb +++ b/spec/features/ide/user_opens_merge_request_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'IDE merge request', :js do +RSpec.describe 'IDE merge request', :js do let(:merge_request) { create(:merge_request, :with_diffs, :simple, source_project: project) } let(:project) { create(:project, :public, :repository) } let(:user) { project.owner } diff --git a/spec/features/ide_spec.rb b/spec/features/ide_spec.rb index 73f6180d944..2505ab0afee 100644 --- a/spec/features/ide_spec.rb +++ b/spec/features/ide_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'IDE', :js do +RSpec.describe 'IDE', :js do describe 'sub-groups' do let(:user) { create(:user) } let(:group) { create(:group) } diff --git a/spec/features/import/manifest_import_spec.rb b/spec/features/import/manifest_import_spec.rb index 36478128dd1..1efbc5642d4 100644 --- a/spec/features/import/manifest_import_spec.rb +++ b/spec/features/import/manifest_import_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Import multiple repositories by uploading a manifest file', :js do +RSpec.describe 'Import multiple repositories by uploading a manifest file', :js do include Select2Helper let(:user) { create(:admin) } diff --git a/spec/features/instance_statistics/cohorts_spec.rb b/spec/features/instance_statistics/cohorts_spec.rb index 0bb2e4b997d..1f112e1831c 100644 --- a/spec/features/instance_statistics/cohorts_spec.rb +++ b/spec/features/instance_statistics/cohorts_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Cohorts page' do +RSpec.describe 'Cohorts page' do before do sign_in(create(:admin)) diff --git a/spec/features/instance_statistics/dev_ops_score_spec.rb b/spec/features/instance_statistics/dev_ops_score_spec.rb index 453b5582f48..da87aedab5c 100644 --- a/spec/features/instance_statistics/dev_ops_score_spec.rb +++ b/spec/features/instance_statistics/dev_ops_score_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'DevOps Score' do +RSpec.describe 'DevOps Score' do before do sign_in(create(:admin)) end diff --git a/spec/features/instance_statistics/instance_statistics_spec.rb b/spec/features/instance_statistics/instance_statistics_spec.rb index 0fb78c6eef8..7695bf7874b 100644 --- a/spec/features/instance_statistics/instance_statistics_spec.rb +++ b/spec/features/instance_statistics/instance_statistics_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Cohorts page', :js do +RSpec.describe 'Cohorts page', :js do before do sign_in(create(:admin)) end diff --git a/spec/features/invites_spec.rb b/spec/features/invites_spec.rb index 9cd01894575..f85b4b78e35 100644 --- a/spec/features/invites_spec.rb +++ b/spec/features/invites_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Invites' do +RSpec.describe 'Invites' do let(:user) { create(:user) } let(:owner) { create(:user, name: 'John Doe') } let(:group) { create(:group, name: 'Owned') } diff --git a/spec/features/issuables/close_reopen_report_toggle_spec.rb b/spec/features/issuables/close_reopen_report_toggle_spec.rb index 8805018902f..cf3028ec4c9 100644 --- a/spec/features/issuables/close_reopen_report_toggle_spec.rb +++ b/spec/features/issuables/close_reopen_report_toggle_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Issuables Close/Reopen/Report toggle' do +RSpec.describe 'Issuables Close/Reopen/Report toggle' do let(:user) { create(:user) } shared_examples 'an issuable close/reopen/report toggle' do diff --git a/spec/features/issuables/discussion_lock_spec.rb b/spec/features/issuables/discussion_lock_spec.rb index 0cd2c077081..13f1742fbf6 100644 --- a/spec/features/issuables/discussion_lock_spec.rb +++ b/spec/features/issuables/discussion_lock_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Discussion Lock', :js do +RSpec.describe 'Discussion Lock', :js do let(:user) { create(:user) } let(:issue) { create(:issue, project: project, author: user) } let(:project) { create(:project, :public) } diff --git a/spec/features/issuables/issuable_list_spec.rb b/spec/features/issuables/issuable_list_spec.rb index 7014a51ccdc..382a7a9321c 100644 --- a/spec/features/issuables/issuable_list_spec.rb +++ b/spec/features/issuables/issuable_list_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'issuable list' do +RSpec.describe 'issuable list' do let(:project) { create(:project) } let(:user) { create(:user) } diff --git a/spec/features/issuables/markdown_references/internal_references_spec.rb b/spec/features/issuables/markdown_references/internal_references_spec.rb index efd84cf67b0..aceaea8d2ed 100644 --- a/spec/features/issuables/markdown_references/internal_references_spec.rb +++ b/spec/features/issuables/markdown_references/internal_references_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe "Internal references", :js do +RSpec.describe "Internal references", :js do include Spec::Support::Helpers::Features::NotesHelpers let(:private_project_user) { private_project.owner } diff --git a/spec/features/issuables/markdown_references/jira_spec.rb b/spec/features/issuables/markdown_references/jira_spec.rb index 779606effdc..a3a259e21a1 100644 --- a/spec/features/issuables/markdown_references/jira_spec.rb +++ b/spec/features/issuables/markdown_references/jira_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe "Jira", :js do +RSpec.describe "Jira", :js do let(:user) { create(:user) } let(:actual_project) { create(:project, :public, :repository) } let(:merge_request) { create(:merge_request, target_project: actual_project, source_project: actual_project) } diff --git a/spec/features/issuables/shortcuts_issuable_spec.rb b/spec/features/issuables/shortcuts_issuable_spec.rb index da8a0dd7b0f..78cd8d0bef3 100644 --- a/spec/features/issuables/shortcuts_issuable_spec.rb +++ b/spec/features/issuables/shortcuts_issuable_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Blob shortcuts', :js do +RSpec.describe 'Blob shortcuts', :js do let(:user) { create(:user) } let(:project) { create(:project, :public, :repository) } let(:issue) { create(:issue, project: project, author: user) } diff --git a/spec/features/issuables/sorting_list_spec.rb b/spec/features/issuables/sorting_list_spec.rb index b7813c8ba30..59518723740 100644 --- a/spec/features/issuables/sorting_list_spec.rb +++ b/spec/features/issuables/sorting_list_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'spec_helper' -describe 'Sort Issuable List' do +RSpec.describe 'Sort Issuable List' do let(:project) { create(:project, :public) } let(:first_created_issuable) { issuables.order_created_asc.first } diff --git a/spec/features/issuables/user_sees_sidebar_spec.rb b/spec/features/issuables/user_sees_sidebar_spec.rb index 52040eb8cbb..04bf704b6a4 100644 --- a/spec/features/issuables/user_sees_sidebar_spec.rb +++ b/spec/features/issuables/user_sees_sidebar_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Issue Sidebar on Mobile' do +RSpec.describe 'Issue Sidebar on Mobile' do include MobileHelpers let(:project) { create(:project, :public, :repository) } diff --git a/spec/features/issues/bulk_assignment_labels_spec.rb b/spec/features/issues/bulk_assignment_labels_spec.rb index dbde41cf25b..84a786e91a7 100644 --- a/spec/features/issues/bulk_assignment_labels_spec.rb +++ b/spec/features/issues/bulk_assignment_labels_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Issues > Labels bulk assignment' do +RSpec.describe 'Issues > Labels bulk assignment' do let(:user) { create(:user) } let!(:project) { create(:project) } let!(:issue1) { create(:issue, project: project, title: "Issue 1") } diff --git a/spec/features/issues/create_issue_for_discussions_in_merge_request_spec.rb b/spec/features/issues/create_issue_for_discussions_in_merge_request_spec.rb index a3742af31de..6fc648954b4 100644 --- a/spec/features/issues/create_issue_for_discussions_in_merge_request_spec.rb +++ b/spec/features/issues/create_issue_for_discussions_in_merge_request_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Resolving all open threads in a merge request from an issue', :js do +RSpec.describe 'Resolving all open threads in a merge request from an issue', :js do let(:user) { create(:user) } let(:project) { create(:project, :repository) } let(:merge_request) { create(:merge_request, source_project: project) } diff --git a/spec/features/issues/create_issue_for_single_discussion_in_merge_request_spec.rb b/spec/features/issues/create_issue_for_single_discussion_in_merge_request_spec.rb index 1c17b39c03a..55a02dc4255 100644 --- a/spec/features/issues/create_issue_for_single_discussion_in_merge_request_spec.rb +++ b/spec/features/issues/create_issue_for_single_discussion_in_merge_request_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Resolve an open thread in a merge request by creating an issue', :js do +RSpec.describe 'Resolve an open thread in a merge request by creating an issue', :js do let(:user) { create(:user) } let(:project) { create(:project, :repository, only_allow_merge_if_all_discussions_are_resolved: true) } let(:merge_request) { create(:merge_request, source_project: project) } diff --git a/spec/features/issues/csv_spec.rb b/spec/features/issues/csv_spec.rb index 193c83d2a40..8d06bf24f8b 100644 --- a/spec/features/issues/csv_spec.rb +++ b/spec/features/issues/csv_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Issues csv' do +RSpec.describe 'Issues csv' do let(:user) { create(:user) } let(:project) { create(:project, :public) } let(:milestone) { create(:milestone, title: 'v1.0', project: project) } diff --git a/spec/features/issues/filtered_search/dropdown_assignee_spec.rb b/spec/features/issues/filtered_search/dropdown_assignee_spec.rb index c207e91f02e..381633b0fc9 100644 --- a/spec/features/issues/filtered_search/dropdown_assignee_spec.rb +++ b/spec/features/issues/filtered_search/dropdown_assignee_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Dropdown assignee', :js do +RSpec.describe 'Dropdown assignee', :js do include FilteredSearchHelpers let!(:project) { create(:project) } diff --git a/spec/features/issues/filtered_search/dropdown_author_spec.rb b/spec/features/issues/filtered_search/dropdown_author_spec.rb index 8ded11b3b08..91c85825a17 100644 --- a/spec/features/issues/filtered_search/dropdown_author_spec.rb +++ b/spec/features/issues/filtered_search/dropdown_author_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Dropdown author', :js do +RSpec.describe 'Dropdown author', :js do include FilteredSearchHelpers let!(:project) { create(:project) } diff --git a/spec/features/issues/filtered_search/dropdown_base_spec.rb b/spec/features/issues/filtered_search/dropdown_base_spec.rb index 14d3f48b8fc..d730525cb8b 100644 --- a/spec/features/issues/filtered_search/dropdown_base_spec.rb +++ b/spec/features/issues/filtered_search/dropdown_base_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Dropdown base', :js do +RSpec.describe 'Dropdown base', :js do include FilteredSearchHelpers let!(:project) { create(:project) } diff --git a/spec/features/issues/filtered_search/dropdown_emoji_spec.rb b/spec/features/issues/filtered_search/dropdown_emoji_spec.rb index 9ab0f49cd15..c2c933f8a86 100644 --- a/spec/features/issues/filtered_search/dropdown_emoji_spec.rb +++ b/spec/features/issues/filtered_search/dropdown_emoji_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Dropdown emoji', :js do +RSpec.describe 'Dropdown emoji', :js do include FilteredSearchHelpers let!(:project) { create(:project, :public) } diff --git a/spec/features/issues/filtered_search/dropdown_hint_spec.rb b/spec/features/issues/filtered_search/dropdown_hint_spec.rb index 10b092c6957..9edc6e0b593 100644 --- a/spec/features/issues/filtered_search/dropdown_hint_spec.rb +++ b/spec/features/issues/filtered_search/dropdown_hint_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Dropdown hint', :js do +RSpec.describe 'Dropdown hint', :js do include FilteredSearchHelpers let!(:project) { create(:project, :public) } diff --git a/spec/features/issues/filtered_search/dropdown_label_spec.rb b/spec/features/issues/filtered_search/dropdown_label_spec.rb index a982053dbcb..c0d5fe0d860 100644 --- a/spec/features/issues/filtered_search/dropdown_label_spec.rb +++ b/spec/features/issues/filtered_search/dropdown_label_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Dropdown label', :js do +RSpec.describe 'Dropdown label', :js do include FilteredSearchHelpers let(:project) { create(:project) } diff --git a/spec/features/issues/filtered_search/dropdown_milestone_spec.rb b/spec/features/issues/filtered_search/dropdown_milestone_spec.rb index 56beb35a1c5..68afd973f1d 100644 --- a/spec/features/issues/filtered_search/dropdown_milestone_spec.rb +++ b/spec/features/issues/filtered_search/dropdown_milestone_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Dropdown milestone', :js do +RSpec.describe 'Dropdown milestone', :js do include FilteredSearchHelpers let!(:project) { create(:project) } diff --git a/spec/features/issues/filtered_search/dropdown_release_spec.rb b/spec/features/issues/filtered_search/dropdown_release_spec.rb index ae1c84d71b4..daf686c2850 100644 --- a/spec/features/issues/filtered_search/dropdown_release_spec.rb +++ b/spec/features/issues/filtered_search/dropdown_release_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Dropdown release', :js do +RSpec.describe 'Dropdown release', :js do include FilteredSearchHelpers let!(:project) { create(:project, :repository) } diff --git a/spec/features/issues/filtered_search/filter_issues_spec.rb b/spec/features/issues/filtered_search/filter_issues_spec.rb index 3ee5840e1b9..5b5348d4069 100644 --- a/spec/features/issues/filtered_search/filter_issues_spec.rb +++ b/spec/features/issues/filtered_search/filter_issues_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Filter issues', :js do +RSpec.describe 'Filter issues', :js do include FilteredSearchHelpers let(:project) { create(:project) } diff --git a/spec/features/issues/filtered_search/recent_searches_spec.rb b/spec/features/issues/filtered_search/recent_searches_spec.rb index e05c7aa3af5..85b7a093536 100644 --- a/spec/features/issues/filtered_search/recent_searches_spec.rb +++ b/spec/features/issues/filtered_search/recent_searches_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Recent searches', :js do +RSpec.describe 'Recent searches', :js do include FilteredSearchHelpers let(:project_1) { create(:project, :public) } diff --git a/spec/features/issues/filtered_search/search_bar_spec.rb b/spec/features/issues/filtered_search/search_bar_spec.rb index ad994270218..167fecc5ab1 100644 --- a/spec/features/issues/filtered_search/search_bar_spec.rb +++ b/spec/features/issues/filtered_search/search_bar_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Search bar', :js do +RSpec.describe 'Search bar', :js do include FilteredSearchHelpers let!(:project) { create(:project) } diff --git a/spec/features/issues/filtered_search/visual_tokens_spec.rb b/spec/features/issues/filtered_search/visual_tokens_spec.rb index d34253b3c5e..59588978a8e 100644 --- a/spec/features/issues/filtered_search/visual_tokens_spec.rb +++ b/spec/features/issues/filtered_search/visual_tokens_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Visual tokens', :js do +RSpec.describe 'Visual tokens', :js do include FilteredSearchHelpers let!(:project) { create(:project) } diff --git a/spec/features/issues/form_spec.rb b/spec/features/issues/form_spec.rb index 8d7b6be5ea2..dac066856c0 100644 --- a/spec/features/issues/form_spec.rb +++ b/spec/features/issues/form_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'New/edit issue', :js do +RSpec.describe 'New/edit issue', :js do include ActionView::Helpers::JavaScriptHelper include FormHelper diff --git a/spec/features/issues/gfm_autocomplete_spec.rb b/spec/features/issues/gfm_autocomplete_spec.rb index 501a2d347d1..4a7e1ba99e9 100644 --- a/spec/features/issues/gfm_autocomplete_spec.rb +++ b/spec/features/issues/gfm_autocomplete_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'GFM autocomplete', :js do +RSpec.describe 'GFM autocomplete', :js do let(:issue_xss_title) { 'This will execute alert<img src=x onerror=alert(2)<img src=x onerror=alert(1)>' } let(:user_xss_title) { 'eve <img src=x onerror=alert(2)<img src=x onerror=alert(1)>' } let(:label_xss_title) { 'alert label <img src=x onerror="alert(\'Hello xss\');" a' } diff --git a/spec/features/issues/group_label_sidebar_spec.rb b/spec/features/issues/group_label_sidebar_spec.rb index fe6d95e1039..e6a173f4589 100644 --- a/spec/features/issues/group_label_sidebar_spec.rb +++ b/spec/features/issues/group_label_sidebar_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Group label on issue' do +RSpec.describe 'Group label on issue' do it 'renders link to the project issues page' do group = create(:group) project = create(:project, :public, namespace: group) diff --git a/spec/features/issues/issue_detail_spec.rb b/spec/features/issues/issue_detail_spec.rb index 3bb70fdf376..ab319daec71 100644 --- a/spec/features/issues/issue_detail_spec.rb +++ b/spec/features/issues/issue_detail_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Issue Detail', :js do +RSpec.describe 'Issue Detail', :js do let(:user) { create(:user) } let(:project) { create(:project, :public) } let(:issue) { create(:issue, project: project, author: user) } diff --git a/spec/features/issues/issue_sidebar_spec.rb b/spec/features/issues/issue_sidebar_spec.rb index 1230fc76413..9e4362bf0e5 100644 --- a/spec/features/issues/issue_sidebar_spec.rb +++ b/spec/features/issues/issue_sidebar_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Issue Sidebar' do +RSpec.describe 'Issue Sidebar' do include MobileHelpers let(:group) { create(:group, :nested) } diff --git a/spec/features/issues/keyboard_shortcut_spec.rb b/spec/features/issues/keyboard_shortcut_spec.rb index c5d53cd1cd0..ab40f124257 100644 --- a/spec/features/issues/keyboard_shortcut_spec.rb +++ b/spec/features/issues/keyboard_shortcut_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Issues shortcut', :js do +RSpec.describe 'Issues shortcut', :js do context 'New Issue shortcut' do context 'issues are enabled' do let(:project) { create(:project) } diff --git a/spec/features/issues/markdown_toolbar_spec.rb b/spec/features/issues/markdown_toolbar_spec.rb index d174fdcb25e..aab9d1026f9 100644 --- a/spec/features/issues/markdown_toolbar_spec.rb +++ b/spec/features/issues/markdown_toolbar_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Issue markdown toolbar', :js do +RSpec.describe 'Issue markdown toolbar', :js do let(:project) { create(:project, :public) } let(:issue) { create(:issue, project: project) } let(:user) { create(:user) } diff --git a/spec/features/issues/move_spec.rb b/spec/features/issues/move_spec.rb index 831bcf8931e..f3a6655f397 100644 --- a/spec/features/issues/move_spec.rb +++ b/spec/features/issues/move_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'issue move to another project' do +RSpec.describe 'issue move to another project' do let(:user) { create(:user) } let(:old_project) { create(:project, :repository) } let(:text) { 'Some issue description' } diff --git a/spec/features/issues/note_polling_spec.rb b/spec/features/issues/note_polling_spec.rb index 04ad012d57e..bc4c67fdd79 100644 --- a/spec/features/issues/note_polling_spec.rb +++ b/spec/features/issues/note_polling_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Issue notes polling', :js do +RSpec.describe 'Issue notes polling', :js do include NoteInteractionHelpers let(:project) { create(:project, :public) } diff --git a/spec/features/issues/notes_on_issues_spec.rb b/spec/features/issues/notes_on_issues_spec.rb index 74eb699c7ef..be85d73d777 100644 --- a/spec/features/issues/notes_on_issues_spec.rb +++ b/spec/features/issues/notes_on_issues_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Create notes on issues', :js do +RSpec.describe 'Create notes on issues', :js do let(:user) { create(:user) } def submit_comment(text) diff --git a/spec/features/issues/resource_label_events_spec.rb b/spec/features/issues/resource_label_events_spec.rb index b367bbe2c99..f2c978c525e 100644 --- a/spec/features/issues/resource_label_events_spec.rb +++ b/spec/features/issues/resource_label_events_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'List issue resource label events', :js do +RSpec.describe 'List issue resource label events', :js do let(:user) { create(:user) } let(:project) { create(:project, :public) } let(:issue) { create(:issue, project: project, author: user) } diff --git a/spec/features/issues/rss_spec.rb b/spec/features/issues/rss_spec.rb index 7577df3bc7d..6c4498ea711 100644 --- a/spec/features/issues/rss_spec.rb +++ b/spec/features/issues/rss_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Project Issues RSS' do +RSpec.describe 'Project Issues RSS' do let!(:user) { create(:user) } let(:group) { create(:group) } let(:project) { create(:project, group: group, visibility_level: Gitlab::VisibilityLevel::PUBLIC) } diff --git a/spec/features/issues/spam_issues_spec.rb b/spec/features/issues/spam_issues_spec.rb index f54ce16af93..aec806c566d 100644 --- a/spec/features/issues/spam_issues_spec.rb +++ b/spec/features/issues/spam_issues_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'New issue', :js do +RSpec.describe 'New issue', :js do include StubENV let(:project) { create(:project, :public) } diff --git a/spec/features/issues/todo_spec.rb b/spec/features/issues/todo_spec.rb index 4bb96ad069c..3de33049db0 100644 --- a/spec/features/issues/todo_spec.rb +++ b/spec/features/issues/todo_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Manually create a todo item from issue', :js do +RSpec.describe 'Manually create a todo item from issue', :js do let!(:project) { create(:project) } let!(:issue) { create(:issue, project: project) } let!(:user) { create(:user)} diff --git a/spec/features/issues/update_issues_spec.rb b/spec/features/issues/update_issues_spec.rb index 98f70df1c8b..f8385f183d2 100644 --- a/spec/features/issues/update_issues_spec.rb +++ b/spec/features/issues/update_issues_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Multiple issue updating from issues#index', :js do +RSpec.describe 'Multiple issue updating from issues#index', :js do let!(:project) { create(:project) } let!(:issue) { create(:issue, project: project) } let!(:user) { create(:user)} diff --git a/spec/features/issues/user_comments_on_issue_spec.rb b/spec/features/issues/user_comments_on_issue_spec.rb index 363906b017a..005d45d9c92 100644 --- a/spec/features/issues/user_comments_on_issue_spec.rb +++ b/spec/features/issues/user_comments_on_issue_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -describe "User comments on issue", :js do +RSpec.describe "User comments on issue", :js do include Spec::Support::Helpers::Features::NotesHelpers let(:project) { create(:project_empty_repo, :public) } diff --git a/spec/features/issues/user_creates_branch_and_merge_request_spec.rb b/spec/features/issues/user_creates_branch_and_merge_request_spec.rb index 848dbbb85a6..a546fb3e85b 100644 --- a/spec/features/issues/user_creates_branch_and_merge_request_spec.rb +++ b/spec/features/issues/user_creates_branch_and_merge_request_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User creates branch and merge request on issue page', :js do +RSpec.describe 'User creates branch and merge request on issue page', :js do let(:membership_level) { :developer } let(:user) { create(:user) } let!(:project) { create(:project, :repository, :public) } diff --git a/spec/features/issues/user_creates_confidential_merge_request_spec.rb b/spec/features/issues/user_creates_confidential_merge_request_spec.rb index 84f358061e6..ea96165d7b7 100644 --- a/spec/features/issues/user_creates_confidential_merge_request_spec.rb +++ b/spec/features/issues/user_creates_confidential_merge_request_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User creates confidential merge request on issue page', :js do +RSpec.describe 'User creates confidential merge request on issue page', :js do include ProjectForksHelper let(:user) { create(:user) } diff --git a/spec/features/issues/user_creates_issue_by_email_spec.rb b/spec/features/issues/user_creates_issue_by_email_spec.rb index c73a65849cc..5a0036170ab 100644 --- a/spec/features/issues/user_creates_issue_by_email_spec.rb +++ b/spec/features/issues/user_creates_issue_by_email_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Issues > User creates issue by email' do +RSpec.describe 'Issues > User creates issue by email' do let_it_be(:user) { create(:user) } let_it_be(:project) { create(:project, :public) } diff --git a/spec/features/issues/user_creates_issue_spec.rb b/spec/features/issues/user_creates_issue_spec.rb index efcaa8247df..a2c868d0256 100644 --- a/spec/features/issues/user_creates_issue_spec.rb +++ b/spec/features/issues/user_creates_issue_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -describe "User creates issue" do +RSpec.describe "User creates issue" do include DropzoneHelper let_it_be(:project) { create(:project_empty_repo, :public) } diff --git a/spec/features/issues/user_edits_issue_spec.rb b/spec/features/issues/user_edits_issue_spec.rb index d50cf16d8ef..39bf535c715 100644 --- a/spec/features/issues/user_edits_issue_spec.rb +++ b/spec/features/issues/user_edits_issue_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -describe "Issues > User edits issue", :js do +RSpec.describe "Issues > User edits issue", :js do let_it_be(:project) { create(:project_empty_repo, :public) } let_it_be(:user) { create(:user) } let_it_be(:issue) { create(:issue, project: project, author: user, assignees: [user]) } diff --git a/spec/features/issues/user_filters_issues_spec.rb b/spec/features/issues/user_filters_issues_spec.rb index 9ce47e68926..20ad47b111a 100644 --- a/spec/features/issues/user_filters_issues_spec.rb +++ b/spec/features/issues/user_filters_issues_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User filters issues' do +RSpec.describe 'User filters issues' do let_it_be(:user) { create(:user) } let_it_be(:project) { create(:project_empty_repo, :public) } diff --git a/spec/features/issues/user_interacts_with_awards_spec.rb b/spec/features/issues/user_interacts_with_awards_spec.rb index 095ae9f276c..7b7e087a6d6 100644 --- a/spec/features/issues/user_interacts_with_awards_spec.rb +++ b/spec/features/issues/user_interacts_with_awards_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User interacts with awards' do +RSpec.describe 'User interacts with awards' do let(:user) { create(:user) } describe 'User interacts with awards in an issue', :js do diff --git a/spec/features/issues/user_resets_their_incoming_email_token_spec.rb b/spec/features/issues/user_resets_their_incoming_email_token_spec.rb index 108b6f550db..a20f65abebf 100644 --- a/spec/features/issues/user_resets_their_incoming_email_token_spec.rb +++ b/spec/features/issues/user_resets_their_incoming_email_token_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Issues > User resets their incoming email token' do +RSpec.describe 'Issues > User resets their incoming email token' do let_it_be(:user) { create(:user) } let_it_be(:project) { create(:project, :public, namespace: user.namespace) } let_it_be(:issue) { create(:issue, project: project) } diff --git a/spec/features/issues/user_sees_breadcrumb_links_spec.rb b/spec/features/issues/user_sees_breadcrumb_links_spec.rb index 8a120a0a0b2..2660101c330 100644 --- a/spec/features/issues/user_sees_breadcrumb_links_spec.rb +++ b/spec/features/issues/user_sees_breadcrumb_links_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'New issue breadcrumb' do +RSpec.describe 'New issue breadcrumb' do let_it_be(:project, reload: true) { create(:project) } let(:user) { project.creator } diff --git a/spec/features/issues/user_sees_empty_state_spec.rb b/spec/features/issues/user_sees_empty_state_spec.rb index 114d119aca8..047c5ca2189 100644 --- a/spec/features/issues/user_sees_empty_state_spec.rb +++ b/spec/features/issues/user_sees_empty_state_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Issues > User sees empty state' do +RSpec.describe 'Issues > User sees empty state' do let_it_be(:project) { create(:project, :public) } let_it_be(:user) { project.creator } diff --git a/spec/features/issues/user_sees_live_update_spec.rb b/spec/features/issues/user_sees_live_update_spec.rb index 98c7d289fb0..c9b751715bc 100644 --- a/spec/features/issues/user_sees_live_update_spec.rb +++ b/spec/features/issues/user_sees_live_update_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Issues > User sees live update', :js do +RSpec.describe 'Issues > User sees live update', :js do let_it_be(:project) { create(:project, :public) } let_it_be(:user) { project.creator } diff --git a/spec/features/issues/user_sees_sidebar_updates_in_realtime_spec.rb b/spec/features/issues/user_sees_sidebar_updates_in_realtime_spec.rb index c3f17227701..7a2b637e48e 100644 --- a/spec/features/issues/user_sees_sidebar_updates_in_realtime_spec.rb +++ b/spec/features/issues/user_sees_sidebar_updates_in_realtime_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Issues > Real-time sidebar', :js do +RSpec.describe 'Issues > Real-time sidebar', :js do let_it_be(:project) { create(:project, :public) } let_it_be(:issue) { create(:issue, project: project) } let_it_be(:user) { create(:user) } diff --git a/spec/features/issues/user_sorts_issue_comments_spec.rb b/spec/features/issues/user_sorts_issue_comments_spec.rb index e1c0acc32f1..555f8827374 100644 --- a/spec/features/issues/user_sorts_issue_comments_spec.rb +++ b/spec/features/issues/user_sorts_issue_comments_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Comment sort direction' do +RSpec.describe 'Comment sort direction' do let_it_be(:project) { create(:project, :public, :repository) } let_it_be(:issue) { create(:issue, project: project) } let_it_be(:comment_1) { create(:note_on_issue, noteable: issue, project: project, note: 'written first') } diff --git a/spec/features/issues/user_sorts_issues_spec.rb b/spec/features/issues/user_sorts_issues_spec.rb index 66110f55435..ec38bf99035 100644 --- a/spec/features/issues/user_sorts_issues_spec.rb +++ b/spec/features/issues/user_sorts_issues_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -describe "User sorts issues" do +RSpec.describe "User sorts issues" do include SortingHelper include IssueHelpers diff --git a/spec/features/issues/user_toggles_subscription_spec.rb b/spec/features/issues/user_toggles_subscription_spec.rb index ba167362511..971c8a3b431 100644 --- a/spec/features/issues/user_toggles_subscription_spec.rb +++ b/spec/features/issues/user_toggles_subscription_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -describe "User toggles subscription", :js do +RSpec.describe "User toggles subscription", :js do let(:project) { create(:project_empty_repo, :public) } let(:user) { create(:user) } let(:issue) { create(:issue, project: project, author: user) } diff --git a/spec/features/issues/user_uses_quick_actions_spec.rb b/spec/features/issues/user_uses_quick_actions_spec.rb index 09f07f8c908..c5eb3f415ff 100644 --- a/spec/features/issues/user_uses_quick_actions_spec.rb +++ b/spec/features/issues/user_uses_quick_actions_spec.rb @@ -7,7 +7,7 @@ require 'spec_helper' # for example, adding quick actions when creating the issue and checking DateTime formats on UI. # Because this kind of spec takes more time to run there is no need to add new ones # for each existing quick action unless they test something not tested by existing tests. -describe 'Issues > User uses quick actions', :js do +RSpec.describe 'Issues > User uses quick actions', :js do include Spec::Support::Helpers::Features::NotesHelpers context "issuable common quick actions" do diff --git a/spec/features/issues/user_views_issue_spec.rb b/spec/features/issues/user_views_issue_spec.rb index 5b8effd9406..2b610bab9f0 100644 --- a/spec/features/issues/user_views_issue_spec.rb +++ b/spec/features/issues/user_views_issue_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -describe "User views issue" do +RSpec.describe "User views issue" do let(:project) { create(:project_empty_repo, :public) } let(:user) { create(:user) } let(:issue) { create(:issue, project: project, description: "# Description header", author: user) } diff --git a/spec/features/issues/user_views_issues_spec.rb b/spec/features/issues/user_views_issues_spec.rb index 796e618c7c8..91de813e414 100644 --- a/spec/features/issues/user_views_issues_spec.rb +++ b/spec/features/issues/user_views_issues_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -describe "User views issues" do +RSpec.describe "User views issues" do let!(:closed_issue) { create(:closed_issue, project: project) } let!(:open_issue1) { create(:issue, project: project) } let!(:open_issue2) { create(:issue, project: project) } diff --git a/spec/features/labels_hierarchy_spec.rb b/spec/features/labels_hierarchy_spec.rb index c66d858a019..3ab7fbea198 100644 --- a/spec/features/labels_hierarchy_spec.rb +++ b/spec/features/labels_hierarchy_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Labels Hierarchy', :js do +RSpec.describe 'Labels Hierarchy', :js do include FilteredSearchHelpers let!(:user) { create(:user) } diff --git a/spec/features/markdown/copy_as_gfm_spec.rb b/spec/features/markdown/copy_as_gfm_spec.rb index bf72b63837c..80dcdd08f74 100644 --- a/spec/features/markdown/copy_as_gfm_spec.rb +++ b/spec/features/markdown/copy_as_gfm_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Copy as GFM', :js do +RSpec.describe 'Copy as GFM', :js do include MarkupHelper include RepoHelpers include ActionView::Helpers::JavaScriptHelper diff --git a/spec/features/markdown/gitlab_flavored_markdown_spec.rb b/spec/features/markdown/gitlab_flavored_markdown_spec.rb index f34af268630..da4208318eb 100644 --- a/spec/features/markdown/gitlab_flavored_markdown_spec.rb +++ b/spec/features/markdown/gitlab_flavored_markdown_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe "GitLab Flavored Markdown" do +RSpec.describe "GitLab Flavored Markdown" do let(:user) { create(:user) } let(:project) { create(:project) } let(:issue) { create(:issue, project: project) } diff --git a/spec/features/markdown/markdown_spec.rb b/spec/features/markdown/markdown_spec.rb index bb08b4c036d..d9d3f566bce 100644 --- a/spec/features/markdown/markdown_spec.rb +++ b/spec/features/markdown/markdown_spec.rb @@ -26,7 +26,7 @@ require 'erb' # # See the MarkdownFeature class for setup details. -describe 'GitLab Markdown', :aggregate_failures do +RSpec.describe 'GitLab Markdown', :aggregate_failures do include Capybara::Node::Matchers include MarkupHelper include MarkdownMatchers diff --git a/spec/features/markdown/math_spec.rb b/spec/features/markdown/math_spec.rb index 76eef66c517..e5fb9131ce0 100644 --- a/spec/features/markdown/math_spec.rb +++ b/spec/features/markdown/math_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Math rendering', :js do +RSpec.describe 'Math rendering', :js do let!(:project) { create(:project, :public) } it 'renders inline and display math correctly' do diff --git a/spec/features/markdown/mermaid_spec.rb b/spec/features/markdown/mermaid_spec.rb index 60ef6647bea..256dfdc26e9 100644 --- a/spec/features/markdown/mermaid_spec.rb +++ b/spec/features/markdown/mermaid_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Mermaid rendering', :js do +RSpec.describe 'Mermaid rendering', :js do it 'renders Mermaid diagrams correctly' do description = <<~MERMAID ```mermaid diff --git a/spec/features/markdown/metrics_spec.rb b/spec/features/markdown/metrics_spec.rb index 7b0eb8959a5..092408c2be0 100644 --- a/spec/features/markdown/metrics_spec.rb +++ b/spec/features/markdown/metrics_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Metrics rendering', :js, :use_clean_rails_memory_store_caching, :sidekiq_inline do +RSpec.describe 'Metrics rendering', :js, :use_clean_rails_memory_store_caching, :sidekiq_inline do include PrometheusHelpers include GrafanaApiHelpers include MetricsDashboardUrlHelpers diff --git a/spec/features/merge_request/batch_comments_spec.rb b/spec/features/merge_request/batch_comments_spec.rb index 46be39b29a9..60671213d75 100644 --- a/spec/features/merge_request/batch_comments_spec.rb +++ b/spec/features/merge_request/batch_comments_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Merge request > Batch comments', :js do +RSpec.describe 'Merge request > Batch comments', :js do include MergeRequestDiffHelpers include RepoHelpers diff --git a/spec/features/merge_request/maintainer_edits_fork_spec.rb b/spec/features/merge_request/maintainer_edits_fork_spec.rb index 17ff494a6fa..4db1633abe6 100644 --- a/spec/features/merge_request/maintainer_edits_fork_spec.rb +++ b/spec/features/merge_request/maintainer_edits_fork_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'a maintainer edits files on a source-branch of an MR from a fork', :js, :sidekiq_might_not_need_inline do +RSpec.describe 'a maintainer edits files on a source-branch of an MR from a fork', :js, :sidekiq_might_not_need_inline do include ProjectForksHelper let(:user) { create(:user, username: 'the-maintainer') } let(:target_project) { create(:project, :public, :repository) } diff --git a/spec/features/merge_request/user_accepts_merge_request_spec.rb b/spec/features/merge_request/user_accepts_merge_request_spec.rb index 5e1ff232b80..d7c9c8bddb1 100644 --- a/spec/features/merge_request/user_accepts_merge_request_spec.rb +++ b/spec/features/merge_request/user_accepts_merge_request_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User accepts a merge request', :js, :sidekiq_might_not_need_inline do +RSpec.describe 'User accepts a merge request', :js, :sidekiq_might_not_need_inline do let(:merge_request) { create(:merge_request, :with_diffs, :simple, source_project: project) } let(:project) { create(:project, :public, :repository) } let(:user) { create(:user) } diff --git a/spec/features/merge_request/user_allows_commits_from_memebers_who_can_merge_spec.rb b/spec/features/merge_request/user_allows_commits_from_memebers_who_can_merge_spec.rb index 0ecd32565d0..fd13083c185 100644 --- a/spec/features/merge_request/user_allows_commits_from_memebers_who_can_merge_spec.rb +++ b/spec/features/merge_request/user_allows_commits_from_memebers_who_can_merge_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'create a merge request, allowing commits from members who can merge to the target branch', :js do +RSpec.describe 'create a merge request, allowing commits from members who can merge to the target branch', :js do include ProjectForksHelper let(:user) { create(:user) } let(:target_project) { create(:project, :public, :repository) } diff --git a/spec/features/merge_request/user_assigns_themselves_spec.rb b/spec/features/merge_request/user_assigns_themselves_spec.rb index 549d6e50337..b6cd97dcc5a 100644 --- a/spec/features/merge_request/user_assigns_themselves_spec.rb +++ b/spec/features/merge_request/user_assigns_themselves_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Merge request > User assigns themselves' do +RSpec.describe 'Merge request > User assigns themselves' do let(:project) { create(:project, :public, :repository) } let(:user) { project.creator } let(:issue1) { create(:issue, project: project) } diff --git a/spec/features/merge_request/user_awards_emoji_spec.rb b/spec/features/merge_request/user_awards_emoji_spec.rb index 8aa90107251..62e4209f386 100644 --- a/spec/features/merge_request/user_awards_emoji_spec.rb +++ b/spec/features/merge_request/user_awards_emoji_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Merge request > User awards emoji', :js do +RSpec.describe 'Merge request > User awards emoji', :js do let(:project) { create(:project, :public, :repository) } let(:user) { project.creator } let(:merge_request) { create(:merge_request, source_project: project, author: create(:user)) } diff --git a/spec/features/merge_request/user_clicks_merge_request_tabs_spec.rb b/spec/features/merge_request/user_clicks_merge_request_tabs_spec.rb index 8295a1770bd..f3cbc1ea1f5 100644 --- a/spec/features/merge_request/user_clicks_merge_request_tabs_spec.rb +++ b/spec/features/merge_request/user_clicks_merge_request_tabs_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User clicks on merge request tabs', :js do +RSpec.describe 'User clicks on merge request tabs', :js do let(:project) { create(:project, :public, :repository) } let(:merge_request) { create(:merge_request, source_project: project, target_project: project) } diff --git a/spec/features/merge_request/user_closes_merge_request_spec.rb b/spec/features/merge_request/user_closes_merge_request_spec.rb index c5125c38ed7..669bd989f4f 100644 --- a/spec/features/merge_request/user_closes_merge_request_spec.rb +++ b/spec/features/merge_request/user_closes_merge_request_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User closes a merge requests', :js do +RSpec.describe 'User closes a merge requests', :js do let(:project) { create(:project, :repository) } let(:merge_request) { create(:merge_request, source_project: project, target_project: project) } let(:user) { create(:user) } diff --git a/spec/features/merge_request/user_comments_on_commit_spec.rb b/spec/features/merge_request/user_comments_on_commit_spec.rb index 6b869d93e4c..8fa1fe3812d 100644 --- a/spec/features/merge_request/user_comments_on_commit_spec.rb +++ b/spec/features/merge_request/user_comments_on_commit_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User comments on a commit', :js do +RSpec.describe 'User comments on a commit', :js do include MergeRequestDiffHelpers include RepoHelpers diff --git a/spec/features/merge_request/user_comments_on_diff_spec.rb b/spec/features/merge_request/user_comments_on_diff_spec.rb index bf7194be9c6..9cd3c7eaf76 100644 --- a/spec/features/merge_request/user_comments_on_diff_spec.rb +++ b/spec/features/merge_request/user_comments_on_diff_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User comments on a diff', :js do +RSpec.describe 'User comments on a diff', :js do include MergeRequestDiffHelpers include RepoHelpers diff --git a/spec/features/merge_request/user_comments_on_merge_request_spec.rb b/spec/features/merge_request/user_comments_on_merge_request_spec.rb index c7845b4cce4..73f2b1a25ce 100644 --- a/spec/features/merge_request/user_comments_on_merge_request_spec.rb +++ b/spec/features/merge_request/user_comments_on_merge_request_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User comments on a merge request', :js do +RSpec.describe 'User comments on a merge request', :js do include RepoHelpers let(:project) { create(:project, :repository) } diff --git a/spec/features/merge_request/user_creates_image_diff_notes_spec.rb b/spec/features/merge_request/user_creates_image_diff_notes_spec.rb index cea9056cd93..34eaca24a01 100644 --- a/spec/features/merge_request/user_creates_image_diff_notes_spec.rb +++ b/spec/features/merge_request/user_creates_image_diff_notes_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Merge request > User creates image diff notes', :js do +RSpec.describe 'Merge request > User creates image diff notes', :js do include NoteInteractionHelpers let(:project) { create(:project, :public, :repository) } diff --git a/spec/features/merge_request/user_creates_merge_request_spec.rb b/spec/features/merge_request/user_creates_merge_request_spec.rb index 86ee9fa5aa5..37d329d4d5d 100644 --- a/spec/features/merge_request/user_creates_merge_request_spec.rb +++ b/spec/features/merge_request/user_creates_merge_request_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -describe "User creates a merge request", :js do +RSpec.describe "User creates a merge request", :js do include ProjectForksHelper let_it_be(:project) { create(:project, :repository) } diff --git a/spec/features/merge_request/user_creates_mr_spec.rb b/spec/features/merge_request/user_creates_mr_spec.rb index 665bc352c0f..9d97e57fe3a 100644 --- a/spec/features/merge_request/user_creates_mr_spec.rb +++ b/spec/features/merge_request/user_creates_mr_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Merge request > User creates MR' do +RSpec.describe 'Merge request > User creates MR' do include ProjectForksHelper before do diff --git a/spec/features/merge_request/user_customizes_merge_commit_message_spec.rb b/spec/features/merge_request/user_customizes_merge_commit_message_spec.rb index 895cbb8f02b..23df7635aa1 100644 --- a/spec/features/merge_request/user_customizes_merge_commit_message_spec.rb +++ b/spec/features/merge_request/user_customizes_merge_commit_message_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Merge request < User customizes merge commit message', :js do +RSpec.describe 'Merge request < User customizes merge commit message', :js do let(:project) { create(:project, :public, :repository) } let(:user) { project.creator } let(:issue_1) { create(:issue, project: project)} diff --git a/spec/features/merge_request/user_edits_assignees_sidebar_spec.rb b/spec/features/merge_request/user_edits_assignees_sidebar_spec.rb index 2caa5de7e3d..affd6f6b7b5 100644 --- a/spec/features/merge_request/user_edits_assignees_sidebar_spec.rb +++ b/spec/features/merge_request/user_edits_assignees_sidebar_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Merge request > User edits assignees sidebar', :js do +RSpec.describe 'Merge request > User edits assignees sidebar', :js do let(:project) { create(:project, :public, :repository) } let(:protected_branch) { create(:protected_branch, :maintainers_can_push, name: 'master', project: project) } let(:merge_request) { create(:merge_request, :simple, source_project: project, target_branch: protected_branch.name) } diff --git a/spec/features/merge_request/user_edits_merge_request_spec.rb b/spec/features/merge_request/user_edits_merge_request_spec.rb index 821db8a1d5b..84ecd6537dc 100644 --- a/spec/features/merge_request/user_edits_merge_request_spec.rb +++ b/spec/features/merge_request/user_edits_merge_request_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User edits a merge request', :js do +RSpec.describe 'User edits a merge request', :js do include Select2Helper let(:project) { create(:project, :repository) } diff --git a/spec/features/merge_request/user_edits_mr_spec.rb b/spec/features/merge_request/user_edits_mr_spec.rb index e6b847c5e7f..2c949ed84f4 100644 --- a/spec/features/merge_request/user_edits_mr_spec.rb +++ b/spec/features/merge_request/user_edits_mr_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Merge request > User edits MR' do +RSpec.describe 'Merge request > User edits MR' do include ProjectForksHelper before do diff --git a/spec/features/merge_request/user_expands_diff_spec.rb b/spec/features/merge_request/user_expands_diff_spec.rb index 9bce5264817..d3867a91846 100644 --- a/spec/features/merge_request/user_expands_diff_spec.rb +++ b/spec/features/merge_request/user_expands_diff_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User expands diff', :js do +RSpec.describe 'User expands diff', :js do let(:project) { create(:project, :public, :repository) } let(:merge_request) { create(:merge_request, source_branch: 'expand-collapse-files', source_project: project, target_project: project) } diff --git a/spec/features/merge_request/user_interacts_with_batched_mr_diffs_spec.rb b/spec/features/merge_request/user_interacts_with_batched_mr_diffs_spec.rb index d782901d058..1a7baff2fb1 100644 --- a/spec/features/merge_request/user_interacts_with_batched_mr_diffs_spec.rb +++ b/spec/features/merge_request/user_interacts_with_batched_mr_diffs_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Batch diffs', :js do +RSpec.describe 'Batch diffs', :js do include MergeRequestDiffHelpers include RepoHelpers diff --git a/spec/features/merge_request/user_locks_discussion_spec.rb b/spec/features/merge_request/user_locks_discussion_spec.rb index 0eaaf32dc31..c8a6fdd4007 100644 --- a/spec/features/merge_request/user_locks_discussion_spec.rb +++ b/spec/features/merge_request/user_locks_discussion_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Merge request > User locks discussion', :js do +RSpec.describe 'Merge request > User locks discussion', :js do let(:user) { create(:user) } let(:project) { create(:project, :public, :repository) } let(:merge_request) { create(:merge_request, source_project: project) } diff --git a/spec/features/merge_request/user_manages_subscription_spec.rb b/spec/features/merge_request/user_manages_subscription_spec.rb index 54d27a06bb1..9ed5b67fa0e 100644 --- a/spec/features/merge_request/user_manages_subscription_spec.rb +++ b/spec/features/merge_request/user_manages_subscription_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User manages subscription', :js do +RSpec.describe 'User manages subscription', :js do let(:project) { create(:project, :public, :repository) } let(:merge_request) { create(:merge_request, source_project: project, target_project: project) } let(:user) { create(:user) } diff --git a/spec/features/merge_request/user_merges_immediately_spec.rb b/spec/features/merge_request/user_merges_immediately_spec.rb index 1188d3b2ceb..47dc09ae79f 100644 --- a/spec/features/merge_request/user_merges_immediately_spec.rb +++ b/spec/features/merge_request/user_merges_immediately_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Merge requests > User merges immediately', :js do +RSpec.describe 'Merge requests > User merges immediately', :js do let(:project) { create(:project, :public, :repository) } let(:user) { project.creator } let!(:merge_request) do diff --git a/spec/features/merge_request/user_merges_merge_request_spec.rb b/spec/features/merge_request/user_merges_merge_request_spec.rb index 32e40740a61..7758fa8e666 100644 --- a/spec/features/merge_request/user_merges_merge_request_spec.rb +++ b/spec/features/merge_request/user_merges_merge_request_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -describe "User merges a merge request", :js do +RSpec.describe "User merges a merge request", :js do let(:user) { project.owner } before do diff --git a/spec/features/merge_request/user_merges_only_if_pipeline_succeeds_spec.rb b/spec/features/merge_request/user_merges_only_if_pipeline_succeeds_spec.rb index 419f741d0ea..ea3e90a4508 100644 --- a/spec/features/merge_request/user_merges_only_if_pipeline_succeeds_spec.rb +++ b/spec/features/merge_request/user_merges_only_if_pipeline_succeeds_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Merge request > User merges only if pipeline succeeds', :js do +RSpec.describe 'Merge request > User merges only if pipeline succeeds', :js do let(:merge_request) { create(:merge_request_with_diffs) } let(:project) { merge_request.target_project } diff --git a/spec/features/merge_request/user_merges_when_pipeline_succeeds_spec.rb b/spec/features/merge_request/user_merges_when_pipeline_succeeds_spec.rb index 5cc61333bb4..d5ff31de073 100644 --- a/spec/features/merge_request/user_merges_when_pipeline_succeeds_spec.rb +++ b/spec/features/merge_request/user_merges_when_pipeline_succeeds_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Merge request > User merges when pipeline succeeds', :js do +RSpec.describe 'Merge request > User merges when pipeline succeeds', :js do let(:project) { create(:project, :public, :repository) } let(:user) { project.creator } let(:merge_request) do diff --git a/spec/features/merge_request/user_posts_diff_notes_spec.rb b/spec/features/merge_request/user_posts_diff_notes_spec.rb index 08cd3f714dc..dbad2f191a1 100644 --- a/spec/features/merge_request/user_posts_diff_notes_spec.rb +++ b/spec/features/merge_request/user_posts_diff_notes_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Merge request > User posts diff notes', :js do +RSpec.describe 'Merge request > User posts diff notes', :js do include MergeRequestDiffHelpers let(:merge_request) { create(:merge_request) } diff --git a/spec/features/merge_request/user_posts_notes_spec.rb b/spec/features/merge_request/user_posts_notes_spec.rb index 5688ef3f8cf..3c70819319d 100644 --- a/spec/features/merge_request/user_posts_notes_spec.rb +++ b/spec/features/merge_request/user_posts_notes_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Merge request > User posts notes', :js do +RSpec.describe 'Merge request > User posts notes', :js do include NoteInteractionHelpers let_it_be(:project) { create(:project, :repository) } diff --git a/spec/features/merge_request/user_rebases_merge_request_spec.rb b/spec/features/merge_request/user_rebases_merge_request_spec.rb index 34f009000dc..a3f72a6266b 100644 --- a/spec/features/merge_request/user_rebases_merge_request_spec.rb +++ b/spec/features/merge_request/user_rebases_merge_request_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -describe "User rebases a merge request", :js do +RSpec.describe "User rebases a merge request", :js do let(:merge_request) { create(:merge_request, :simple, source_project: project) } let(:user) { project.owner } diff --git a/spec/features/merge_request/user_reopens_merge_request_spec.rb b/spec/features/merge_request/user_reopens_merge_request_spec.rb index 6dee5770d0c..020929dc416 100644 --- a/spec/features/merge_request/user_reopens_merge_request_spec.rb +++ b/spec/features/merge_request/user_reopens_merge_request_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User reopens a merge requests', :js do +RSpec.describe 'User reopens a merge requests', :js do let(:project) { create(:project, :public, :repository) } let!(:merge_request) { create(:closed_merge_request, source_project: project, target_project: project) } let(:user) { create(:user) } diff --git a/spec/features/merge_request/user_resolves_conflicts_spec.rb b/spec/features/merge_request/user_resolves_conflicts_spec.rb index 41a7456aed5..f96408fb10b 100644 --- a/spec/features/merge_request/user_resolves_conflicts_spec.rb +++ b/spec/features/merge_request/user_resolves_conflicts_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Merge request > User resolves conflicts', :js do +RSpec.describe 'Merge request > User resolves conflicts', :js do let(:project) { create(:project, :repository) } let(:user) { project.creator } diff --git a/spec/features/merge_request/user_resolves_diff_notes_and_discussions_resolve_spec.rb b/spec/features/merge_request/user_resolves_diff_notes_and_discussions_resolve_spec.rb index ed837a3ec46..aa3840b4376 100644 --- a/spec/features/merge_request/user_resolves_diff_notes_and_discussions_resolve_spec.rb +++ b/spec/features/merge_request/user_resolves_diff_notes_and_discussions_resolve_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Merge request > User resolves diff notes and threads', :js do +RSpec.describe 'Merge request > User resolves diff notes and threads', :js do let(:project) { create(:project, :public, :repository) } let(:user) { project.creator } let(:guest) { create(:user) } diff --git a/spec/features/merge_request/user_resolves_outdated_diff_discussions_spec.rb b/spec/features/merge_request/user_resolves_outdated_diff_discussions_spec.rb index 9f7c97e510c..f8f3467f6fb 100644 --- a/spec/features/merge_request/user_resolves_outdated_diff_discussions_spec.rb +++ b/spec/features/merge_request/user_resolves_outdated_diff_discussions_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Merge request > User resolves outdated diff discussions', :js do +RSpec.describe 'Merge request > User resolves outdated diff discussions', :js do let(:project) { create(:project, :repository, :public) } let(:merge_request) do diff --git a/spec/features/merge_request/user_resolves_wip_mr_spec.rb b/spec/features/merge_request/user_resolves_wip_mr_spec.rb index 93ef0801791..34a3490a152 100644 --- a/spec/features/merge_request/user_resolves_wip_mr_spec.rb +++ b/spec/features/merge_request/user_resolves_wip_mr_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Merge request > User resolves Work in Progress', :js do +RSpec.describe 'Merge request > User resolves Work in Progress', :js do let(:project) { create(:project, :public, :repository) } let(:user) { project.creator } let(:merge_request) do diff --git a/spec/features/merge_request/user_reverts_merge_request_spec.rb b/spec/features/merge_request/user_reverts_merge_request_spec.rb index 906ff1d61b2..5e9611de460 100644 --- a/spec/features/merge_request/user_reverts_merge_request_spec.rb +++ b/spec/features/merge_request/user_reverts_merge_request_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User reverts a merge request', :js do +RSpec.describe 'User reverts a merge request', :js do let(:merge_request) { create(:merge_request, :with_diffs, :simple, source_project: project) } let(:project) { create(:project, :public, :repository) } let(:user) { create(:user) } diff --git a/spec/features/merge_request/user_reviews_image_spec.rb b/spec/features/merge_request/user_reviews_image_spec.rb index 5d938d3c415..533f3c9c91a 100644 --- a/spec/features/merge_request/user_reviews_image_spec.rb +++ b/spec/features/merge_request/user_reviews_image_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Merge request > image review', :js do +RSpec.describe 'Merge request > image review', :js do include MergeRequestDiffHelpers include RepoHelpers diff --git a/spec/features/merge_request/user_scrolls_to_note_on_load_spec.rb b/spec/features/merge_request/user_scrolls_to_note_on_load_spec.rb index 48c3ed7178d..d9950f5504b 100644 --- a/spec/features/merge_request/user_scrolls_to_note_on_load_spec.rb +++ b/spec/features/merge_request/user_scrolls_to_note_on_load_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Merge request > User scrolls to note on load', :js do +RSpec.describe 'Merge request > User scrolls to note on load', :js do let(:project) { create(:project, :public, :repository) } let(:user) { project.creator } let(:merge_request) { create(:merge_request, source_project: project, author: user) } diff --git a/spec/features/merge_request/user_sees_avatar_on_diff_notes_spec.rb b/spec/features/merge_request/user_sees_avatar_on_diff_notes_spec.rb index f1938efa295..415e6b29d5a 100644 --- a/spec/features/merge_request/user_sees_avatar_on_diff_notes_spec.rb +++ b/spec/features/merge_request/user_sees_avatar_on_diff_notes_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Merge request > User sees avatars on diff notes', :js do +RSpec.describe 'Merge request > User sees avatars on diff notes', :js do include NoteInteractionHelpers let(:project) { create(:project, :public, :repository) } diff --git a/spec/features/merge_request/user_sees_breadcrumb_links_spec.rb b/spec/features/merge_request/user_sees_breadcrumb_links_spec.rb index 592ad3aae9b..95e435a333e 100644 --- a/spec/features/merge_request/user_sees_breadcrumb_links_spec.rb +++ b/spec/features/merge_request/user_sees_breadcrumb_links_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'New merge request breadcrumb' do +RSpec.describe 'New merge request breadcrumb' do let(:project) { create(:project, :repository) } let(:user) { project.creator } diff --git a/spec/features/merge_request/user_sees_check_out_branch_modal_spec.rb b/spec/features/merge_request/user_sees_check_out_branch_modal_spec.rb index f54161fbaec..e47f9ff2660 100644 --- a/spec/features/merge_request/user_sees_check_out_branch_modal_spec.rb +++ b/spec/features/merge_request/user_sees_check_out_branch_modal_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Merge request > User sees check out branch modal', :js do +RSpec.describe 'Merge request > User sees check out branch modal', :js do let(:project) { create(:project, :public, :repository) } let(:user) { project.creator } let(:merge_request) { create(:merge_request, source_project: project) } diff --git a/spec/features/merge_request/user_sees_cherry_pick_modal_spec.rb b/spec/features/merge_request/user_sees_cherry_pick_modal_spec.rb index d7675cd06a8..ec2fb856be5 100644 --- a/spec/features/merge_request/user_sees_cherry_pick_modal_spec.rb +++ b/spec/features/merge_request/user_sees_cherry_pick_modal_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Merge request > User cherry-picks', :js do +RSpec.describe 'Merge request > User cherry-picks', :js do let(:group) { create(:group) } let(:project) { create(:project, :repository, namespace: group) } let(:user) { project.creator } diff --git a/spec/features/merge_request/user_sees_closing_issues_message_spec.rb b/spec/features/merge_request/user_sees_closing_issues_message_spec.rb index f77ea82649c..baef547a480 100644 --- a/spec/features/merge_request/user_sees_closing_issues_message_spec.rb +++ b/spec/features/merge_request/user_sees_closing_issues_message_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Merge request > User sees closing issues message', :js do +RSpec.describe 'Merge request > User sees closing issues message', :js do let(:project) { create(:project, :public, :repository) } let(:user) { project.creator } let(:issue_1) { create(:issue, project: project)} diff --git a/spec/features/merge_request/user_sees_deleted_target_branch_spec.rb b/spec/features/merge_request/user_sees_deleted_target_branch_spec.rb index 9ef6847f7f5..7c93952ee99 100644 --- a/spec/features/merge_request/user_sees_deleted_target_branch_spec.rb +++ b/spec/features/merge_request/user_sees_deleted_target_branch_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Merge request > User sees deleted target branch', :js do +RSpec.describe 'Merge request > User sees deleted target branch', :js do let(:merge_request) { create(:merge_request) } let(:project) { merge_request.project } let(:user) { project.creator } diff --git a/spec/features/merge_request/user_sees_deployment_widget_spec.rb b/spec/features/merge_request/user_sees_deployment_widget_spec.rb index 9670bd798bf..1e547d504ef 100644 --- a/spec/features/merge_request/user_sees_deployment_widget_spec.rb +++ b/spec/features/merge_request/user_sees_deployment_widget_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Merge request > User sees deployment widget', :js do +RSpec.describe 'Merge request > User sees deployment widget', :js do describe 'when merge request has associated environments' do let(:user) { create(:user) } let(:project) { create(:project, :repository) } diff --git a/spec/features/merge_request/user_sees_diff_spec.rb b/spec/features/merge_request/user_sees_diff_spec.rb index 868451883d8..2229b242d5b 100644 --- a/spec/features/merge_request/user_sees_diff_spec.rb +++ b/spec/features/merge_request/user_sees_diff_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Merge request > User sees diff', :js do +RSpec.describe 'Merge request > User sees diff', :js do include ProjectForksHelper include RepoHelpers diff --git a/spec/features/merge_request/user_sees_discussions_spec.rb b/spec/features/merge_request/user_sees_discussions_spec.rb index b4afd8c6332..ca8c4f84677 100644 --- a/spec/features/merge_request/user_sees_discussions_spec.rb +++ b/spec/features/merge_request/user_sees_discussions_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Merge request > User sees threads', :js do +RSpec.describe 'Merge request > User sees threads', :js do let(:project) { create(:project, :public, :repository) } let(:user) { project.creator } let(:merge_request) { create(:merge_request, source_project: project) } diff --git a/spec/features/merge_request/user_sees_empty_state_spec.rb b/spec/features/merge_request/user_sees_empty_state_spec.rb index 88eba976d62..ac07b31731d 100644 --- a/spec/features/merge_request/user_sees_empty_state_spec.rb +++ b/spec/features/merge_request/user_sees_empty_state_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Merge request > User sees empty state' do +RSpec.describe 'Merge request > User sees empty state' do let(:project) { create(:project, :public, :repository) } let(:user) { project.creator } diff --git a/spec/features/merge_request/user_sees_merge_button_depending_on_unresolved_discussions_spec.rb b/spec/features/merge_request/user_sees_merge_button_depending_on_unresolved_discussions_spec.rb index 4cc129e5d5f..cae04dd1693 100644 --- a/spec/features/merge_request/user_sees_merge_button_depending_on_unresolved_discussions_spec.rb +++ b/spec/features/merge_request/user_sees_merge_button_depending_on_unresolved_discussions_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Merge request > User sees merge button depending on unresolved threads', :js do +RSpec.describe 'Merge request > User sees merge button depending on unresolved threads', :js do let(:project) { create(:project, :repository) } let(:user) { project.creator } let!(:merge_request) { create(:merge_request_with_diff_notes, source_project: project, author: user) } diff --git a/spec/features/merge_request/user_sees_merge_request_pipelines_spec.rb b/spec/features/merge_request/user_sees_merge_request_pipelines_spec.rb index 5b14450a289..e2aa10d80dd 100644 --- a/spec/features/merge_request/user_sees_merge_request_pipelines_spec.rb +++ b/spec/features/merge_request/user_sees_merge_request_pipelines_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Merge request > User sees pipelines triggered by merge request', :js do +RSpec.describe 'Merge request > User sees pipelines triggered by merge request', :js do include ProjectForksHelper include TestReportsHelper diff --git a/spec/features/merge_request/user_sees_merge_widget_spec.rb b/spec/features/merge_request/user_sees_merge_widget_spec.rb index eca011bc786..bd140a0643d 100644 --- a/spec/features/merge_request/user_sees_merge_widget_spec.rb +++ b/spec/features/merge_request/user_sees_merge_widget_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Merge request > User sees merge widget', :js do +RSpec.describe 'Merge request > User sees merge widget', :js do include ProjectForksHelper include TestReportsHelper include ReactiveCachingHelpers diff --git a/spec/features/merge_request/user_sees_mini_pipeline_graph_spec.rb b/spec/features/merge_request/user_sees_mini_pipeline_graph_spec.rb index 29b8dc19860..04d8c52df61 100644 --- a/spec/features/merge_request/user_sees_mini_pipeline_graph_spec.rb +++ b/spec/features/merge_request/user_sees_mini_pipeline_graph_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Merge request < User sees mini pipeline graph', :js do +RSpec.describe 'Merge request < User sees mini pipeline graph', :js do let(:project) { create(:project, :public, :repository) } let(:user) { project.creator } let(:merge_request) { create(:merge_request, source_project: project, head_pipeline: pipeline) } diff --git a/spec/features/merge_request/user_sees_mr_from_deleted_forked_project_spec.rb b/spec/features/merge_request/user_sees_mr_from_deleted_forked_project_spec.rb index b4fb844b943..cbd68025b50 100644 --- a/spec/features/merge_request/user_sees_mr_from_deleted_forked_project_spec.rb +++ b/spec/features/merge_request/user_sees_mr_from_deleted_forked_project_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Merge request > User sees MR from deleted forked project', :js do +RSpec.describe 'Merge request > User sees MR from deleted forked project', :js do include ProjectForksHelper let(:project) { create(:project, :public, :repository) } diff --git a/spec/features/merge_request/user_sees_mr_with_deleted_source_branch_spec.rb b/spec/features/merge_request/user_sees_mr_with_deleted_source_branch_spec.rb index 59e5f5c847d..e997fb3e853 100644 --- a/spec/features/merge_request/user_sees_mr_with_deleted_source_branch_spec.rb +++ b/spec/features/merge_request/user_sees_mr_with_deleted_source_branch_spec.rb @@ -5,7 +5,7 @@ require 'spec_helper' # This test serves as a regression test for a bug that caused an error # message to be shown by JavaScript when the source branch was deleted. # Please do not remove ":js". -describe 'Merge request > User sees MR with deleted source branch', :js do +RSpec.describe 'Merge request > User sees MR with deleted source branch', :js do let(:project) { create(:project, :public, :repository) } let(:merge_request) { create(:merge_request, source_project: project) } let(:user) { project.creator } diff --git a/spec/features/merge_request/user_sees_notes_from_forked_project_spec.rb b/spec/features/merge_request/user_sees_notes_from_forked_project_spec.rb index 029f55c2cd6..20c45a1d652 100644 --- a/spec/features/merge_request/user_sees_notes_from_forked_project_spec.rb +++ b/spec/features/merge_request/user_sees_notes_from_forked_project_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Merge request > User sees notes from forked project', :js do +RSpec.describe 'Merge request > User sees notes from forked project', :js do include ProjectForksHelper let(:project) { create(:project, :public, :repository) } diff --git a/spec/features/merge_request/user_sees_pipelines_from_forked_project_spec.rb b/spec/features/merge_request/user_sees_pipelines_from_forked_project_spec.rb index d258b98f4a9..56092da5136 100644 --- a/spec/features/merge_request/user_sees_pipelines_from_forked_project_spec.rb +++ b/spec/features/merge_request/user_sees_pipelines_from_forked_project_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Merge request > User sees pipelines from forked project', :js do +RSpec.describe 'Merge request > User sees pipelines from forked project', :js do include ProjectForksHelper let(:target_project) { create(:project, :public, :repository) } diff --git a/spec/features/merge_request/user_sees_pipelines_spec.rb b/spec/features/merge_request/user_sees_pipelines_spec.rb index f3d8f2b42f8..2d125087cb6 100644 --- a/spec/features/merge_request/user_sees_pipelines_spec.rb +++ b/spec/features/merge_request/user_sees_pipelines_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Merge request > User sees pipelines', :js do +RSpec.describe 'Merge request > User sees pipelines', :js do describe 'pipeline tab' do let(:merge_request) { create(:merge_request) } let(:project) { merge_request.target_project } diff --git a/spec/features/merge_request/user_sees_system_notes_spec.rb b/spec/features/merge_request/user_sees_system_notes_spec.rb index 0482458d5ac..9f8d4c6d63f 100644 --- a/spec/features/merge_request/user_sees_system_notes_spec.rb +++ b/spec/features/merge_request/user_sees_system_notes_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Merge request > User sees system notes', :js do +RSpec.describe 'Merge request > User sees system notes', :js do let(:public_project) { create(:project, :public, :repository) } let(:private_project) { create(:project, :private, :repository) } let(:user) { private_project.creator } diff --git a/spec/features/merge_request/user_sees_versions_spec.rb b/spec/features/merge_request/user_sees_versions_spec.rb index d4b11b5b866..75319c8a22d 100644 --- a/spec/features/merge_request/user_sees_versions_spec.rb +++ b/spec/features/merge_request/user_sees_versions_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Merge request > User sees versions', :js do +RSpec.describe 'Merge request > User sees versions', :js do let(:merge_request) do create(:merge_request).tap do |mr| mr.merge_request_diff.destroy diff --git a/spec/features/merge_request/user_sees_wip_help_message_spec.rb b/spec/features/merge_request/user_sees_wip_help_message_spec.rb index 1179303171c..42fe18cfc93 100644 --- a/spec/features/merge_request/user_sees_wip_help_message_spec.rb +++ b/spec/features/merge_request/user_sees_wip_help_message_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Merge request > User sees WIP help message' do +RSpec.describe 'Merge request > User sees WIP help message' do let(:project) { create(:project, :public, :repository) } let(:user) { project.creator } diff --git a/spec/features/merge_request/user_selects_branches_for_new_mr_spec.rb b/spec/features/merge_request/user_selects_branches_for_new_mr_spec.rb index 22b2ea81b32..bf445de44ba 100644 --- a/spec/features/merge_request/user_selects_branches_for_new_mr_spec.rb +++ b/spec/features/merge_request/user_selects_branches_for_new_mr_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Merge request > User selects branches for new MR', :js do +RSpec.describe 'Merge request > User selects branches for new MR', :js do let(:project) { create(:project, :public, :repository) } let(:user) { project.creator } diff --git a/spec/features/merge_request/user_suggests_changes_on_diff_spec.rb b/spec/features/merge_request/user_suggests_changes_on_diff_spec.rb index 6b0ed0c7008..b81c0e49538 100644 --- a/spec/features/merge_request/user_suggests_changes_on_diff_spec.rb +++ b/spec/features/merge_request/user_suggests_changes_on_diff_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User comments on a diff', :js do +RSpec.describe 'User comments on a diff', :js do include MergeRequestDiffHelpers include RepoHelpers diff --git a/spec/features/merge_request/user_toggles_whitespace_changes_spec.rb b/spec/features/merge_request/user_toggles_whitespace_changes_spec.rb index 4db067a4e41..fab500f47bf 100644 --- a/spec/features/merge_request/user_toggles_whitespace_changes_spec.rb +++ b/spec/features/merge_request/user_toggles_whitespace_changes_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Merge request > User toggles whitespace changes', :js do +RSpec.describe 'Merge request > User toggles whitespace changes', :js do let(:merge_request) { create(:merge_request) } let(:project) { merge_request.project } let(:user) { project.creator } diff --git a/spec/features/merge_request/user_tries_to_access_private_project_info_through_new_mr_spec.rb b/spec/features/merge_request/user_tries_to_access_private_project_info_through_new_mr_spec.rb index 1ebe9e2e409..b864cb55785 100644 --- a/spec/features/merge_request/user_tries_to_access_private_project_info_through_new_mr_spec.rb +++ b/spec/features/merge_request/user_tries_to_access_private_project_info_through_new_mr_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Merge Request > User tries to access private project information through the new mr page' do +RSpec.describe 'Merge Request > User tries to access private project information through the new mr page' do let(:current_user) { create(:user) } let(:private_project) do create(:project, :public, :repository, diff --git a/spec/features/merge_request/user_uses_quick_actions_spec.rb b/spec/features/merge_request/user_uses_quick_actions_spec.rb index 318f8812263..04a2e046f42 100644 --- a/spec/features/merge_request/user_uses_quick_actions_spec.rb +++ b/spec/features/merge_request/user_uses_quick_actions_spec.rb @@ -7,7 +7,7 @@ require 'spec_helper' # for example, adding quick actions when creating the issue and checking DateTime formats on UI. # Because this kind of spec takes more time to run there is no need to add new ones # for each existing quick action unless they test something not tested by existing tests. -describe 'Merge request > User uses quick actions', :js do +RSpec.describe 'Merge request > User uses quick actions', :js do include Spec::Support::Helpers::Features::NotesHelpers let(:project) { create(:project, :public, :repository) } diff --git a/spec/features/merge_request/user_views_diffs_spec.rb b/spec/features/merge_request/user_views_diffs_spec.rb index cd0cf1cc78a..14d10fc1c9f 100644 --- a/spec/features/merge_request/user_views_diffs_spec.rb +++ b/spec/features/merge_request/user_views_diffs_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User views diffs', :js do +RSpec.describe 'User views diffs', :js do let(:merge_request) do create(:merge_request_with_diffs, source_project: project, target_project: project, source_branch: 'merge-test') end diff --git a/spec/features/merge_request/user_views_merge_request_from_deleted_fork_spec.rb b/spec/features/merge_request/user_views_merge_request_from_deleted_fork_spec.rb index a38bc4f702b..370341a43f9 100644 --- a/spec/features/merge_request/user_views_merge_request_from_deleted_fork_spec.rb +++ b/spec/features/merge_request/user_views_merge_request_from_deleted_fork_spec.rb @@ -6,7 +6,7 @@ require 'spec_helper' # updated. # This can occur when the fork a merge request is created from is in the process # of being destroyed. -describe 'User views merged merge request from deleted fork' do +RSpec.describe 'User views merged merge request from deleted fork' do include ProjectForksHelper let(:project) { create(:project, :repository) } diff --git a/spec/features/merge_request/user_views_open_merge_request_spec.rb b/spec/features/merge_request/user_views_open_merge_request_spec.rb index a788fc71286..448844ae57d 100644 --- a/spec/features/merge_request/user_views_open_merge_request_spec.rb +++ b/spec/features/merge_request/user_views_open_merge_request_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User views an open merge request' do +RSpec.describe 'User views an open merge request' do let(:merge_request) do create(:merge_request, source_project: project, target_project: project, description: '# Description header') end diff --git a/spec/features/merge_request/user_views_user_status_on_merge_request_spec.rb b/spec/features/merge_request/user_views_user_status_on_merge_request_spec.rb index 78d9c6c6db1..a6de443e96f 100644 --- a/spec/features/merge_request/user_views_user_status_on_merge_request_spec.rb +++ b/spec/features/merge_request/user_views_user_status_on_merge_request_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Project > Merge request > View user status' do +RSpec.describe 'Project > Merge request > View user status' do let(:project) { create(:project, :public, :repository) } let(:merge_request) do create(:merge_request, source_project: project, target_project: project, author: create(:user)) diff --git a/spec/features/merge_requests/filters_generic_behavior_spec.rb b/spec/features/merge_requests/filters_generic_behavior_spec.rb index 2bea819cc33..80009cca2fb 100644 --- a/spec/features/merge_requests/filters_generic_behavior_spec.rb +++ b/spec/features/merge_requests/filters_generic_behavior_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Merge Requests > Filters generic behavior', :js do +RSpec.describe 'Merge Requests > Filters generic behavior', :js do include FilteredSearchHelpers let(:project) { create(:project, :public, :repository) } diff --git a/spec/features/merge_requests/user_filters_by_assignees_spec.rb b/spec/features/merge_requests/user_filters_by_assignees_spec.rb index 12d682bbb15..9827b067649 100644 --- a/spec/features/merge_requests/user_filters_by_assignees_spec.rb +++ b/spec/features/merge_requests/user_filters_by_assignees_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Merge Requests > User filters by assignees', :js do +RSpec.describe 'Merge Requests > User filters by assignees', :js do include FilteredSearchHelpers let(:project) { create(:project, :public, :repository) } diff --git a/spec/features/merge_requests/user_filters_by_labels_spec.rb b/spec/features/merge_requests/user_filters_by_labels_spec.rb index 6308579d2d9..980046ccd71 100644 --- a/spec/features/merge_requests/user_filters_by_labels_spec.rb +++ b/spec/features/merge_requests/user_filters_by_labels_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Merge Requests > User filters by labels', :js do +RSpec.describe 'Merge Requests > User filters by labels', :js do include FilteredSearchHelpers let(:project) { create(:project, :public, :repository) } diff --git a/spec/features/merge_requests/user_filters_by_milestones_spec.rb b/spec/features/merge_requests/user_filters_by_milestones_spec.rb index d2a420be996..41a0b0012d1 100644 --- a/spec/features/merge_requests/user_filters_by_milestones_spec.rb +++ b/spec/features/merge_requests/user_filters_by_milestones_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Merge Requests > User filters by milestones', :js do +RSpec.describe 'Merge Requests > User filters by milestones', :js do include FilteredSearchHelpers let(:project) { create(:project, :public, :repository) } diff --git a/spec/features/merge_requests/user_filters_by_multiple_criteria_spec.rb b/spec/features/merge_requests/user_filters_by_multiple_criteria_spec.rb index 5fac31e58ba..3aba023b077 100644 --- a/spec/features/merge_requests/user_filters_by_multiple_criteria_spec.rb +++ b/spec/features/merge_requests/user_filters_by_multiple_criteria_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Merge requests > User filters by multiple criteria', :js do +RSpec.describe 'Merge requests > User filters by multiple criteria', :js do include FilteredSearchHelpers let!(:project) { create(:project, :public, :repository) } diff --git a/spec/features/merge_requests/user_filters_by_target_branch_spec.rb b/spec/features/merge_requests/user_filters_by_target_branch_spec.rb index abe97d4c07e..540d87eb969 100644 --- a/spec/features/merge_requests/user_filters_by_target_branch_spec.rb +++ b/spec/features/merge_requests/user_filters_by_target_branch_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Merge Requests > User filters by target branch', :js do +RSpec.describe 'Merge Requests > User filters by target branch', :js do include FilteredSearchHelpers let!(:project) { create(:project, :public, :repository) } diff --git a/spec/features/merge_requests/user_lists_merge_requests_spec.rb b/spec/features/merge_requests/user_lists_merge_requests_spec.rb index ee0d7307e6c..4531ef40901 100644 --- a/spec/features/merge_requests/user_lists_merge_requests_spec.rb +++ b/spec/features/merge_requests/user_lists_merge_requests_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Merge requests > User lists merge requests' do +RSpec.describe 'Merge requests > User lists merge requests' do include MergeRequestHelpers include SortingHelper diff --git a/spec/features/merge_requests/user_mass_updates_spec.rb b/spec/features/merge_requests/user_mass_updates_spec.rb index fa951dd50d3..df94fe2cbd0 100644 --- a/spec/features/merge_requests/user_mass_updates_spec.rb +++ b/spec/features/merge_requests/user_mass_updates_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Merge requests > User mass updates', :js do +RSpec.describe 'Merge requests > User mass updates', :js do let(:project) { create(:project, :repository) } let(:user) { project.creator } let!(:merge_request) { create(:merge_request, source_project: project, target_project: project) } diff --git a/spec/features/merge_requests/user_sorts_merge_requests_spec.rb b/spec/features/merge_requests/user_sorts_merge_requests_spec.rb index 5a84bcb0c44..54c9fbef218 100644 --- a/spec/features/merge_requests/user_sorts_merge_requests_spec.rb +++ b/spec/features/merge_requests/user_sorts_merge_requests_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User sorts merge requests' do +RSpec.describe 'User sorts merge requests' do include CookieHelper let!(:merge_request) { create(:merge_request, source_project: project, target_project: project) } diff --git a/spec/features/merge_requests/user_squashes_merge_request_spec.rb b/spec/features/merge_requests/user_squashes_merge_request_spec.rb index ce5ed76dc7a..84964bd0637 100644 --- a/spec/features/merge_requests/user_squashes_merge_request_spec.rb +++ b/spec/features/merge_requests/user_squashes_merge_request_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User squashes a merge request', :js do +RSpec.describe 'User squashes a merge request', :js do let(:user) { create(:user) } let(:project) { create(:project, :repository) } let(:source_branch) { 'csv' } diff --git a/spec/features/merge_requests/user_views_all_merge_requests_spec.rb b/spec/features/merge_requests/user_views_all_merge_requests_spec.rb index 60496d61e87..f8fe2c5ebe2 100644 --- a/spec/features/merge_requests/user_views_all_merge_requests_spec.rb +++ b/spec/features/merge_requests/user_views_all_merge_requests_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User views all merge requests' do +RSpec.describe 'User views all merge requests' do let!(:closed_merge_request) { create(:closed_merge_request, source_project: project, target_project: project) } let!(:merge_request) { create(:merge_request, source_project: project, target_project: project) } let(:project) { create(:project, :public) } diff --git a/spec/features/merge_requests/user_views_closed_merge_requests_spec.rb b/spec/features/merge_requests/user_views_closed_merge_requests_spec.rb index dc0d35e4fea..abc652c3bbd 100644 --- a/spec/features/merge_requests/user_views_closed_merge_requests_spec.rb +++ b/spec/features/merge_requests/user_views_closed_merge_requests_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User views closed merge requests' do +RSpec.describe 'User views closed merge requests' do let!(:closed_merge_request) { create(:closed_merge_request, source_project: project, target_project: project) } let!(:merge_request) { create(:merge_request, source_project: project, target_project: project) } let(:project) { create(:project, :public) } diff --git a/spec/features/merge_requests/user_views_merged_merge_requests_spec.rb b/spec/features/merge_requests/user_views_merged_merge_requests_spec.rb index ddb354204c9..3b93fb7e4bf 100644 --- a/spec/features/merge_requests/user_views_merged_merge_requests_spec.rb +++ b/spec/features/merge_requests/user_views_merged_merge_requests_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User views merged merge requests' do +RSpec.describe 'User views merged merge requests' do let!(:merge_request) { create(:merge_request, source_project: project, target_project: project) } let!(:merged_merge_request) { create(:merged_merge_request, source_project: project, target_project: project) } let(:project) { create(:project, :public) } diff --git a/spec/features/merge_requests/user_views_open_merge_requests_spec.rb b/spec/features/merge_requests/user_views_open_merge_requests_spec.rb index 4aaa20f0455..49509f89a8d 100644 --- a/spec/features/merge_requests/user_views_open_merge_requests_spec.rb +++ b/spec/features/merge_requests/user_views_open_merge_requests_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User views open merge requests' do +RSpec.describe 'User views open merge requests' do let_it_be(:user) { create(:user) } shared_examples_for 'shows merge requests' do diff --git a/spec/features/milestone_spec.rb b/spec/features/milestone_spec.rb index 6956a7e18f6..4a7f14d5a1b 100644 --- a/spec/features/milestone_spec.rb +++ b/spec/features/milestone_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Milestone' do +RSpec.describe 'Milestone' do let(:group) { create(:group, :public) } let(:project) { create(:project, :public, namespace: group) } let(:user) { create(:user) } diff --git a/spec/features/milestones/user_creates_milestone_spec.rb b/spec/features/milestones/user_creates_milestone_spec.rb index 12cb27b0062..d80796b8f9a 100644 --- a/spec/features/milestones/user_creates_milestone_spec.rb +++ b/spec/features/milestones/user_creates_milestone_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe "User creates milestone", :js do +RSpec.describe "User creates milestone", :js do let_it_be(:user) { create(:user) } let_it_be(:project) { create(:project) } diff --git a/spec/features/milestones/user_deletes_milestone_spec.rb b/spec/features/milestones/user_deletes_milestone_spec.rb index fd72f2dfefa..ede9faed876 100644 --- a/spec/features/milestones/user_deletes_milestone_spec.rb +++ b/spec/features/milestones/user_deletes_milestone_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe "User deletes milestone", :js do +RSpec.describe "User deletes milestone", :js do let(:user) { create(:user) } let(:group) { create(:group) } let(:project) { create(:project, namespace: group) } diff --git a/spec/features/milestones/user_edits_milestone_spec.rb b/spec/features/milestones/user_edits_milestone_spec.rb index be05685aff7..3edd50922b6 100644 --- a/spec/features/milestones/user_edits_milestone_spec.rb +++ b/spec/features/milestones/user_edits_milestone_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe "User edits milestone", :js do +RSpec.describe "User edits milestone", :js do let_it_be(:user) { create(:user) } let_it_be(:project) { create(:project) } let_it_be(:milestone) { create(:milestone, project: project, start_date: Date.today, due_date: 5.days.from_now) } diff --git a/spec/features/milestones/user_promotes_milestone_spec.rb b/spec/features/milestones/user_promotes_milestone_spec.rb index d14097e1ef4..a9c3c9706a0 100644 --- a/spec/features/milestones/user_promotes_milestone_spec.rb +++ b/spec/features/milestones/user_promotes_milestone_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User promotes milestone' do +RSpec.describe 'User promotes milestone' do let_it_be(:group) { create(:group) } let_it_be(:user) { create(:user) } let_it_be(:project) { create(:project, namespace: group) } diff --git a/spec/features/milestones/user_sees_breadcrumb_links_spec.rb b/spec/features/milestones/user_sees_breadcrumb_links_spec.rb index 92445735328..e9cfa9b20dc 100644 --- a/spec/features/milestones/user_sees_breadcrumb_links_spec.rb +++ b/spec/features/milestones/user_sees_breadcrumb_links_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'New project milestone breadcrumb' do +RSpec.describe 'New project milestone breadcrumb' do let(:project) { create(:project) } let(:milestone) { create(:milestone, project: project) } let(:user) { project.creator } diff --git a/spec/features/milestones/user_views_milestone_spec.rb b/spec/features/milestones/user_views_milestone_spec.rb index ca13e226432..420f8d49483 100644 --- a/spec/features/milestones/user_views_milestone_spec.rb +++ b/spec/features/milestones/user_views_milestone_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe "User views milestone" do +RSpec.describe "User views milestone" do let_it_be(:user) { create(:user) } let_it_be(:project) { create(:project) } let_it_be(:milestone) { create(:milestone, project: project) } diff --git a/spec/features/milestones/user_views_milestones_spec.rb b/spec/features/milestones/user_views_milestones_spec.rb index e17797a8165..3f606577121 100644 --- a/spec/features/milestones/user_views_milestones_spec.rb +++ b/spec/features/milestones/user_views_milestones_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe "User views milestones" do +RSpec.describe "User views milestones" do let_it_be(:user) { create(:user) } let_it_be(:project) { create(:project) } let_it_be(:milestone) { create(:milestone, project: project) } @@ -65,7 +65,7 @@ describe "User views milestones" do end end -describe "User views milestones with no MR" do +RSpec.describe "User views milestones with no MR" do let_it_be(:user) { create(:user) } let_it_be(:project) { create(:project, :merge_requests_disabled) } let_it_be(:milestone) { create(:milestone, project: project) } diff --git a/spec/features/oauth_login_spec.rb b/spec/features/oauth_login_spec.rb index 29e9b0c313a..dc27bfbef50 100644 --- a/spec/features/oauth_login_spec.rb +++ b/spec/features/oauth_login_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'OAuth Login', :js, :allow_forgery_protection do +RSpec.describe 'OAuth Login', :js, :allow_forgery_protection do include DeviseHelpers def enter_code(code) diff --git a/spec/features/oauth_provider_authorize_spec.rb b/spec/features/oauth_provider_authorize_spec.rb index 284fe3b0af9..f5a1a35b66f 100644 --- a/spec/features/oauth_provider_authorize_spec.rb +++ b/spec/features/oauth_provider_authorize_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'OAuth Provider' do +RSpec.describe 'OAuth Provider' do describe 'Standard OAuth Authorization' do let(:application) { create(:oauth_application, scopes: 'read_user') } diff --git a/spec/features/participants_autocomplete_spec.rb b/spec/features/participants_autocomplete_spec.rb index fdedd319116..5c29ac870c0 100644 --- a/spec/features/participants_autocomplete_spec.rb +++ b/spec/features/participants_autocomplete_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Member autocomplete', :js do +RSpec.describe 'Member autocomplete', :js do let(:project) { create(:project, :public) } let(:user) { create(:user) } let(:author) { create(:user) } diff --git a/spec/features/password_reset_spec.rb b/spec/features/password_reset_spec.rb index 8ceca1e3175..31b2b2d15aa 100644 --- a/spec/features/password_reset_spec.rb +++ b/spec/features/password_reset_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Password reset' do +RSpec.describe 'Password reset' do describe 'throttling' do it 'sends reset instructions when not previously sent' do user = create(:user) diff --git a/spec/features/populate_new_pipeline_vars_with_params_spec.rb b/spec/features/populate_new_pipeline_vars_with_params_spec.rb index 5fe80e73e38..f931e8497fc 100644 --- a/spec/features/populate_new_pipeline_vars_with_params_spec.rb +++ b/spec/features/populate_new_pipeline_vars_with_params_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe "Populate new pipeline CI variables with url params", :js do +RSpec.describe "Populate new pipeline CI variables with url params", :js do let(:user) { create(:user) } let(:project) { create(:project) } let(:page_path) { new_project_pipeline_path(project) } diff --git a/spec/features/profile_spec.rb b/spec/features/profile_spec.rb index 0147963c0a3..4326700bab1 100644 --- a/spec/features/profile_spec.rb +++ b/spec/features/profile_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Profile account page', :js do +RSpec.describe 'Profile account page', :js do let(:user) { create(:user) } before do diff --git a/spec/features/profiles/account_spec.rb b/spec/features/profiles/account_spec.rb index c95a4f18222..620c2f60ba3 100644 --- a/spec/features/profiles/account_spec.rb +++ b/spec/features/profiles/account_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Profile > Account', :js do +RSpec.describe 'Profile > Account', :js do let(:user) { create(:user, username: 'foo') } before do diff --git a/spec/features/profiles/active_sessions_spec.rb b/spec/features/profiles/active_sessions_spec.rb index 8f63ce2a197..75531d43df2 100644 --- a/spec/features/profiles/active_sessions_spec.rb +++ b/spec/features/profiles/active_sessions_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Profile > Active Sessions', :clean_gitlab_redis_shared_state do +RSpec.describe 'Profile > Active Sessions', :clean_gitlab_redis_shared_state do let(:user) do create(:user).tap do |user| user.current_sign_in_at = Time.current diff --git a/spec/features/profiles/chat_names_spec.rb b/spec/features/profiles/chat_names_spec.rb index 4c447faf77e..80b36aa37b8 100644 --- a/spec/features/profiles/chat_names_spec.rb +++ b/spec/features/profiles/chat_names_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Profile > Chat' do +RSpec.describe 'Profile > Chat' do let(:user) { create(:user) } let(:service) { create(:service) } diff --git a/spec/features/profiles/emails_spec.rb b/spec/features/profiles/emails_spec.rb index a41ef9e86ae..fc7de6d8b23 100644 --- a/spec/features/profiles/emails_spec.rb +++ b/spec/features/profiles/emails_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Profile > Emails' do +RSpec.describe 'Profile > Emails' do let(:user) { create(:user) } before do diff --git a/spec/features/profiles/gpg_keys_spec.rb b/spec/features/profiles/gpg_keys_spec.rb index 07e87f36c65..18ed4e646b3 100644 --- a/spec/features/profiles/gpg_keys_spec.rb +++ b/spec/features/profiles/gpg_keys_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Profile > GPG Keys' do +RSpec.describe 'Profile > GPG Keys' do let(:user) { create(:user, email: GpgHelpers::User2.emails.first) } before do diff --git a/spec/features/profiles/keys_spec.rb b/spec/features/profiles/keys_spec.rb index 3fc0fd76d2e..b5e784a749f 100644 --- a/spec/features/profiles/keys_spec.rb +++ b/spec/features/profiles/keys_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Profile > SSH Keys' do +RSpec.describe 'Profile > SSH Keys' do let(:user) { create(:user) } before do diff --git a/spec/features/profiles/oauth_applications_spec.rb b/spec/features/profiles/oauth_applications_spec.rb index 94c9897a7a9..2735f601307 100644 --- a/spec/features/profiles/oauth_applications_spec.rb +++ b/spec/features/profiles/oauth_applications_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Profile > Applications' do +RSpec.describe 'Profile > Applications' do let(:user) { create(:user) } let(:application) { create(:oauth_application, owner: user) } diff --git a/spec/features/profiles/password_spec.rb b/spec/features/profiles/password_spec.rb index 9dc96080732..a274f2b6d96 100644 --- a/spec/features/profiles/password_spec.rb +++ b/spec/features/profiles/password_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Profile > Password' do +RSpec.describe 'Profile > Password' do let(:user) { create(:user) } def fill_passwords(password, confirmation) diff --git a/spec/features/profiles/personal_access_tokens_spec.rb b/spec/features/profiles/personal_access_tokens_spec.rb index 1fb61eeeb5a..21a0d01a9bf 100644 --- a/spec/features/profiles/personal_access_tokens_spec.rb +++ b/spec/features/profiles/personal_access_tokens_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Profile > Personal Access Tokens', :js do +RSpec.describe 'Profile > Personal Access Tokens', :js do let(:user) { create(:user) } def active_personal_access_tokens diff --git a/spec/features/profiles/user_changes_notified_of_own_activity_spec.rb b/spec/features/profiles/user_changes_notified_of_own_activity_spec.rb index 5af48c4503d..a5b7b1fba9d 100644 --- a/spec/features/profiles/user_changes_notified_of_own_activity_spec.rb +++ b/spec/features/profiles/user_changes_notified_of_own_activity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Profile > Notifications > User changes notified_of_own_activity setting', :js do +RSpec.describe 'Profile > Notifications > User changes notified_of_own_activity setting', :js do let(:user) { create(:user) } before do diff --git a/spec/features/profiles/user_edit_preferences_spec.rb b/spec/features/profiles/user_edit_preferences_spec.rb index 6e61536d5ff..e1117d2d420 100644 --- a/spec/features/profiles/user_edit_preferences_spec.rb +++ b/spec/features/profiles/user_edit_preferences_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'spec_helper' -describe 'User edit preferences profile' do +RSpec.describe 'User edit preferences profile' do let(:user) { create(:user) } before do diff --git a/spec/features/profiles/user_edit_profile_spec.rb b/spec/features/profiles/user_edit_profile_spec.rb index ad46c0937f8..2659157d61d 100644 --- a/spec/features/profiles/user_edit_profile_spec.rb +++ b/spec/features/profiles/user_edit_profile_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User edit profile' do +RSpec.describe 'User edit profile' do let(:user) { create(:user) } before do diff --git a/spec/features/profiles/user_manages_applications_spec.rb b/spec/features/profiles/user_manages_applications_spec.rb index 668c4e8c784..d65365db880 100644 --- a/spec/features/profiles/user_manages_applications_spec.rb +++ b/spec/features/profiles/user_manages_applications_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User manages applications' do +RSpec.describe 'User manages applications' do let(:user) { create(:user) } before do diff --git a/spec/features/profiles/user_manages_emails_spec.rb b/spec/features/profiles/user_manages_emails_spec.rb index 09da819a187..373c4f565f2 100644 --- a/spec/features/profiles/user_manages_emails_spec.rb +++ b/spec/features/profiles/user_manages_emails_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User manages emails' do +RSpec.describe 'User manages emails' do let(:user) { create(:user) } before do diff --git a/spec/features/profiles/user_visits_notifications_tab_spec.rb b/spec/features/profiles/user_visits_notifications_tab_spec.rb index d788c0574e2..997cc8e3c4b 100644 --- a/spec/features/profiles/user_visits_notifications_tab_spec.rb +++ b/spec/features/profiles/user_visits_notifications_tab_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User visits the notifications tab', :js do +RSpec.describe 'User visits the notifications tab', :js do let(:project) { create(:project) } let(:user) { create(:user) } diff --git a/spec/features/profiles/user_visits_profile_account_page_spec.rb b/spec/features/profiles/user_visits_profile_account_page_spec.rb index f576a2bf9e1..b4d1185412b 100644 --- a/spec/features/profiles/user_visits_profile_account_page_spec.rb +++ b/spec/features/profiles/user_visits_profile_account_page_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User visits the profile account page' do +RSpec.describe 'User visits the profile account page' do let(:user) { create(:user) } before do diff --git a/spec/features/profiles/user_visits_profile_authentication_log_spec.rb b/spec/features/profiles/user_visits_profile_authentication_log_spec.rb index 2f6f8ebee9c..22292eff9a3 100644 --- a/spec/features/profiles/user_visits_profile_authentication_log_spec.rb +++ b/spec/features/profiles/user_visits_profile_authentication_log_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User visits the authentication log' do +RSpec.describe 'User visits the authentication log' do let(:user) { create(:user) } context 'when user signed in' do diff --git a/spec/features/profiles/user_visits_profile_preferences_page_spec.rb b/spec/features/profiles/user_visits_profile_preferences_page_spec.rb index b18f763a968..d9421631b32 100644 --- a/spec/features/profiles/user_visits_profile_preferences_page_spec.rb +++ b/spec/features/profiles/user_visits_profile_preferences_page_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User visits the profile preferences page' do +RSpec.describe 'User visits the profile preferences page' do include Select2Helper let(:user) { create(:user) } diff --git a/spec/features/profiles/user_visits_profile_spec.rb b/spec/features/profiles/user_visits_profile_spec.rb index 1c90a794099..77da1f138c7 100644 --- a/spec/features/profiles/user_visits_profile_spec.rb +++ b/spec/features/profiles/user_visits_profile_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User visits their profile' do +RSpec.describe 'User visits their profile' do let(:user) { create(:user) } before do diff --git a/spec/features/profiles/user_visits_profile_ssh_keys_page_spec.rb b/spec/features/profiles/user_visits_profile_ssh_keys_page_spec.rb index 05ad9096f65..0531434f00c 100644 --- a/spec/features/profiles/user_visits_profile_ssh_keys_page_spec.rb +++ b/spec/features/profiles/user_visits_profile_ssh_keys_page_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User visits the profile SSH keys page' do +RSpec.describe 'User visits the profile SSH keys page' do let(:user) { create(:user) } before do diff --git a/spec/features/project_group_variables_spec.rb b/spec/features/project_group_variables_spec.rb index 242fc993718..e964a7def14 100644 --- a/spec/features/project_group_variables_spec.rb +++ b/spec/features/project_group_variables_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Project group variables', :js do +RSpec.describe 'Project group variables', :js do let(:user) { create(:user) } let(:group) { create(:group) } let(:subgroup) { create(:group, parent: group) } diff --git a/spec/features/project_variables_spec.rb b/spec/features/project_variables_spec.rb index 1452317c22b..c67bcbf919b 100644 --- a/spec/features/project_variables_spec.rb +++ b/spec/features/project_variables_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Project variables', :js do +RSpec.describe 'Project variables', :js do let(:user) { create(:user) } let(:project) { create(:project) } let(:variable) { create(:ci_variable, key: 'test_key', value: 'test_value', masked: true) } diff --git a/spec/features/projects/active_tabs_spec.rb b/spec/features/projects/active_tabs_spec.rb index cbdeb19b242..349e5f5e177 100644 --- a/spec/features/projects/active_tabs_spec.rb +++ b/spec/features/projects/active_tabs_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Project active tab' do +RSpec.describe 'Project active tab' do let(:user) { create :user } let(:project) { create(:project, :repository) } diff --git a/spec/features/projects/activity/rss_spec.rb b/spec/features/projects/activity/rss_spec.rb index e1efe6ca64d..9012b335bf4 100644 --- a/spec/features/projects/activity/rss_spec.rb +++ b/spec/features/projects/activity/rss_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Project Activity RSS' do +RSpec.describe 'Project Activity RSS' do let(:project) { create(:project, :public) } let(:user) { project.owner } let(:path) { activity_project_path(project) } diff --git a/spec/features/projects/activity/user_sees_activity_spec.rb b/spec/features/projects/activity/user_sees_activity_spec.rb index 664002d909c..a9cdbd5c342 100644 --- a/spec/features/projects/activity/user_sees_activity_spec.rb +++ b/spec/features/projects/activity/user_sees_activity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Projects > Activity > User sees activity' do +RSpec.describe 'Projects > Activity > User sees activity' do let(:project) { create(:project, :repository, :public) } let(:user) { project.creator } let(:issue) { create(:issue, project: project) } diff --git a/spec/features/projects/activity/user_sees_design_comment_spec.rb b/spec/features/projects/activity/user_sees_design_comment_spec.rb index 9864e9ce29f..e60deba65f0 100644 --- a/spec/features/projects/activity/user_sees_design_comment_spec.rb +++ b/spec/features/projects/activity/user_sees_design_comment_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Projects > Activity > User sees design comment', :js do +RSpec.describe 'Projects > Activity > User sees design comment', :js do include DesignManagementTestHelpers let_it_be(:project) { create(:project, :repository, :public) } diff --git a/spec/features/projects/activity/user_sees_private_activity_spec.rb b/spec/features/projects/activity/user_sees_private_activity_spec.rb index 0ec4752d418..86692bc6b4c 100644 --- a/spec/features/projects/activity/user_sees_private_activity_spec.rb +++ b/spec/features/projects/activity/user_sees_private_activity_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Project > Activity > User sees private activity', :js do +RSpec.describe 'Project > Activity > User sees private activity', :js do let(:project) { create(:project, :public) } let(:author) { create(:user) } let(:user) { create(:user) } diff --git a/spec/features/projects/artifacts/file_spec.rb b/spec/features/projects/artifacts/file_spec.rb index f7eaae12072..b61ee623fec 100644 --- a/spec/features/projects/artifacts/file_spec.rb +++ b/spec/features/projects/artifacts/file_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Artifact file', :js do +RSpec.describe 'Artifact file', :js do let(:project) { create(:project, :public) } let(:pipeline) { create(:ci_empty_pipeline, project: project) } let(:build) { create(:ci_build, :artifacts, pipeline: pipeline) } diff --git a/spec/features/projects/artifacts/raw_spec.rb b/spec/features/projects/artifacts/raw_spec.rb index 0606ab0ed08..d72a35fddf8 100644 --- a/spec/features/projects/artifacts/raw_spec.rb +++ b/spec/features/projects/artifacts/raw_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Raw artifact', :js do +RSpec.describe 'Raw artifact', :js do let(:project) { create(:project, :public) } let(:pipeline) { create(:ci_empty_pipeline, project: project) } let(:job) { create(:ci_build, :artifacts, pipeline: pipeline) } diff --git a/spec/features/projects/artifacts/user_browses_artifacts_spec.rb b/spec/features/projects/artifacts/user_browses_artifacts_spec.rb index d8c6ef4755d..77e3c7f972d 100644 --- a/spec/features/projects/artifacts/user_browses_artifacts_spec.rb +++ b/spec/features/projects/artifacts/user_browses_artifacts_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -describe "User browses artifacts" do +RSpec.describe "User browses artifacts" do let(:project) { create(:project, :public) } let(:pipeline) { create(:ci_empty_pipeline, project: project) } let(:job) { create(:ci_build, :artifacts, pipeline: pipeline) } diff --git a/spec/features/projects/artifacts/user_downloads_artifacts_spec.rb b/spec/features/projects/artifacts/user_downloads_artifacts_spec.rb index 78ff89799ad..7d6ae03e08e 100644 --- a/spec/features/projects/artifacts/user_downloads_artifacts_spec.rb +++ b/spec/features/projects/artifacts/user_downloads_artifacts_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -describe "User downloads artifacts" do +RSpec.describe "User downloads artifacts" do let_it_be(:project) { create(:project, :repository, :public) } let_it_be(:pipeline) { create(:ci_empty_pipeline, status: :success, sha: project.commit.id, project: project) } let_it_be(:job) { create(:ci_build, :artifacts, :success, pipeline: pipeline) } diff --git a/spec/features/projects/badges/coverage_spec.rb b/spec/features/projects/badges/coverage_spec.rb index d17588bb7b4..4c144037acd 100644 --- a/spec/features/projects/badges/coverage_spec.rb +++ b/spec/features/projects/badges/coverage_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'test coverage badge' do +RSpec.describe 'test coverage badge' do let!(:user) { create(:user) } let!(:project) { create(:project, :private) } diff --git a/spec/features/projects/badges/list_spec.rb b/spec/features/projects/badges/list_spec.rb index 7a90457c942..3382bdcd65f 100644 --- a/spec/features/projects/badges/list_spec.rb +++ b/spec/features/projects/badges/list_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'list of badges' do +RSpec.describe 'list of badges' do before do user = create(:user) project = create(:project, :repository) diff --git a/spec/features/projects/badges/pipeline_badge_spec.rb b/spec/features/projects/badges/pipeline_badge_spec.rb index b2f09a9d0b7..c24ab5c4058 100644 --- a/spec/features/projects/badges/pipeline_badge_spec.rb +++ b/spec/features/projects/badges/pipeline_badge_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Pipeline Badge' do +RSpec.describe 'Pipeline Badge' do let_it_be(:project) { create(:project, :repository, :public) } let(:ref) { project.default_branch } diff --git a/spec/features/projects/blobs/blob_line_permalink_updater_spec.rb b/spec/features/projects/blobs/blob_line_permalink_updater_spec.rb index e54137b9492..6bd6634822c 100644 --- a/spec/features/projects/blobs/blob_line_permalink_updater_spec.rb +++ b/spec/features/projects/blobs/blob_line_permalink_updater_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Blob button line permalinks (BlobLinePermalinkUpdater)', :js do +RSpec.describe 'Blob button line permalinks (BlobLinePermalinkUpdater)', :js do include TreeHelper let(:project) { create(:project, :public, :repository) } diff --git a/spec/features/projects/blobs/blob_show_spec.rb b/spec/features/projects/blobs/blob_show_spec.rb index 550dacf7597..c738c5ee5fa 100644 --- a/spec/features/projects/blobs/blob_show_spec.rb +++ b/spec/features/projects/blobs/blob_show_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'File blob', :js do +RSpec.describe 'File blob', :js do include MobileHelpers let(:project) { create(:project, :public, :repository) } diff --git a/spec/features/projects/blobs/edit_spec.rb b/spec/features/projects/blobs/edit_spec.rb index 5d62b2f87bb..56bf31f24ba 100644 --- a/spec/features/projects/blobs/edit_spec.rb +++ b/spec/features/projects/blobs/edit_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Editing file blob', :js do +RSpec.describe 'Editing file blob', :js do include TreeHelper let(:project) { create(:project, :public, :repository) } diff --git a/spec/features/projects/blobs/shortcuts_blob_spec.rb b/spec/features/projects/blobs/shortcuts_blob_spec.rb index bc12a8ff007..64d643aa102 100644 --- a/spec/features/projects/blobs/shortcuts_blob_spec.rb +++ b/spec/features/projects/blobs/shortcuts_blob_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Blob shortcuts', :js do +RSpec.describe 'Blob shortcuts', :js do include TreeHelper let(:project) { create(:project, :public, :repository) } let(:path) { project.repository.ls_files(project.repository.root_ref)[0] } diff --git a/spec/features/projects/blobs/user_creates_new_blob_in_new_project_spec.rb b/spec/features/projects/blobs/user_creates_new_blob_in_new_project_spec.rb index 30878b7fb64..f54bceec2b3 100644 --- a/spec/features/projects/blobs/user_creates_new_blob_in_new_project_spec.rb +++ b/spec/features/projects/blobs/user_creates_new_blob_in_new_project_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User creates blob in new project', :js do +RSpec.describe 'User creates blob in new project', :js do let(:user) { create(:user) } let(:project) { create(:project, :empty_repo) } diff --git a/spec/features/projects/blobs/user_follows_pipeline_suggest_nudge_spec.rb b/spec/features/projects/blobs/user_follows_pipeline_suggest_nudge_spec.rb index 09130d34281..5270774b541 100644 --- a/spec/features/projects/blobs/user_follows_pipeline_suggest_nudge_spec.rb +++ b/spec/features/projects/blobs/user_follows_pipeline_suggest_nudge_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User follows pipeline suggest nudge spec when feature is enabled', :js do +RSpec.describe 'User follows pipeline suggest nudge spec when feature is enabled', :js do include CookieHelper let(:user) { create(:user, :admin) } diff --git a/spec/features/projects/branches/download_buttons_spec.rb b/spec/features/projects/branches/download_buttons_spec.rb index e0b0e22823e..569a93a55fc 100644 --- a/spec/features/projects/branches/download_buttons_spec.rb +++ b/spec/features/projects/branches/download_buttons_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Download buttons in branches page' do +RSpec.describe 'Download buttons in branches page' do let(:user) { create(:user) } let(:role) { :developer } let(:status) { 'success' } diff --git a/spec/features/projects/branches/new_branch_ref_dropdown_spec.rb b/spec/features/projects/branches/new_branch_ref_dropdown_spec.rb index 4b6b07f6cda..5f58e446ed9 100644 --- a/spec/features/projects/branches/new_branch_ref_dropdown_spec.rb +++ b/spec/features/projects/branches/new_branch_ref_dropdown_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'New Branch Ref Dropdown', :js do +RSpec.describe 'New Branch Ref Dropdown', :js do let(:user) { create(:user) } let(:project) { create(:project, :public, :repository) } let(:toggle) { find('.create-from .dropdown-menu-toggle') } diff --git a/spec/features/projects/branches/user_creates_branch_spec.rb b/spec/features/projects/branches/user_creates_branch_spec.rb index 8aac188160b..52c860bfe36 100644 --- a/spec/features/projects/branches/user_creates_branch_spec.rb +++ b/spec/features/projects/branches/user_creates_branch_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -describe "User creates branch", :js do +RSpec.describe "User creates branch", :js do include Spec::Support::Helpers::Features::BranchesHelpers let(:user) { create(:user) } diff --git a/spec/features/projects/branches/user_deletes_branch_spec.rb b/spec/features/projects/branches/user_deletes_branch_spec.rb index 184954c1c78..21a1d31bad4 100644 --- a/spec/features/projects/branches/user_deletes_branch_spec.rb +++ b/spec/features/projects/branches/user_deletes_branch_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -describe "User deletes branch", :js do +RSpec.describe "User deletes branch", :js do let_it_be(:user) { create(:user) } let(:project) { create(:project, :repository) } diff --git a/spec/features/projects/branches/user_views_branches_spec.rb b/spec/features/projects/branches/user_views_branches_spec.rb index e127e784b94..19d96579785 100644 --- a/spec/features/projects/branches/user_views_branches_spec.rb +++ b/spec/features/projects/branches/user_views_branches_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -describe "User views branches" do +RSpec.describe "User views branches" do let_it_be(:project) { create(:project, :repository) } let_it_be(:user) { project.owner } diff --git a/spec/features/projects/branches_spec.rb b/spec/features/projects/branches_spec.rb index 28df11e2db5..dbd1cebd515 100644 --- a/spec/features/projects/branches_spec.rb +++ b/spec/features/projects/branches_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Branches' do +RSpec.describe 'Branches' do let(:user) { create(:user) } let(:project) { create(:project, :public, :repository) } let(:repository) { project.repository } diff --git a/spec/features/projects/ci/lint_spec.rb b/spec/features/projects/ci/lint_spec.rb index 521cfb54cd2..f3845bb8dec 100644 --- a/spec/features/projects/ci/lint_spec.rb +++ b/spec/features/projects/ci/lint_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'CI Lint', :js do +RSpec.describe 'CI Lint', :js do let(:project) { create(:project, :repository) } let(:user) { create(:user) } diff --git a/spec/features/projects/classification_label_on_project_pages_spec.rb b/spec/features/projects/classification_label_on_project_pages_spec.rb index 92f8aa8eb8d..0f07ca7635b 100644 --- a/spec/features/projects/classification_label_on_project_pages_spec.rb +++ b/spec/features/projects/classification_label_on_project_pages_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Classification label on project pages' do +RSpec.describe 'Classification label on project pages' do let(:project) do create(:project, external_authorization_classification_label: 'authorized label') end diff --git a/spec/features/projects/clusters/applications_spec.rb b/spec/features/projects/clusters/applications_spec.rb index ce971b158a3..74b477dd85d 100644 --- a/spec/features/projects/clusters/applications_spec.rb +++ b/spec/features/projects/clusters/applications_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' require_relative '../../../../spec/features/clusters/installing_applications_shared_examples' -describe 'Project-level Cluster Applications', :js do +RSpec.describe 'Project-level Cluster Applications', :js do include GoogleApi::CloudPlatformHelpers let(:project) { create(:project) } diff --git a/spec/features/projects/clusters/eks_spec.rb b/spec/features/projects/clusters/eks_spec.rb index a856376cb4b..c5feef6c6f3 100644 --- a/spec/features/projects/clusters/eks_spec.rb +++ b/spec/features/projects/clusters/eks_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'AWS EKS Cluster', :js do +RSpec.describe 'AWS EKS Cluster', :js do let(:project) { create(:project) } let(:user) { create(:user) } diff --git a/spec/features/projects/clusters/gcp_spec.rb b/spec/features/projects/clusters/gcp_spec.rb index b35e79bef43..3e1006920e7 100644 --- a/spec/features/projects/clusters/gcp_spec.rb +++ b/spec/features/projects/clusters/gcp_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Gcp Cluster', :js, :do_not_mock_admin_mode do +RSpec.describe 'Gcp Cluster', :js, :do_not_mock_admin_mode do include GoogleApi::CloudPlatformHelpers let(:project) { create(:project) } diff --git a/spec/features/projects/clusters/user_spec.rb b/spec/features/projects/clusters/user_spec.rb index 5c82d848563..15fed0c2727 100644 --- a/spec/features/projects/clusters/user_spec.rb +++ b/spec/features/projects/clusters/user_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User Cluster', :js do +RSpec.describe 'User Cluster', :js do include GoogleApi::CloudPlatformHelpers let(:project) { create(:project) } diff --git a/spec/features/projects/clusters_spec.rb b/spec/features/projects/clusters_spec.rb index fc2de4df5ec..1cf214a5c4e 100644 --- a/spec/features/projects/clusters_spec.rb +++ b/spec/features/projects/clusters_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Clusters', :js do +RSpec.describe 'Clusters', :js do include GoogleApi::CloudPlatformHelpers let(:project) { create(:project) } diff --git a/spec/features/projects/commit/builds_spec.rb b/spec/features/projects/commit/builds_spec.rb index d28ff5d3b5f..13f73b8cf44 100644 --- a/spec/features/projects/commit/builds_spec.rb +++ b/spec/features/projects/commit/builds_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'project commit pipelines', :js do +RSpec.describe 'project commit pipelines', :js do let(:project) { create(:project, :repository) } before do diff --git a/spec/features/projects/commit/cherry_pick_spec.rb b/spec/features/projects/commit/cherry_pick_spec.rb index 34b15aeaa25..9fe3f4cd63e 100644 --- a/spec/features/projects/commit/cherry_pick_spec.rb +++ b/spec/features/projects/commit/cherry_pick_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Cherry-pick Commits' do +RSpec.describe 'Cherry-pick Commits' do let(:user) { create(:user) } let(:group) { create(:group) } let(:project) { create(:project, :repository, namespace: group) } diff --git a/spec/features/projects/commit/comments/user_adds_comment_spec.rb b/spec/features/projects/commit/comments/user_adds_comment_spec.rb index bae8e6dc827..a470215186b 100644 --- a/spec/features/projects/commit/comments/user_adds_comment_spec.rb +++ b/spec/features/projects/commit/comments/user_adds_comment_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -describe "User adds a comment on a commit", :js do +RSpec.describe "User adds a comment on a commit", :js do include Spec::Support::Helpers::Features::NotesHelpers include RepoHelpers diff --git a/spec/features/projects/commit/comments/user_deletes_comments_spec.rb b/spec/features/projects/commit/comments/user_deletes_comments_spec.rb index 2993a402e37..431cbb4ffbb 100644 --- a/spec/features/projects/commit/comments/user_deletes_comments_spec.rb +++ b/spec/features/projects/commit/comments/user_deletes_comments_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -describe "User deletes comments on a commit", :js do +RSpec.describe "User deletes comments on a commit", :js do include Spec::Support::Helpers::Features::NotesHelpers include RepoHelpers diff --git a/spec/features/projects/commit/comments/user_edits_comments_spec.rb b/spec/features/projects/commit/comments/user_edits_comments_spec.rb index 29132173674..787d8cdb02b 100644 --- a/spec/features/projects/commit/comments/user_edits_comments_spec.rb +++ b/spec/features/projects/commit/comments/user_edits_comments_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -describe "User edits a comment on a commit", :js do +RSpec.describe "User edits a comment on a commit", :js do include Spec::Support::Helpers::Features::NotesHelpers include RepoHelpers diff --git a/spec/features/projects/commit/diff_notes_spec.rb b/spec/features/projects/commit/diff_notes_spec.rb index 04bd66df28d..ff86047d812 100644 --- a/spec/features/projects/commit/diff_notes_spec.rb +++ b/spec/features/projects/commit/diff_notes_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Commit diff', :js do +RSpec.describe 'Commit diff', :js do include RepoHelpers let(:user) { create(:user) } diff --git a/spec/features/projects/commit/mini_pipeline_graph_spec.rb b/spec/features/projects/commit/mini_pipeline_graph_spec.rb index 3d9fcfe0f62..9349f36282d 100644 --- a/spec/features/projects/commit/mini_pipeline_graph_spec.rb +++ b/spec/features/projects/commit/mini_pipeline_graph_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Mini Pipeline Graph in Commit View', :js do +RSpec.describe 'Mini Pipeline Graph in Commit View', :js do let(:project) { create(:project, :public, :repository) } context 'when commit has pipelines' do diff --git a/spec/features/projects/commit/user_comments_on_commit_spec.rb b/spec/features/projects/commit/user_comments_on_commit_spec.rb index f4fea9b9ae0..87a022d74a3 100644 --- a/spec/features/projects/commit/user_comments_on_commit_spec.rb +++ b/spec/features/projects/commit/user_comments_on_commit_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -describe "User comments on commit", :js do +RSpec.describe "User comments on commit", :js do include Spec::Support::Helpers::Features::NotesHelpers include RepoHelpers diff --git a/spec/features/projects/commit/user_reverts_commit_spec.rb b/spec/features/projects/commit/user_reverts_commit_spec.rb index 39ee72a4a99..ca4e070703b 100644 --- a/spec/features/projects/commit/user_reverts_commit_spec.rb +++ b/spec/features/projects/commit/user_reverts_commit_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User reverts a commit', :js do +RSpec.describe 'User reverts a commit', :js do include RepoHelpers let(:project) { create(:project, :repository, namespace: user.namespace) } diff --git a/spec/features/projects/commit/user_views_user_status_on_commit_spec.rb b/spec/features/projects/commit/user_views_user_status_on_commit_spec.rb index c07f6081d2c..71405cf917d 100644 --- a/spec/features/projects/commit/user_views_user_status_on_commit_spec.rb +++ b/spec/features/projects/commit/user_views_user_status_on_commit_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Project > Commit > View user status' do +RSpec.describe 'Project > Commit > View user status' do include RepoHelpers let_it_be(:project) { create(:project, :repository) } diff --git a/spec/features/projects/commits/rss_spec.rb b/spec/features/projects/commits/rss_spec.rb index 0266df48d4a..b521bb865ae 100644 --- a/spec/features/projects/commits/rss_spec.rb +++ b/spec/features/projects/commits/rss_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Project Commits RSS' do +RSpec.describe 'Project Commits RSS' do let(:user) { create(:user) } let(:project) { create(:project, :repository, visibility_level: Gitlab::VisibilityLevel::PUBLIC) } let(:path) { project_commits_path(project, :master) } diff --git a/spec/features/projects/commits/user_browses_commits_spec.rb b/spec/features/projects/commits/user_browses_commits_spec.rb index 7e59e36ccb7..2796156bfbf 100644 --- a/spec/features/projects/commits/user_browses_commits_spec.rb +++ b/spec/features/projects/commits/user_browses_commits_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User browses commits' do +RSpec.describe 'User browses commits' do include RepoHelpers let(:user) { create(:user) } diff --git a/spec/features/projects/compare_spec.rb b/spec/features/projects/compare_spec.rb index df5cec80ae4..865ae3ad8cb 100644 --- a/spec/features/projects/compare_spec.rb +++ b/spec/features/projects/compare_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -describe "Compare", :js do +RSpec.describe "Compare", :js do let(:user) { create(:user) } let(:project) { create(:project, :repository) } diff --git a/spec/features/projects/container_registry_spec.rb b/spec/features/projects/container_registry_spec.rb index 3d78fd6885d..f561149d2ad 100644 --- a/spec/features/projects/container_registry_spec.rb +++ b/spec/features/projects/container_registry_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Container Registry', :js do +RSpec.describe 'Container Registry', :js do let(:user) { create(:user) } let(:project) { create(:project) } diff --git a/spec/features/projects/deploy_keys_spec.rb b/spec/features/projects/deploy_keys_spec.rb index 687b6461f05..70d47516246 100644 --- a/spec/features/projects/deploy_keys_spec.rb +++ b/spec/features/projects/deploy_keys_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Project deploy keys', :js do +RSpec.describe 'Project deploy keys', :js do let(:user) { create(:user) } let(:project) { create(:project_empty_repo) } diff --git a/spec/features/projects/diffs/diff_show_spec.rb b/spec/features/projects/diffs/diff_show_spec.rb index df94d6debd6..19f111a727b 100644 --- a/spec/features/projects/diffs/diff_show_spec.rb +++ b/spec/features/projects/diffs/diff_show_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Diff file viewer', :js do +RSpec.describe 'Diff file viewer', :js do let(:project) { create(:project, :public, :repository) } def visit_commit(sha, anchor: nil) diff --git a/spec/features/projects/environments/environment_metrics_spec.rb b/spec/features/projects/environments/environment_metrics_spec.rb index 150df66bdd7..a3b979d0f42 100644 --- a/spec/features/projects/environments/environment_metrics_spec.rb +++ b/spec/features/projects/environments/environment_metrics_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Environment > Metrics' do +RSpec.describe 'Environment > Metrics' do include PrometheusHelpers let(:user) { create(:user) } diff --git a/spec/features/projects/environments/environment_spec.rb b/spec/features/projects/environments/environment_spec.rb index bbd33225bb9..fa10e429af2 100644 --- a/spec/features/projects/environments/environment_spec.rb +++ b/spec/features/projects/environments/environment_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Environment' do +RSpec.describe 'Environment' do let(:project) { create(:project, :repository) } let(:user) { create(:user) } let(:role) { :developer } diff --git a/spec/features/projects/environments/environments_spec.rb b/spec/features/projects/environments/environments_spec.rb index cee9b6d50ba..b3f671d57a9 100644 --- a/spec/features/projects/environments/environments_spec.rb +++ b/spec/features/projects/environments/environments_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Environments page', :js do +RSpec.describe 'Environments page', :js do let(:project) { create(:project) } let(:user) { create(:user) } let(:role) { :developer } diff --git a/spec/features/projects/environments_pod_logs_spec.rb b/spec/features/projects/environments_pod_logs_spec.rb index 32eaf690950..82dafbc6237 100644 --- a/spec/features/projects/environments_pod_logs_spec.rb +++ b/spec/features/projects/environments_pod_logs_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Environment > Pod Logs', :js, :kubeclient do +RSpec.describe 'Environment > Pod Logs', :js, :kubeclient do include KubernetesHelpers let(:pod_names) { %w(kube-pod) } diff --git a/spec/features/projects/features_visibility_spec.rb b/spec/features/projects/features_visibility_spec.rb index bf982dc57f6..d84c39de8d8 100644 --- a/spec/features/projects/features_visibility_spec.rb +++ b/spec/features/projects/features_visibility_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Edit Project Settings' do +RSpec.describe 'Edit Project Settings' do let(:member) { create(:user) } let!(:project) { create(:project, :public, :repository) } let!(:issue) { create(:issue, project: project) } diff --git a/spec/features/projects/files/dockerfile_dropdown_spec.rb b/spec/features/projects/files/dockerfile_dropdown_spec.rb index 756f2f2d493..a99df8a79d8 100644 --- a/spec/features/projects/files/dockerfile_dropdown_spec.rb +++ b/spec/features/projects/files/dockerfile_dropdown_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Projects > Files > User wants to add a Dockerfile file' do +RSpec.describe 'Projects > Files > User wants to add a Dockerfile file' do before do project = create(:project, :repository) sign_in project.owner diff --git a/spec/features/projects/files/download_buttons_spec.rb b/spec/features/projects/files/download_buttons_spec.rb index 871f5212ddd..a486d7517ac 100644 --- a/spec/features/projects/files/download_buttons_spec.rb +++ b/spec/features/projects/files/download_buttons_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Projects > Files > Download buttons in files tree' do +RSpec.describe 'Projects > Files > Download buttons in files tree' do let(:project) { create(:project, :repository) } let(:user) { project.creator } diff --git a/spec/features/projects/files/edit_file_soft_wrap_spec.rb b/spec/features/projects/files/edit_file_soft_wrap_spec.rb index 53b1a522a8e..ede22204dbd 100644 --- a/spec/features/projects/files/edit_file_soft_wrap_spec.rb +++ b/spec/features/projects/files/edit_file_soft_wrap_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Projects > Files > User uses soft wrap while editing file', :js do +RSpec.describe 'Projects > Files > User uses soft wrap while editing file', :js do before do project = create(:project, :repository) user = project.owner diff --git a/spec/features/projects/files/editing_a_file_spec.rb b/spec/features/projects/files/editing_a_file_spec.rb index 085276f96a8..819864b3def 100644 --- a/spec/features/projects/files/editing_a_file_spec.rb +++ b/spec/features/projects/files/editing_a_file_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Projects > Files > User wants to edit a file' do +RSpec.describe 'Projects > Files > User wants to edit a file' do let(:project) { create(:project, :repository) } let(:user) { project.owner } let(:commit_params) do diff --git a/spec/features/projects/files/files_sort_submodules_with_folders_spec.rb b/spec/features/projects/files/files_sort_submodules_with_folders_spec.rb index 622764487d8..94190889ace 100644 --- a/spec/features/projects/files/files_sort_submodules_with_folders_spec.rb +++ b/spec/features/projects/files/files_sort_submodules_with_folders_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Projects > Files > User views files page' do +RSpec.describe 'Projects > Files > User views files page' do let(:project) { create(:forked_project_with_submodules) } let(:user) { project.owner } diff --git a/spec/features/projects/files/find_file_keyboard_spec.rb b/spec/features/projects/files/find_file_keyboard_spec.rb index b680be09444..4293183fd9a 100644 --- a/spec/features/projects/files/find_file_keyboard_spec.rb +++ b/spec/features/projects/files/find_file_keyboard_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Projects > Files > Find file keyboard shortcuts', :js do +RSpec.describe 'Projects > Files > Find file keyboard shortcuts', :js do let(:project) { create(:project, :repository) } let(:user) { project.owner } diff --git a/spec/features/projects/files/gitignore_dropdown_spec.rb b/spec/features/projects/files/gitignore_dropdown_spec.rb index a8c6e780d47..dae1164f7f2 100644 --- a/spec/features/projects/files/gitignore_dropdown_spec.rb +++ b/spec/features/projects/files/gitignore_dropdown_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Projects > Files > User wants to add a .gitignore file' do +RSpec.describe 'Projects > Files > User wants to add a .gitignore file' do before do project = create(:project, :repository) sign_in project.owner diff --git a/spec/features/projects/files/gitlab_ci_yml_dropdown_spec.rb b/spec/features/projects/files/gitlab_ci_yml_dropdown_spec.rb index 107d426a893..879cb6a65c8 100644 --- a/spec/features/projects/files/gitlab_ci_yml_dropdown_spec.rb +++ b/spec/features/projects/files/gitlab_ci_yml_dropdown_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Projects > Files > User wants to add a .gitlab-ci.yml file' do +RSpec.describe 'Projects > Files > User wants to add a .gitlab-ci.yml file' do before do project = create(:project, :repository) sign_in project.owner diff --git a/spec/features/projects/files/project_owner_creates_license_file_spec.rb b/spec/features/projects/files/project_owner_creates_license_file_spec.rb index 9fccb3441d6..ab62e8aabc0 100644 --- a/spec/features/projects/files/project_owner_creates_license_file_spec.rb +++ b/spec/features/projects/files/project_owner_creates_license_file_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Projects > Files > Project owner creates a license file', :js do +RSpec.describe 'Projects > Files > Project owner creates a license file', :js do let(:project) { create(:project, :repository) } let(:project_maintainer) { project.owner } diff --git a/spec/features/projects/files/project_owner_sees_link_to_create_license_file_in_empty_project_spec.rb b/spec/features/projects/files/project_owner_sees_link_to_create_license_file_in_empty_project_spec.rb index ad6c565c8f9..eed1e7aaf1b 100644 --- a/spec/features/projects/files/project_owner_sees_link_to_create_license_file_in_empty_project_spec.rb +++ b/spec/features/projects/files/project_owner_sees_link_to_create_license_file_in_empty_project_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Projects > Files > Project owner sees a link to create a license file in empty project', :js do +RSpec.describe 'Projects > Files > Project owner sees a link to create a license file in empty project', :js do let(:project) { create(:project_empty_repo) } let(:project_maintainer) { project.owner } diff --git a/spec/features/projects/files/template_selector_menu_spec.rb b/spec/features/projects/files/template_selector_menu_spec.rb index 838a484d62e..51ae6616d4a 100644 --- a/spec/features/projects/files/template_selector_menu_spec.rb +++ b/spec/features/projects/files/template_selector_menu_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Template selector menu', :js do +RSpec.describe 'Template selector menu', :js do let(:project) { create(:project, :repository) } let(:user) { create(:user) } diff --git a/spec/features/projects/files/template_type_dropdown_spec.rb b/spec/features/projects/files/template_type_dropdown_spec.rb index 5ea0b9b015f..ca9ce841a92 100644 --- a/spec/features/projects/files/template_type_dropdown_spec.rb +++ b/spec/features/projects/files/template_type_dropdown_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Projects > Files > Template type dropdown selector', :js do +RSpec.describe 'Projects > Files > Template type dropdown selector', :js do let(:project) { create(:project, :repository) } let(:user) { project.owner } diff --git a/spec/features/projects/files/undo_template_spec.rb b/spec/features/projects/files/undo_template_spec.rb index 887214e1dbf..09ae595490a 100644 --- a/spec/features/projects/files/undo_template_spec.rb +++ b/spec/features/projects/files/undo_template_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Projects > Files > Template Undo Button', :js do +RSpec.describe 'Projects > Files > Template Undo Button', :js do let(:project) { create(:project, :repository) } let(:user) { project.owner } diff --git a/spec/features/projects/files/user_browses_a_tree_with_a_folder_containing_only_a_folder_spec.rb b/spec/features/projects/files/user_browses_a_tree_with_a_folder_containing_only_a_folder_spec.rb index e88fad9d3f7..4d9da783f98 100644 --- a/spec/features/projects/files/user_browses_a_tree_with_a_folder_containing_only_a_folder_spec.rb +++ b/spec/features/projects/files/user_browses_a_tree_with_a_folder_containing_only_a_folder_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' # This is a regression test for https://gitlab.com/gitlab-org/gitlab-foss/issues/37569 -describe 'Projects > Files > User browses a tree with a folder containing only a folder', :js do +RSpec.describe 'Projects > Files > User browses a tree with a folder containing only a folder', :js do let(:project) { create(:project, :empty_repo) } let(:user) { project.owner } diff --git a/spec/features/projects/files/user_browses_files_spec.rb b/spec/features/projects/files/user_browses_files_spec.rb index 7e3d8e5c1c5..44b5833a8c8 100644 --- a/spec/features/projects/files/user_browses_files_spec.rb +++ b/spec/features/projects/files/user_browses_files_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -describe "User browses files" do +RSpec.describe "User browses files" do let(:fork_message) do "You're not allowed to make changes to this project directly. "\ "A fork of this project has been created that you can make changes in, so you can submit a merge request." diff --git a/spec/features/projects/files/user_browses_lfs_files_spec.rb b/spec/features/projects/files/user_browses_lfs_files_spec.rb index dbeec973865..ecc56b794b2 100644 --- a/spec/features/projects/files/user_browses_lfs_files_spec.rb +++ b/spec/features/projects/files/user_browses_lfs_files_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Projects > Files > User browses LFS files' do +RSpec.describe 'Projects > Files > User browses LFS files' do let(:project) { create(:project, :repository) } let(:user) { project.owner } diff --git a/spec/features/projects/files/user_creates_directory_spec.rb b/spec/features/projects/files/user_creates_directory_spec.rb index 4291f0a74f8..47c5d667f4f 100644 --- a/spec/features/projects/files/user_creates_directory_spec.rb +++ b/spec/features/projects/files/user_creates_directory_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Projects > Files > User creates a directory', :js do +RSpec.describe 'Projects > Files > User creates a directory', :js do let(:fork_message) do "You're not allowed to make changes to this project directly. "\ "A fork of this project has been created that you can make changes in, so you can submit a merge request." diff --git a/spec/features/projects/files/user_creates_files_spec.rb b/spec/features/projects/files/user_creates_files_spec.rb index 2d4f22e299e..7d412730115 100644 --- a/spec/features/projects/files/user_creates_files_spec.rb +++ b/spec/features/projects/files/user_creates_files_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Projects > Files > User creates files', :js do +RSpec.describe 'Projects > Files > User creates files', :js do let(:fork_message) do "You're not allowed to make changes to this project directly. "\ "A fork of this project has been created that you can make changes in, so you can submit a merge request." diff --git a/spec/features/projects/files/user_deletes_files_spec.rb b/spec/features/projects/files/user_deletes_files_spec.rb index 5e36407d9cb..70f125560e0 100644 --- a/spec/features/projects/files/user_deletes_files_spec.rb +++ b/spec/features/projects/files/user_deletes_files_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Projects > Files > User deletes files', :js do +RSpec.describe 'Projects > Files > User deletes files', :js do let(:fork_message) do "You're not allowed to make changes to this project directly. "\ "A fork of this project has been created that you can make changes in, so you can submit a merge request." diff --git a/spec/features/projects/files/user_edits_files_spec.rb b/spec/features/projects/files/user_edits_files_spec.rb index cc428dce2a8..1bb931e35ec 100644 --- a/spec/features/projects/files/user_edits_files_spec.rb +++ b/spec/features/projects/files/user_edits_files_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Projects > Files > User edits files', :js do +RSpec.describe 'Projects > Files > User edits files', :js do include ProjectForksHelper let(:project) { create(:project, :repository, name: 'Shop') } let(:project2) { create(:project, :repository, name: 'Another Project', path: 'another-project') } diff --git a/spec/features/projects/files/user_find_file_spec.rb b/spec/features/projects/files/user_find_file_spec.rb index 72f6ccb20d6..69ea8b0eb5f 100644 --- a/spec/features/projects/files/user_find_file_spec.rb +++ b/spec/features/projects/files/user_find_file_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User find project file' do +RSpec.describe 'User find project file' do let(:user) { create :user } let(:project) { create :project, :repository } diff --git a/spec/features/projects/files/user_reads_pipeline_status_spec.rb b/spec/features/projects/files/user_reads_pipeline_status_spec.rb index 9d38c44b6ef..294a03813cd 100644 --- a/spec/features/projects/files/user_reads_pipeline_status_spec.rb +++ b/spec/features/projects/files/user_reads_pipeline_status_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'user reads pipeline status', :js do +RSpec.describe 'user reads pipeline status', :js do let(:project) { create(:project, :repository) } let(:user) { create(:user) } let(:v110_pipeline) { create_pipeline('v1.1.0', 'success') } diff --git a/spec/features/projects/files/user_replaces_files_spec.rb b/spec/features/projects/files/user_replaces_files_spec.rb index e1eefdcc40f..1d4085ef21c 100644 --- a/spec/features/projects/files/user_replaces_files_spec.rb +++ b/spec/features/projects/files/user_replaces_files_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Projects > Files > User replaces files', :js do +RSpec.describe 'Projects > Files > User replaces files', :js do include DropzoneHelper let(:fork_message) do diff --git a/spec/features/projects/files/user_searches_for_files_spec.rb b/spec/features/projects/files/user_searches_for_files_spec.rb index ff7547bce83..7fd7dfff279 100644 --- a/spec/features/projects/files/user_searches_for_files_spec.rb +++ b/spec/features/projects/files/user_searches_for_files_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Projects > Files > User searches for files' do +RSpec.describe 'Projects > Files > User searches for files' do let(:user) { project.owner } before do diff --git a/spec/features/projects/files/user_uploads_files_spec.rb b/spec/features/projects/files/user_uploads_files_spec.rb index ecf40969541..944d08df3f3 100644 --- a/spec/features/projects/files/user_uploads_files_spec.rb +++ b/spec/features/projects/files/user_uploads_files_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Projects > Files > User uploads files' do +RSpec.describe 'Projects > Files > User uploads files' do include DropzoneHelper let(:user) { create(:user) } diff --git a/spec/features/projects/fork_spec.rb b/spec/features/projects/fork_spec.rb index bfab4387688..f0ed4013230 100644 --- a/spec/features/projects/fork_spec.rb +++ b/spec/features/projects/fork_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Project fork' do +RSpec.describe 'Project fork' do include ProjectForksHelper let(:user) { create(:user) } diff --git a/spec/features/projects/forks/fork_list_spec.rb b/spec/features/projects/forks/fork_list_spec.rb index 3b63d9a4c2d..b48c46ef8cb 100644 --- a/spec/features/projects/forks/fork_list_spec.rb +++ b/spec/features/projects/forks/fork_list_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'listing forks of a project' do +RSpec.describe 'listing forks of a project' do include ProjectForksHelper include ExternalAuthorizationServiceHelpers diff --git a/spec/features/projects/gfm_autocomplete_load_spec.rb b/spec/features/projects/gfm_autocomplete_load_spec.rb index ad39dec0a43..b02483be489 100644 --- a/spec/features/projects/gfm_autocomplete_load_spec.rb +++ b/spec/features/projects/gfm_autocomplete_load_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'GFM autocomplete loading', :js do +RSpec.describe 'GFM autocomplete loading', :js do let(:project) { create(:project) } before do diff --git a/spec/features/projects/graph_spec.rb b/spec/features/projects/graph_spec.rb index 25efb7b28a7..7b9f79c9f7f 100644 --- a/spec/features/projects/graph_spec.rb +++ b/spec/features/projects/graph_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Project Graph', :js do +RSpec.describe 'Project Graph', :js do let(:user) { create :user } let(:project) { create(:project, :repository, namespace: user.namespace) } let(:branch_name) { 'master' } diff --git a/spec/features/projects/hook_logs/user_reads_log_spec.rb b/spec/features/projects/hook_logs/user_reads_log_spec.rb index 8c666f5d67a..8513a9374d1 100644 --- a/spec/features/projects/hook_logs/user_reads_log_spec.rb +++ b/spec/features/projects/hook_logs/user_reads_log_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Hook logs' do +RSpec.describe 'Hook logs' do let(:web_hook_log) { create(:web_hook_log, response_body: '<script>') } let(:project) { web_hook_log.web_hook.project } let(:user) { create(:user) } diff --git a/spec/features/projects/import_export/export_file_spec.rb b/spec/features/projects/import_export/export_file_spec.rb index 1d6d5ae1b4d..86aeb2bc80c 100644 --- a/spec/features/projects/import_export/export_file_spec.rb +++ b/spec/features/projects/import_export/export_file_spec.rb @@ -6,7 +6,7 @@ require 'spec_helper' # It looks up for any sensitive word inside the JSON, so if a sensitive word is found # we'll have to either include it adding the model that includes it to the +safe_list+ # or make sure the attribute is blacklisted in the +import_export.yml+ configuration -describe 'Import/Export - project export integration test', :js do +RSpec.describe 'Import/Export - project export integration test', :js do include Select2Helper include ExportFileHelper diff --git a/spec/features/projects/import_export/import_file_spec.rb b/spec/features/projects/import_export/import_file_spec.rb index 33c7182c084..83ceffa621c 100644 --- a/spec/features/projects/import_export/import_file_spec.rb +++ b/spec/features/projects/import_export/import_file_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Import/Export - project import integration test', :js do +RSpec.describe 'Import/Export - project import integration test', :js do include GitHelpers let(:user) { create(:user) } diff --git a/spec/features/projects/issuable_templates_spec.rb b/spec/features/projects/issuable_templates_spec.rb index 4b6f1672f08..8f1c31f229f 100644 --- a/spec/features/projects/issuable_templates_spec.rb +++ b/spec/features/projects/issuable_templates_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'issuable templates', :js do +RSpec.describe 'issuable templates', :js do include ProjectForksHelper let(:user) { create(:user) } diff --git a/spec/features/projects/issues/design_management/user_links_to_designs_in_issue_spec.rb b/spec/features/projects/issues/design_management/user_links_to_designs_in_issue_spec.rb index bb9f902833d..8d5e99d7e2b 100644 --- a/spec/features/projects/issues/design_management/user_links_to_designs_in_issue_spec.rb +++ b/spec/features/projects/issues/design_management/user_links_to_designs_in_issue_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'viewing issues with design references' do +RSpec.describe 'viewing issues with design references' do include DesignManagementTestHelpers let_it_be(:public_project) { create(:project_empty_repo, :public) } diff --git a/spec/features/projects/issues/design_management/user_paginates_designs_spec.rb b/spec/features/projects/issues/design_management/user_paginates_designs_spec.rb index d9a72f2d5c5..f871ca60596 100644 --- a/spec/features/projects/issues/design_management/user_paginates_designs_spec.rb +++ b/spec/features/projects/issues/design_management/user_paginates_designs_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User paginates issue designs', :js do +RSpec.describe 'User paginates issue designs', :js do include DesignManagementTestHelpers let(:project) { create(:project_empty_repo, :public) } diff --git a/spec/features/projects/issues/design_management/user_permissions_upload_spec.rb b/spec/features/projects/issues/design_management/user_permissions_upload_spec.rb index 2238e86a47f..902a84afc83 100644 --- a/spec/features/projects/issues/design_management/user_permissions_upload_spec.rb +++ b/spec/features/projects/issues/design_management/user_permissions_upload_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User design permissions', :js do +RSpec.describe 'User design permissions', :js do include DesignManagementTestHelpers let(:project) { create(:project_empty_repo, :public) } diff --git a/spec/features/projects/issues/design_management/user_uploads_designs_spec.rb b/spec/features/projects/issues/design_management/user_uploads_designs_spec.rb index d160ab95a65..66b449a9de5 100644 --- a/spec/features/projects/issues/design_management/user_uploads_designs_spec.rb +++ b/spec/features/projects/issues/design_management/user_uploads_designs_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User uploads new design', :js do +RSpec.describe 'User uploads new design', :js do include DesignManagementTestHelpers let_it_be(:project) { create(:project_empty_repo, :public) } diff --git a/spec/features/projects/issues/design_management/user_views_design_images_spec.rb b/spec/features/projects/issues/design_management/user_views_design_images_spec.rb index 3d0f4df55c4..4a4c33cb881 100644 --- a/spec/features/projects/issues/design_management/user_views_design_images_spec.rb +++ b/spec/features/projects/issues/design_management/user_views_design_images_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Users views raw design image files' do +RSpec.describe 'Users views raw design image files' do include DesignManagementTestHelpers let_it_be(:project) { create(:project, :public) } diff --git a/spec/features/projects/issues/design_management/user_views_design_spec.rb b/spec/features/projects/issues/design_management/user_views_design_spec.rb index 707049b0068..527442d5339 100644 --- a/spec/features/projects/issues/design_management/user_views_design_spec.rb +++ b/spec/features/projects/issues/design_management/user_views_design_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User views issue designs', :js do +RSpec.describe 'User views issue designs', :js do include DesignManagementTestHelpers let_it_be(:project) { create(:project_empty_repo, :public) } diff --git a/spec/features/projects/issues/design_management/user_views_designs_spec.rb b/spec/features/projects/issues/design_management/user_views_designs_spec.rb index a4fb7456922..d371ae1aad7 100644 --- a/spec/features/projects/issues/design_management/user_views_designs_spec.rb +++ b/spec/features/projects/issues/design_management/user_views_designs_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User views issue designs', :js do +RSpec.describe 'User views issue designs', :js do include DesignManagementTestHelpers let_it_be(:project) { create(:project_empty_repo, :public) } diff --git a/spec/features/projects/issues/design_management/user_views_designs_with_svg_xss_spec.rb b/spec/features/projects/issues/design_management/user_views_designs_with_svg_xss_spec.rb index a9e4aa899a7..5bc1271309c 100644 --- a/spec/features/projects/issues/design_management/user_views_designs_with_svg_xss_spec.rb +++ b/spec/features/projects/issues/design_management/user_views_designs_with_svg_xss_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User views an SVG design that contains XSS', :js do +RSpec.describe 'User views an SVG design that contains XSS', :js do include DesignManagementTestHelpers let(:project) { create(:project_empty_repo, :public) } diff --git a/spec/features/projects/issues/viewing_issues_with_external_authorization_enabled_spec.rb b/spec/features/projects/issues/viewing_issues_with_external_authorization_enabled_spec.rb index 6c8f4b51ea0..6feefff9207 100644 --- a/spec/features/projects/issues/viewing_issues_with_external_authorization_enabled_spec.rb +++ b/spec/features/projects/issues/viewing_issues_with_external_authorization_enabled_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'viewing an issue with cross project references' do +RSpec.describe 'viewing an issue with cross project references' do include ExternalAuthorizationServiceHelpers include Gitlab::Routing.url_helpers diff --git a/spec/features/projects/jobs/permissions_spec.rb b/spec/features/projects/jobs/permissions_spec.rb index d78cf674dc6..7f46a369dd6 100644 --- a/spec/features/projects/jobs/permissions_spec.rb +++ b/spec/features/projects/jobs/permissions_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Project Jobs Permissions' do +RSpec.describe 'Project Jobs Permissions' do let(:user) { create(:user) } let(:group) { create(:group, name: 'some group') } let(:project) { create(:project, :repository, namespace: group) } diff --git a/spec/features/projects/jobs/user_browses_job_spec.rb b/spec/features/projects/jobs/user_browses_job_spec.rb index 16ba1c1b73d..67299e852b3 100644 --- a/spec/features/projects/jobs/user_browses_job_spec.rb +++ b/spec/features/projects/jobs/user_browses_job_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User browses a job', :js do +RSpec.describe 'User browses a job', :js do let(:user) { create(:user) } let(:user_access_level) { :developer } let(:project) { create(:project, :repository, namespace: user.namespace) } diff --git a/spec/features/projects/jobs/user_browses_jobs_spec.rb b/spec/features/projects/jobs/user_browses_jobs_spec.rb index 44709cb1230..c768b0e281c 100644 --- a/spec/features/projects/jobs/user_browses_jobs_spec.rb +++ b/spec/features/projects/jobs/user_browses_jobs_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User browses jobs' do +RSpec.describe 'User browses jobs' do let!(:build) { create(:ci_build, :coverage, pipeline: pipeline) } let(:pipeline) { create(:ci_empty_pipeline, project: project, sha: project.commit.sha, ref: 'master') } let(:project) { create(:project, :repository, namespace: user.namespace) } diff --git a/spec/features/projects/jobs_spec.rb b/spec/features/projects/jobs_spec.rb index 6b7ea9215b0..e78e8989575 100644 --- a/spec/features/projects/jobs_spec.rb +++ b/spec/features/projects/jobs_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' require 'tempfile' -describe 'Jobs', :clean_gitlab_redis_shared_state do +RSpec.describe 'Jobs', :clean_gitlab_redis_shared_state do include Gitlab::Routing include ProjectForksHelper diff --git a/spec/features/projects/labels/issues_sorted_by_priority_spec.rb b/spec/features/projects/labels/issues_sorted_by_priority_spec.rb index 503ac8caddf..66d61e629df 100644 --- a/spec/features/projects/labels/issues_sorted_by_priority_spec.rb +++ b/spec/features/projects/labels/issues_sorted_by_priority_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Issue prioritization' do +RSpec.describe 'Issue prioritization' do let(:user) { create(:user) } let(:project) { create(:project, name: 'test', namespace: user.namespace) } diff --git a/spec/features/projects/labels/search_labels_spec.rb b/spec/features/projects/labels/search_labels_spec.rb index e2eec7400ff..04dfd4ca5f1 100644 --- a/spec/features/projects/labels/search_labels_spec.rb +++ b/spec/features/projects/labels/search_labels_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Search for labels', :js do +RSpec.describe 'Search for labels', :js do let(:user) { create(:user) } let(:project) { create(:project) } let!(:label1) { create(:label, title: 'Foo', description: 'Lorem ipsum', project: project) } diff --git a/spec/features/projects/labels/sort_labels_spec.rb b/spec/features/projects/labels/sort_labels_spec.rb index 01c3f251173..83559b816d2 100644 --- a/spec/features/projects/labels/sort_labels_spec.rb +++ b/spec/features/projects/labels/sort_labels_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Sort labels', :js do +RSpec.describe 'Sort labels', :js do let(:user) { create(:user) } let(:project) { create(:project) } let!(:label1) { create(:label, title: 'Foo', description: 'Lorem ipsum', project: project) } diff --git a/spec/features/projects/labels/subscription_spec.rb b/spec/features/projects/labels/subscription_spec.rb index 1d0f9e73a1b..7ca8a542c21 100644 --- a/spec/features/projects/labels/subscription_spec.rb +++ b/spec/features/projects/labels/subscription_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Labels subscription' do +RSpec.describe 'Labels subscription' do let(:user) { create(:user) } let(:group) { create(:group) } let(:project) { create(:project, :public, namespace: group) } diff --git a/spec/features/projects/labels/update_prioritization_spec.rb b/spec/features/projects/labels/update_prioritization_spec.rb index 3a37ee6623d..706ea92c086 100644 --- a/spec/features/projects/labels/update_prioritization_spec.rb +++ b/spec/features/projects/labels/update_prioritization_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Prioritize labels' do +RSpec.describe 'Prioritize labels' do include DragTo let(:user) { create(:user) } diff --git a/spec/features/projects/labels/user_creates_labels_spec.rb b/spec/features/projects/labels/user_creates_labels_spec.rb index 180cd8eff14..001d23cd2c9 100644 --- a/spec/features/projects/labels/user_creates_labels_spec.rb +++ b/spec/features/projects/labels/user_creates_labels_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -describe "User creates labels" do +RSpec.describe "User creates labels" do let_it_be(:project) { create(:project_empty_repo, :public) } let_it_be(:user) { create(:user) } diff --git a/spec/features/projects/labels/user_edits_labels_spec.rb b/spec/features/projects/labels/user_edits_labels_spec.rb index add959ccda6..8300a1a8542 100644 --- a/spec/features/projects/labels/user_edits_labels_spec.rb +++ b/spec/features/projects/labels/user_edits_labels_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -describe "User edits labels" do +RSpec.describe "User edits labels" do let_it_be(:project) { create(:project_empty_repo, :public) } let_it_be(:label) { create(:label, project: project) } let_it_be(:user) { create(:user) } diff --git a/spec/features/projects/labels/user_promotes_label_spec.rb b/spec/features/projects/labels/user_promotes_label_spec.rb index cf7320d3cf9..4cb22c2e48c 100644 --- a/spec/features/projects/labels/user_promotes_label_spec.rb +++ b/spec/features/projects/labels/user_promotes_label_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User promotes label' do +RSpec.describe 'User promotes label' do let_it_be(:group) { create(:group) } let_it_be(:user) { create(:user) } let_it_be(:project) { create(:project, namespace: group) } diff --git a/spec/features/projects/labels/user_removes_labels_spec.rb b/spec/features/projects/labels/user_removes_labels_spec.rb index 459adeeec30..217f86b92cf 100644 --- a/spec/features/projects/labels/user_removes_labels_spec.rb +++ b/spec/features/projects/labels/user_removes_labels_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -describe "User removes labels" do +RSpec.describe "User removes labels" do let(:project) { create(:project_empty_repo, :public) } let(:user) { create(:user) } diff --git a/spec/features/projects/labels/user_sees_breadcrumb_links_spec.rb b/spec/features/projects/labels/user_sees_breadcrumb_links_spec.rb index 68a924e4fad..f9c65c08ec0 100644 --- a/spec/features/projects/labels/user_sees_breadcrumb_links_spec.rb +++ b/spec/features/projects/labels/user_sees_breadcrumb_links_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'New project label breadcrumb' do +RSpec.describe 'New project label breadcrumb' do let(:project) { create(:project) } let(:user) { project.creator } diff --git a/spec/features/projects/labels/user_sees_links_to_issuables_spec.rb b/spec/features/projects/labels/user_sees_links_to_issuables_spec.rb index f60e7e9703f..11aa53fd963 100644 --- a/spec/features/projects/labels/user_sees_links_to_issuables_spec.rb +++ b/spec/features/projects/labels/user_sees_links_to_issuables_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Projects > Labels > User sees links to issuables' do +RSpec.describe 'Projects > Labels > User sees links to issuables' do let_it_be(:user) { create(:user) } before do diff --git a/spec/features/projects/labels/user_views_labels_spec.rb b/spec/features/projects/labels/user_views_labels_spec.rb index 7f70ac903d6..da8520ca8fb 100644 --- a/spec/features/projects/labels/user_views_labels_spec.rb +++ b/spec/features/projects/labels/user_views_labels_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -describe "User views labels" do +RSpec.describe "User views labels" do let_it_be(:project) { create(:project_empty_repo, :public) } let_it_be(:user) { create(:user) } let(:label_titles) { %w[bug enhancement feature] } diff --git a/spec/features/projects/members/anonymous_user_sees_members_spec.rb b/spec/features/projects/members/anonymous_user_sees_members_spec.rb index 096cf97551a..3b0f00c5494 100644 --- a/spec/features/projects/members/anonymous_user_sees_members_spec.rb +++ b/spec/features/projects/members/anonymous_user_sees_members_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Projects > Members > Anonymous user sees members' do +RSpec.describe 'Projects > Members > Anonymous user sees members' do let(:user) { create(:user) } let(:group) { create(:group, :public) } let(:project) { create(:project, :public) } diff --git a/spec/features/projects/members/group_member_cannot_leave_group_project_spec.rb b/spec/features/projects/members/group_member_cannot_leave_group_project_spec.rb index b6f6e2ca85f..c8a9f959188 100644 --- a/spec/features/projects/members/group_member_cannot_leave_group_project_spec.rb +++ b/spec/features/projects/members/group_member_cannot_leave_group_project_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Projects > Members > Group member cannot leave group project' do +RSpec.describe 'Projects > Members > Group member cannot leave group project' do let(:user) { create(:user) } let(:group) { create(:group) } let(:project) { create(:project, namespace: group) } diff --git a/spec/features/projects/members/group_member_cannot_request_access_to_his_group_project_spec.rb b/spec/features/projects/members/group_member_cannot_request_access_to_his_group_project_spec.rb index cf9441bcd55..34c870b8a96 100644 --- a/spec/features/projects/members/group_member_cannot_request_access_to_his_group_project_spec.rb +++ b/spec/features/projects/members/group_member_cannot_request_access_to_his_group_project_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Projects > Members > Group member cannot request access to their group project' do +RSpec.describe 'Projects > Members > Group member cannot request access to their group project' do let(:user) { create(:user) } let(:group) { create(:group) } let(:project) { create(:project, namespace: group) } diff --git a/spec/features/projects/members/group_members_spec.rb b/spec/features/projects/members/group_members_spec.rb index 0a0809206d2..3060d2c6a43 100644 --- a/spec/features/projects/members/group_members_spec.rb +++ b/spec/features/projects/members/group_members_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Projects members' do +RSpec.describe 'Projects members' do let(:user) { create(:user) } let(:developer) { create(:user) } let(:group) { create(:group, :public) } diff --git a/spec/features/projects/members/group_requester_cannot_request_access_to_project_spec.rb b/spec/features/projects/members/group_requester_cannot_request_access_to_project_spec.rb index ecd55f71c84..ec86b7db4fa 100644 --- a/spec/features/projects/members/group_requester_cannot_request_access_to_project_spec.rb +++ b/spec/features/projects/members/group_requester_cannot_request_access_to_project_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Projects > Members > Group requester cannot request access to project', :js do +RSpec.describe 'Projects > Members > Group requester cannot request access to project', :js do let(:user) { create(:user) } let(:owner) { create(:user) } let(:group) { create(:group, :public) } diff --git a/spec/features/projects/members/groups_with_access_list_spec.rb b/spec/features/projects/members/groups_with_access_list_spec.rb index 90838eb1504..2ee6bc103e9 100644 --- a/spec/features/projects/members/groups_with_access_list_spec.rb +++ b/spec/features/projects/members/groups_with_access_list_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Projects > Members > Groups with access list', :js do +RSpec.describe 'Projects > Members > Groups with access list', :js do let(:user) { create(:user) } let(:group) { create(:group, :public) } let(:project) { create(:project, :public) } diff --git a/spec/features/projects/members/invite_group_spec.rb b/spec/features/projects/members/invite_group_spec.rb index 7ba5c01061a..058cbfff662 100644 --- a/spec/features/projects/members/invite_group_spec.rb +++ b/spec/features/projects/members/invite_group_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Project > Members > Invite group', :js do +RSpec.describe 'Project > Members > Invite group', :js do include Select2Helper include ActionView::Helpers::DateHelper diff --git a/spec/features/projects/members/list_spec.rb b/spec/features/projects/members/list_spec.rb index 99ab5e641ed..f51ebde8f80 100644 --- a/spec/features/projects/members/list_spec.rb +++ b/spec/features/projects/members/list_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Project members list' do +RSpec.describe 'Project members list' do include Select2Helper include Spec::Support::Helpers::Features::ListRowsHelpers diff --git a/spec/features/projects/members/master_adds_member_with_expiration_date_spec.rb b/spec/features/projects/members/master_adds_member_with_expiration_date_spec.rb index cbcd03b33ce..979bbd57aa3 100644 --- a/spec/features/projects/members/master_adds_member_with_expiration_date_spec.rb +++ b/spec/features/projects/members/master_adds_member_with_expiration_date_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Projects > Members > Maintainer adds member with expiration date', :js do +RSpec.describe 'Projects > Members > Maintainer adds member with expiration date', :js do include Select2Helper include ActiveSupport::Testing::TimeHelpers diff --git a/spec/features/projects/members/master_manages_access_requests_spec.rb b/spec/features/projects/members/master_manages_access_requests_spec.rb index f113fb643f8..4c3eaa93352 100644 --- a/spec/features/projects/members/master_manages_access_requests_spec.rb +++ b/spec/features/projects/members/master_manages_access_requests_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Projects > Members > Maintainer manages access requests' do +RSpec.describe 'Projects > Members > Maintainer manages access requests' do it_behaves_like 'Maintainer manages access requests' do let(:entity) { create(:project, :public) } let(:members_page_path) { project_project_members_path(entity) } diff --git a/spec/features/projects/members/member_cannot_request_access_to_his_project_spec.rb b/spec/features/projects/members/member_cannot_request_access_to_his_project_spec.rb index e2b57472b2e..fa02e815867 100644 --- a/spec/features/projects/members/member_cannot_request_access_to_his_project_spec.rb +++ b/spec/features/projects/members/member_cannot_request_access_to_his_project_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Projects > Members > Member cannot request access to their project' do +RSpec.describe 'Projects > Members > Member cannot request access to their project' do let(:member) { create(:user) } let(:project) { create(:project) } diff --git a/spec/features/projects/members/member_leaves_project_spec.rb b/spec/features/projects/members/member_leaves_project_spec.rb index cb7a405e821..aa7633c3b28 100644 --- a/spec/features/projects/members/member_leaves_project_spec.rb +++ b/spec/features/projects/members/member_leaves_project_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Projects > Members > Member leaves project' do +RSpec.describe 'Projects > Members > Member leaves project' do let(:user) { create(:user) } let(:project) { create(:project, :repository) } diff --git a/spec/features/projects/members/owner_cannot_leave_project_spec.rb b/spec/features/projects/members/owner_cannot_leave_project_spec.rb index 781c584796d..fbe8583b236 100644 --- a/spec/features/projects/members/owner_cannot_leave_project_spec.rb +++ b/spec/features/projects/members/owner_cannot_leave_project_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Projects > Members > Owner cannot leave project' do +RSpec.describe 'Projects > Members > Owner cannot leave project' do let(:project) { create(:project) } before do diff --git a/spec/features/projects/members/owner_cannot_request_access_to_his_project_spec.rb b/spec/features/projects/members/owner_cannot_request_access_to_his_project_spec.rb index 5643a29b4e4..5e6e3d4d7f2 100644 --- a/spec/features/projects/members/owner_cannot_request_access_to_his_project_spec.rb +++ b/spec/features/projects/members/owner_cannot_request_access_to_his_project_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Projects > Members > Owner cannot request access to their own project' do +RSpec.describe 'Projects > Members > Owner cannot request access to their own project' do let(:project) { create(:project) } before do diff --git a/spec/features/projects/members/sorting_spec.rb b/spec/features/projects/members/sorting_spec.rb index 12f485317d8..be27cbc0d66 100644 --- a/spec/features/projects/members/sorting_spec.rb +++ b/spec/features/projects/members/sorting_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Projects > Members > Sorting' do +RSpec.describe 'Projects > Members > Sorting' do let(:maintainer) { create(:user, name: 'John Doe') } let(:developer) { create(:user, name: 'Mary Jane', last_sign_in_at: 5.days.ago) } let(:project) { create(:project, namespace: maintainer.namespace, creator: maintainer) } diff --git a/spec/features/projects/members/user_requests_access_spec.rb b/spec/features/projects/members/user_requests_access_spec.rb index 7e7faca9741..a339130ee3c 100644 --- a/spec/features/projects/members/user_requests_access_spec.rb +++ b/spec/features/projects/members/user_requests_access_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Projects > Members > User requests access', :js do +RSpec.describe 'Projects > Members > User requests access', :js do let(:user) { create(:user) } let(:project) { create(:project, :public, :repository) } let(:maintainer) { project.owner } diff --git a/spec/features/projects/merge_request_button_spec.rb b/spec/features/projects/merge_request_button_spec.rb index 950af8b0ae0..e3d8534ace9 100644 --- a/spec/features/projects/merge_request_button_spec.rb +++ b/spec/features/projects/merge_request_button_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Merge Request button' do +RSpec.describe 'Merge Request button' do shared_examples 'Merge request button only shown when allowed' do let(:user) { create(:user) } let(:project) { create(:project, :public, :repository) } diff --git a/spec/features/projects/milestones/milestone_spec.rb b/spec/features/projects/milestones/milestone_spec.rb index fb9667cd67d..9ffb1746f3e 100644 --- a/spec/features/projects/milestones/milestone_spec.rb +++ b/spec/features/projects/milestones/milestone_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Project milestone' do +RSpec.describe 'Project milestone' do let(:user) { create(:user) } let(:project) { create(:project, name: 'test', namespace: user.namespace) } let(:milestone) { create(:milestone, project: project) } diff --git a/spec/features/projects/milestones/milestones_sorting_spec.rb b/spec/features/projects/milestones/milestones_sorting_spec.rb index 77cf696fb7c..565c61cfaa0 100644 --- a/spec/features/projects/milestones/milestones_sorting_spec.rb +++ b/spec/features/projects/milestones/milestones_sorting_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Milestones sorting', :js do +RSpec.describe 'Milestones sorting', :js do let(:user) { create(:user) } let(:project) { create(:project, name: 'test', namespace: user.namespace) } diff --git a/spec/features/projects/milestones/new_spec.rb b/spec/features/projects/milestones/new_spec.rb index b1b74bed59d..170268297cd 100644 --- a/spec/features/projects/milestones/new_spec.rb +++ b/spec/features/projects/milestones/new_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Creating a new project milestone', :js do +RSpec.describe 'Creating a new project milestone', :js do let(:user) { create(:user) } let(:project) { create(:project, name: 'test', namespace: user.namespace) } diff --git a/spec/features/projects/milestones/user_interacts_with_labels_spec.rb b/spec/features/projects/milestones/user_interacts_with_labels_spec.rb index 0177871599a..d658599c52b 100644 --- a/spec/features/projects/milestones/user_interacts_with_labels_spec.rb +++ b/spec/features/projects/milestones/user_interacts_with_labels_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User interacts with labels' do +RSpec.describe 'User interacts with labels' do let(:user) { create(:user) } let(:project) { create(:project, namespace: user.namespace) } let(:milestone) { create(:milestone, project: project, title: 'v2.2', description: '# Description header') } diff --git a/spec/features/projects/navbar_spec.rb b/spec/features/projects/navbar_spec.rb index 1797ca8aa7d..94d79d60aeb 100644 --- a/spec/features/projects/navbar_spec.rb +++ b/spec/features/projects/navbar_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Project navbar' do +RSpec.describe 'Project navbar' do include NavbarStructureHelper include WaitForRequests diff --git a/spec/features/projects/network_graph_spec.rb b/spec/features/projects/network_graph_spec.rb index 2f6a2e90ab9..4ae809399b6 100644 --- a/spec/features/projects/network_graph_spec.rb +++ b/spec/features/projects/network_graph_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Project Network Graph', :js do +RSpec.describe 'Project Network Graph', :js do let(:user) { create :user } let(:project) { create :project, :repository, namespace: user.namespace } diff --git a/spec/features/projects/new_project_spec.rb b/spec/features/projects/new_project_spec.rb index 22a0d268243..6a2ec9aa4a8 100644 --- a/spec/features/projects/new_project_spec.rb +++ b/spec/features/projects/new_project_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'New project' do +RSpec.describe 'New project' do include Select2Helper context 'as a user' do diff --git a/spec/features/projects/pages_lets_encrypt_spec.rb b/spec/features/projects/pages_lets_encrypt_spec.rb index da9b191271a..302e9f5e533 100644 --- a/spec/features/projects/pages_lets_encrypt_spec.rb +++ b/spec/features/projects/pages_lets_encrypt_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'spec_helper' -describe "Pages with Let's Encrypt", :https_pages_enabled do +RSpec.describe "Pages with Let's Encrypt", :https_pages_enabled do include LetsEncryptHelpers let(:project) { create(:project, pages_https_only: false) } diff --git a/spec/features/projects/pages_spec.rb b/spec/features/projects/pages_spec.rb index faa2b3c9424..e1ace817c72 100644 --- a/spec/features/projects/pages_spec.rb +++ b/spec/features/projects/pages_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'spec_helper' -shared_examples 'pages settings editing' do +RSpec.shared_examples 'pages settings editing' do let_it_be(:project) { create(:project, pages_https_only: false) } let(:user) { create(:user) } let(:role) { :maintainer } @@ -394,7 +394,7 @@ shared_examples 'pages settings editing' do end end -describe 'Pages', :js do +RSpec.describe 'Pages', :js do include LetsEncryptHelpers context 'when editing normally' do diff --git a/spec/features/tags/developer_creates_tag_spec.rb b/spec/features/tags/developer_creates_tag_spec.rb index a2d53b04c9d..f982d403ce1 100644 --- a/spec/features/tags/developer_creates_tag_spec.rb +++ b/spec/features/tags/developer_creates_tag_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Developer creates tag' do +RSpec.describe 'Developer creates tag' do let(:user) { create(:user) } let(:group) { create(:group) } let(:project) { create(:project, :repository, namespace: group) } diff --git a/spec/features/tags/developer_deletes_tag_spec.rb b/spec/features/tags/developer_deletes_tag_spec.rb index 50eac8ddaed..de9296bc08e 100644 --- a/spec/features/tags/developer_deletes_tag_spec.rb +++ b/spec/features/tags/developer_deletes_tag_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Developer deletes tag' do +RSpec.describe 'Developer deletes tag' do let(:user) { create(:user) } let(:group) { create(:group) } let(:project) { create(:project, :repository, namespace: group) } diff --git a/spec/features/tags/developer_updates_tag_spec.rb b/spec/features/tags/developer_updates_tag_spec.rb index 167079c3f31..93a275131bd 100644 --- a/spec/features/tags/developer_updates_tag_spec.rb +++ b/spec/features/tags/developer_updates_tag_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Developer updates tag' do +RSpec.describe 'Developer updates tag' do let(:user) { create(:user) } let(:group) { create(:group) } let(:project) { create(:project, :repository, namespace: group) } diff --git a/spec/features/tags/developer_views_tags_spec.rb b/spec/features/tags/developer_views_tags_spec.rb index b892b2b4d12..4888611472c 100644 --- a/spec/features/tags/developer_views_tags_spec.rb +++ b/spec/features/tags/developer_views_tags_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Developer views tags' do +RSpec.describe 'Developer views tags' do let(:user) { create(:user) } let(:group) { create(:group) } diff --git a/spec/features/task_lists_spec.rb b/spec/features/task_lists_spec.rb index 24a183017c9..fa87c4bb1c4 100644 --- a/spec/features/task_lists_spec.rb +++ b/spec/features/task_lists_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Task Lists' do +RSpec.describe 'Task Lists' do include Warden::Test::Helpers let(:project) { create(:project, :public, :repository) } diff --git a/spec/features/triggers_spec.rb b/spec/features/triggers_spec.rb index af406961bbc..577134fe722 100644 --- a/spec/features/triggers_spec.rb +++ b/spec/features/triggers_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Triggers', :js do +RSpec.describe 'Triggers', :js do let(:trigger_title) { 'trigger desc' } let(:user) { create(:user) } let(:user2) { create(:user) } diff --git a/spec/features/u2f_spec.rb b/spec/features/u2f_spec.rb index 2cb4600ded0..8dbedc0a7ee 100644 --- a/spec/features/u2f_spec.rb +++ b/spec/features/u2f_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Using U2F (Universal 2nd Factor) Devices for Authentication', :js do +RSpec.describe 'Using U2F (Universal 2nd Factor) Devices for Authentication', :js do def manage_two_factor_authentication click_on 'Manage two-factor authentication' expect(page).to have_content("Set up new U2F device") diff --git a/spec/features/unsubscribe_links_spec.rb b/spec/features/unsubscribe_links_spec.rb index cf30776786b..966d90ab16b 100644 --- a/spec/features/unsubscribe_links_spec.rb +++ b/spec/features/unsubscribe_links_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Unsubscribe links', :sidekiq_might_not_need_inline do +RSpec.describe 'Unsubscribe links', :sidekiq_might_not_need_inline do include Warden::Test::Helpers let(:recipient) { create(:user) } diff --git a/spec/features/uploads/user_uploads_avatar_to_group_spec.rb b/spec/features/uploads/user_uploads_avatar_to_group_spec.rb index d9d9d7e4b04..8daa869a6e3 100644 --- a/spec/features/uploads/user_uploads_avatar_to_group_spec.rb +++ b/spec/features/uploads/user_uploads_avatar_to_group_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User uploads avatar to group' do +RSpec.describe 'User uploads avatar to group' do it 'they see the new avatar' do user = create(:user) group = create(:group) diff --git a/spec/features/uploads/user_uploads_avatar_to_profile_spec.rb b/spec/features/uploads/user_uploads_avatar_to_profile_spec.rb index fc31d7aa3d1..31e29810c65 100644 --- a/spec/features/uploads/user_uploads_avatar_to_profile_spec.rb +++ b/spec/features/uploads/user_uploads_avatar_to_profile_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User uploads avatar to profile' do +RSpec.describe 'User uploads avatar to profile' do let!(:user) { create(:user) } let(:avatar_file_path) { Rails.root.join('spec', 'fixtures', 'dk.png') } diff --git a/spec/features/uploads/user_uploads_file_to_note_spec.rb b/spec/features/uploads/user_uploads_file_to_note_spec.rb index 570ecad41fa..7f55ddc1d64 100644 --- a/spec/features/uploads/user_uploads_file_to_note_spec.rb +++ b/spec/features/uploads/user_uploads_file_to_note_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User uploads file to note' do +RSpec.describe 'User uploads file to note' do include DropzoneHelper let(:user) { create(:user) } diff --git a/spec/features/usage_stats_consent_spec.rb b/spec/features/usage_stats_consent_spec.rb index 14232b1b370..04bdf25acc0 100644 --- a/spec/features/usage_stats_consent_spec.rb +++ b/spec/features/usage_stats_consent_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Usage stats consent' do +RSpec.describe 'Usage stats consent' do context 'when signed in' do let(:user) { create(:admin, created_at: 8.days.ago) } let(:message) { 'To help improve GitLab, we would like to periodically collect usage information.' } diff --git a/spec/features/user_can_display_performance_bar_spec.rb b/spec/features/user_can_display_performance_bar_spec.rb index 8b3f193f418..9c67523f88f 100644 --- a/spec/features/user_can_display_performance_bar_spec.rb +++ b/spec/features/user_can_display_performance_bar_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User can display performance bar', :js do +RSpec.describe 'User can display performance bar', :js do shared_examples 'performance bar cannot be displayed' do it 'does not show the performance bar by default' do expect(page).not_to have_css('#js-peek') diff --git a/spec/features/user_opens_link_to_comment_spec.rb b/spec/features/user_opens_link_to_comment_spec.rb index 9533a4fe40d..ae84f69f432 100644 --- a/spec/features/user_opens_link_to_comment_spec.rb +++ b/spec/features/user_opens_link_to_comment_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User opens link to comment', :js do +RSpec.describe 'User opens link to comment', :js do let(:project) { create(:project, :public) } let(:note) { create(:note_on_issue, project: project) } diff --git a/spec/features/user_sees_revert_modal_spec.rb b/spec/features/user_sees_revert_modal_spec.rb index c0cffe885de..331f51dad95 100644 --- a/spec/features/user_sees_revert_modal_spec.rb +++ b/spec/features/user_sees_revert_modal_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Merge request > User sees revert modal', :js, :sidekiq_might_not_need_inline do +RSpec.describe 'Merge request > User sees revert modal', :js, :sidekiq_might_not_need_inline do let(:project) { create(:project, :public, :repository) } let(:user) { project.creator } let(:merge_request) { create(:merge_request, source_project: project) } diff --git a/spec/features/user_sorts_things_spec.rb b/spec/features/user_sorts_things_spec.rb index 8397854df27..6eaa620b538 100644 --- a/spec/features/user_sorts_things_spec.rb +++ b/spec/features/user_sorts_things_spec.rb @@ -6,7 +6,7 @@ require "spec_helper" # to check if the sorting option set by user is being kept persisted while going through pages. # The `it`s are named here by convention `starting point -> some pages -> final point`. # All those specs are moved out to this spec intentionally to keep them all in one place. -describe "User sorts things" do +RSpec.describe "User sorts things" do include Spec::Support::Helpers::Features::SortingHelpers include DashboardHelper diff --git a/spec/features/users/active_sessions_spec.rb b/spec/features/users/active_sessions_spec.rb index c717e89eafb..8e2e16e555e 100644 --- a/spec/features/users/active_sessions_spec.rb +++ b/spec/features/users/active_sessions_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Active user sessions', :clean_gitlab_redis_shared_state do +RSpec.describe 'Active user sessions', :clean_gitlab_redis_shared_state do it 'Successful login adds a new active user login' do now = Time.zone.parse('2018-03-12 09:06') Timecop.freeze(now) do diff --git a/spec/features/users/add_email_to_existing_account_spec.rb b/spec/features/users/add_email_to_existing_account_spec.rb index 42e352399a8..9130b96b0e3 100644 --- a/spec/features/users/add_email_to_existing_account_spec.rb +++ b/spec/features/users/add_email_to_existing_account_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'AdditionalEmailToExistingAccount' do +RSpec.describe 'AdditionalEmailToExistingAccount' do describe 'add secondary email associated with account' do let(:user) { create(:user) } diff --git a/spec/features/users/anonymous_sessions_spec.rb b/spec/features/users/anonymous_sessions_spec.rb index e87ee39a3f4..420fb225f94 100644 --- a/spec/features/users/anonymous_sessions_spec.rb +++ b/spec/features/users/anonymous_sessions_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Session TTLs', :clean_gitlab_redis_shared_state do +RSpec.describe 'Session TTLs', :clean_gitlab_redis_shared_state do it 'creates a session with a short TTL when login fails' do visit new_user_session_path # The session key only gets created after a post diff --git a/spec/features/users/login_spec.rb b/spec/features/users/login_spec.rb index 5a8db3c070d..7ba663d08d4 100644 --- a/spec/features/users/login_spec.rb +++ b/spec/features/users/login_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Login' do +RSpec.describe 'Login' do include TermsHelper include UserLoginHelper diff --git a/spec/features/users/logout_spec.rb b/spec/features/users/logout_spec.rb index a72a42c738d..ffb8785b277 100644 --- a/spec/features/users/logout_spec.rb +++ b/spec/features/users/logout_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Logout/Sign out', :js do +RSpec.describe 'Logout/Sign out', :js do let(:user) { create(:user) } before do diff --git a/spec/features/users/overview_spec.rb b/spec/features/users/overview_spec.rb index b3531d040e4..549087e5950 100644 --- a/spec/features/users/overview_spec.rb +++ b/spec/features/users/overview_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Overview tab on a user profile', :js do +RSpec.describe 'Overview tab on a user profile', :js do let(:user) { create(:user) } let(:contributed_project) { create(:project, :public, :repository) } diff --git a/spec/features/users/rss_spec.rb b/spec/features/users/rss_spec.rb index ecdbf032623..aba1ff63fab 100644 --- a/spec/features/users/rss_spec.rb +++ b/spec/features/users/rss_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User RSS' do +RSpec.describe 'User RSS' do let(:user) { create(:user) } let(:path) { user_path(create(:user)) } diff --git a/spec/features/users/show_spec.rb b/spec/features/users/show_spec.rb index a45389a7ed5..dd5c2442d00 100644 --- a/spec/features/users/show_spec.rb +++ b/spec/features/users/show_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'User page' do +RSpec.describe 'User page' do include ExternalAuthorizationServiceHelpers let(:user) { create(:user) } diff --git a/spec/features/users/signup_spec.rb b/spec/features/users/signup_spec.rb index 0ef86dde030..66a26493339 100644 --- a/spec/features/users/signup_spec.rb +++ b/spec/features/users/signup_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -shared_examples 'Signup' do +RSpec.shared_examples 'Signup' do include TermsHelper let(:new_user) { build_stubbed(:user) } @@ -420,7 +420,7 @@ shared_examples 'Signup' do end end -shared_examples 'Signup name validation' do |field, max_length| +RSpec.shared_examples 'Signup name validation' do |field, max_length| before do visit new_user_registration_path end @@ -458,7 +458,7 @@ shared_examples 'Signup name validation' do |field, max_length| end end -describe 'With original flow' do +RSpec.describe 'With original flow' do before do stub_experiment(signup_flow: false) stub_experiment_for_user(signup_flow: false) @@ -468,7 +468,7 @@ describe 'With original flow' do it_behaves_like 'Signup name validation', 'new_user_name', 255 end -describe 'With experimental flow' do +RSpec.describe 'With experimental flow' do before do stub_experiment(signup_flow: true) stub_experiment_for_user(signup_flow: true) diff --git a/spec/features/users/snippets_spec.rb b/spec/features/users/snippets_spec.rb index 8b6bf54b642..ce19e491a7c 100644 --- a/spec/features/users/snippets_spec.rb +++ b/spec/features/users/snippets_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Snippets tab on a user profile', :js do +RSpec.describe 'Snippets tab on a user profile', :js do context 'when the user has snippets' do let(:user) { create(:user) } diff --git a/spec/features/users/terms_spec.rb b/spec/features/users/terms_spec.rb index ec2210faa80..5275845fe5b 100644 --- a/spec/features/users/terms_spec.rb +++ b/spec/features/users/terms_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Users > Terms' do +RSpec.describe 'Users > Terms' do include TermsHelper let!(:term) { create(:term, terms: 'By accepting, you promise to be nice!') } diff --git a/spec/features/users/user_browses_projects_on_user_page_spec.rb b/spec/features/users/user_browses_projects_on_user_page_spec.rb index 9a1ee7715d6..7d05b2ae27a 100644 --- a/spec/features/users/user_browses_projects_on_user_page_spec.rb +++ b/spec/features/users/user_browses_projects_on_user_page_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Users > User browses projects on user page', :js do +RSpec.describe 'Users > User browses projects on user page', :js do let!(:user) { create :user } let!(:private_project) do create :project, :private, name: 'private', namespace: user.namespace do |project| diff --git a/spec/finders/abuse_reports_finder_spec.rb b/spec/finders/abuse_reports_finder_spec.rb index c84a645ca08..52620b3e421 100644 --- a/spec/finders/abuse_reports_finder_spec.rb +++ b/spec/finders/abuse_reports_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe AbuseReportsFinder, '#execute' do +RSpec.describe AbuseReportsFinder, '#execute' do let(:params) { {} } let!(:user1) { create(:user) } let!(:user2) { create(:user) } diff --git a/spec/finders/access_requests_finder_spec.rb b/spec/finders/access_requests_finder_spec.rb index fbfc8035bcc..f4fda1f3dd2 100644 --- a/spec/finders/access_requests_finder_spec.rb +++ b/spec/finders/access_requests_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe AccessRequestsFinder do +RSpec.describe AccessRequestsFinder do let(:user) { create(:user) } let(:access_requester) { create(:user) } diff --git a/spec/finders/admin/projects_finder_spec.rb b/spec/finders/admin/projects_finder_spec.rb index eb5d0bba183..03eb41ddfb6 100644 --- a/spec/finders/admin/projects_finder_spec.rb +++ b/spec/finders/admin/projects_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Admin::ProjectsFinder do +RSpec.describe Admin::ProjectsFinder do describe '#execute' do let(:user) { create(:user) } let(:group) { create(:group, :public) } diff --git a/spec/finders/alert_management/alerts_finder_spec.rb b/spec/finders/alert_management/alerts_finder_spec.rb index 1f7a78bd5e1..5920d579ba6 100644 --- a/spec/finders/alert_management/alerts_finder_spec.rb +++ b/spec/finders/alert_management/alerts_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe AlertManagement::AlertsFinder, '#execute' do +RSpec.describe AlertManagement::AlertsFinder, '#execute' do let_it_be(:current_user) { create(:user) } let_it_be(:project) { create(:project) } let_it_be(:alert_1) { create(:alert_management_alert, :all_fields, :resolved, project: project, ended_at: 1.year.ago, events: 2, severity: :high) } diff --git a/spec/finders/applications_finder_spec.rb b/spec/finders/applications_finder_spec.rb index 14d6b35cc27..dc615144b88 100644 --- a/spec/finders/applications_finder_spec.rb +++ b/spec/finders/applications_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ApplicationsFinder do +RSpec.describe ApplicationsFinder do let(:application1) { create(:application, name: 'some_application', owner: nil, redirect_uri: 'http://some_application.url', scopes: '') } let(:application2) { create(:application, name: 'another_application', owner: nil, redirect_uri: 'http://other_application.url', scopes: '') } diff --git a/spec/finders/autocomplete/acts_as_taggable_on/tags_finder_spec.rb b/spec/finders/autocomplete/acts_as_taggable_on/tags_finder_spec.rb index c4e6c9cc9f5..9e91de32d0b 100644 --- a/spec/finders/autocomplete/acts_as_taggable_on/tags_finder_spec.rb +++ b/spec/finders/autocomplete/acts_as_taggable_on/tags_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Autocomplete::ActsAsTaggableOn::TagsFinder do +RSpec.describe Autocomplete::ActsAsTaggableOn::TagsFinder do describe '#execute' do context 'with empty params' do it 'returns all tags' do diff --git a/spec/finders/autocomplete/group_finder_spec.rb b/spec/finders/autocomplete/group_finder_spec.rb index d7cb2c3bbe2..8cbb8cdbee8 100644 --- a/spec/finders/autocomplete/group_finder_spec.rb +++ b/spec/finders/autocomplete/group_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Autocomplete::GroupFinder do +RSpec.describe Autocomplete::GroupFinder do let(:user) { create(:user) } describe '#execute' do diff --git a/spec/finders/autocomplete/move_to_project_finder_spec.rb b/spec/finders/autocomplete/move_to_project_finder_spec.rb index f2da82bb9be..61328a5335a 100644 --- a/spec/finders/autocomplete/move_to_project_finder_spec.rb +++ b/spec/finders/autocomplete/move_to_project_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Autocomplete::MoveToProjectFinder do +RSpec.describe Autocomplete::MoveToProjectFinder do let_it_be(:user) { create(:user) } let_it_be(:project) { create(:project) } diff --git a/spec/finders/autocomplete/project_finder_spec.rb b/spec/finders/autocomplete/project_finder_spec.rb index 207d0598c28..0c9b4989ed1 100644 --- a/spec/finders/autocomplete/project_finder_spec.rb +++ b/spec/finders/autocomplete/project_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Autocomplete::ProjectFinder do +RSpec.describe Autocomplete::ProjectFinder do let(:user) { create(:user) } describe '#execute' do diff --git a/spec/finders/autocomplete/users_finder_spec.rb b/spec/finders/autocomplete/users_finder_spec.rb index 5d340c46114..357b6dfcea2 100644 --- a/spec/finders/autocomplete/users_finder_spec.rb +++ b/spec/finders/autocomplete/users_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Autocomplete::UsersFinder do +RSpec.describe Autocomplete::UsersFinder do describe '#execute' do let!(:user1) { create(:user, username: 'johndoe') } let!(:user2) { create(:user, :blocked, username: 'notsorandom') } diff --git a/spec/finders/award_emojis_finder_spec.rb b/spec/finders/award_emojis_finder_spec.rb index 975722e780b..7a75ad716d0 100644 --- a/spec/finders/award_emojis_finder_spec.rb +++ b/spec/finders/award_emojis_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe AwardEmojisFinder do +RSpec.describe AwardEmojisFinder do let_it_be(:issue_1) { create(:issue) } let_it_be(:issue_1_thumbsup) { create(:award_emoji, name: 'thumbsup', awardable: issue_1) } let_it_be(:issue_1_thumbsdown) { create(:award_emoji, name: 'thumbsdown', awardable: issue_1) } diff --git a/spec/finders/boards/visits_finder_spec.rb b/spec/finders/boards/visits_finder_spec.rb index 7e3ad8aa9f0..3811c99cc59 100644 --- a/spec/finders/boards/visits_finder_spec.rb +++ b/spec/finders/boards/visits_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Boards::VisitsFinder do +RSpec.describe Boards::VisitsFinder do describe '#latest' do let(:user) { create(:user) } diff --git a/spec/finders/branches_finder_spec.rb b/spec/finders/branches_finder_spec.rb index 5f75ff8c6ff..2e52093342d 100644 --- a/spec/finders/branches_finder_spec.rb +++ b/spec/finders/branches_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe BranchesFinder do +RSpec.describe BranchesFinder do let(:user) { create(:user) } let(:project) { create(:project, :repository) } let(:repository) { project.repository } diff --git a/spec/finders/ci/daily_build_group_report_results_finder_spec.rb b/spec/finders/ci/daily_build_group_report_results_finder_spec.rb index e7b11bef787..bdb0bc9b561 100644 --- a/spec/finders/ci/daily_build_group_report_results_finder_spec.rb +++ b/spec/finders/ci/daily_build_group_report_results_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::DailyBuildGroupReportResultsFinder do +RSpec.describe Ci::DailyBuildGroupReportResultsFinder do describe '#execute' do let(:project) { create(:project, :private) } let(:ref_path) { 'refs/heads/master' } diff --git a/spec/finders/ci/job_artifacts_finder_spec.rb b/spec/finders/ci/job_artifacts_finder_spec.rb index 3e701ba87fa..74875ab8b06 100644 --- a/spec/finders/ci/job_artifacts_finder_spec.rb +++ b/spec/finders/ci/job_artifacts_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::JobArtifactsFinder do +RSpec.describe Ci::JobArtifactsFinder do let(:project) { create(:project) } describe '#execute' do diff --git a/spec/finders/ci/jobs_finder_spec.rb b/spec/finders/ci/jobs_finder_spec.rb index 7083e8fbf43..e6680afa15c 100644 --- a/spec/finders/ci/jobs_finder_spec.rb +++ b/spec/finders/ci/jobs_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::JobsFinder, '#execute' do +RSpec.describe Ci::JobsFinder, '#execute' do let_it_be(:user) { create(:user) } let_it_be(:admin) { create(:user, :admin) } let_it_be(:project) { create(:project, :private, public_builds: false) } diff --git a/spec/finders/ci/pipeline_schedules_finder_spec.rb b/spec/finders/ci/pipeline_schedules_finder_spec.rb index 5b5154ce834..57842bbecd7 100644 --- a/spec/finders/ci/pipeline_schedules_finder_spec.rb +++ b/spec/finders/ci/pipeline_schedules_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::PipelineSchedulesFinder do +RSpec.describe Ci::PipelineSchedulesFinder do let(:project) { create(:project) } let!(:active_schedule) { create(:ci_pipeline_schedule, project: project) } diff --git a/spec/finders/ci/pipelines_finder_spec.rb b/spec/finders/ci/pipelines_finder_spec.rb index 6528093731e..680955ff9f9 100644 --- a/spec/finders/ci/pipelines_finder_spec.rb +++ b/spec/finders/ci/pipelines_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::PipelinesFinder do +RSpec.describe Ci::PipelinesFinder do let(:project) { create(:project, :public, :repository) } let(:current_user) { nil } let(:params) { {} } diff --git a/spec/finders/ci/pipelines_for_merge_request_finder_spec.rb b/spec/finders/ci/pipelines_for_merge_request_finder_spec.rb index c49ac487519..543c289d366 100644 --- a/spec/finders/ci/pipelines_for_merge_request_finder_spec.rb +++ b/spec/finders/ci/pipelines_for_merge_request_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::PipelinesForMergeRequestFinder do +RSpec.describe Ci::PipelinesForMergeRequestFinder do describe '#all' do let(:merge_request) { create(:merge_request) } let(:project) { merge_request.source_project } diff --git a/spec/finders/ci/runner_jobs_finder_spec.rb b/spec/finders/ci/runner_jobs_finder_spec.rb index a3245119291..7c9f762c000 100644 --- a/spec/finders/ci/runner_jobs_finder_spec.rb +++ b/spec/finders/ci/runner_jobs_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::RunnerJobsFinder do +RSpec.describe Ci::RunnerJobsFinder do let(:project) { create(:project) } let(:runner) { create(:ci_runner, :instance) } diff --git a/spec/finders/ci/runners_finder_spec.rb b/spec/finders/ci/runners_finder_spec.rb index 0c319d8cc0f..d4795d786bc 100644 --- a/spec/finders/ci/runners_finder_spec.rb +++ b/spec/finders/ci/runners_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::RunnersFinder do +RSpec.describe Ci::RunnersFinder do context 'admin' do let_it_be(:admin) { create(:user, :admin) } diff --git a/spec/finders/cluster_ancestors_finder_spec.rb b/spec/finders/cluster_ancestors_finder_spec.rb index 4aedb41d446..ea1dbea4cfe 100644 --- a/spec/finders/cluster_ancestors_finder_spec.rb +++ b/spec/finders/cluster_ancestors_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ClusterAncestorsFinder, '#execute' do +RSpec.describe ClusterAncestorsFinder, '#execute' do let(:group) { create(:group) } let(:project) { create(:project, group: group) } let(:user) { create(:user) } diff --git a/spec/finders/clusters/knative_services_finder_spec.rb b/spec/finders/clusters/knative_services_finder_spec.rb index 57dbead7921..c61fac27bd9 100644 --- a/spec/finders/clusters/knative_services_finder_spec.rb +++ b/spec/finders/clusters/knative_services_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Clusters::KnativeServicesFinder do +RSpec.describe Clusters::KnativeServicesFinder do include KubernetesHelpers include ReactiveCachingHelpers diff --git a/spec/finders/clusters_finder_spec.rb b/spec/finders/clusters_finder_spec.rb index 3bad88573f7..fc6616f4a28 100644 --- a/spec/finders/clusters_finder_spec.rb +++ b/spec/finders/clusters_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ClustersFinder do +RSpec.describe ClustersFinder do let(:project) { create(:project) } let_it_be(:user) { create(:user) } diff --git a/spec/finders/concerns/finder_methods_spec.rb b/spec/finders/concerns/finder_methods_spec.rb index 2e44df8b044..3e299c93eda 100644 --- a/spec/finders/concerns/finder_methods_spec.rb +++ b/spec/finders/concerns/finder_methods_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe FinderMethods do +RSpec.describe FinderMethods do let(:finder_class) do Class.new do include FinderMethods diff --git a/spec/finders/concerns/finder_with_cross_project_access_spec.rb b/spec/finders/concerns/finder_with_cross_project_access_spec.rb index d11d4da25a8..116b523bd99 100644 --- a/spec/finders/concerns/finder_with_cross_project_access_spec.rb +++ b/spec/finders/concerns/finder_with_cross_project_access_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe FinderWithCrossProjectAccess do +RSpec.describe FinderWithCrossProjectAccess do let(:finder_class) do Class.new do prepend FinderWithCrossProjectAccess diff --git a/spec/finders/container_repositories_finder_spec.rb b/spec/finders/container_repositories_finder_spec.rb index d0c91a8f734..b6305e3f5b7 100644 --- a/spec/finders/container_repositories_finder_spec.rb +++ b/spec/finders/container_repositories_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ContainerRepositoriesFinder do +RSpec.describe ContainerRepositoriesFinder do let_it_be(:reporter) { create(:user) } let_it_be(:guest) { create(:user) } diff --git a/spec/finders/context_commits_finder_spec.rb b/spec/finders/context_commits_finder_spec.rb index 13cfa32ecfc..95c685aea24 100644 --- a/spec/finders/context_commits_finder_spec.rb +++ b/spec/finders/context_commits_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ContextCommitsFinder do +RSpec.describe ContextCommitsFinder do describe "#execute" do let(:project) { create(:project, :repository) } let(:merge_request) { create(:merge_request) } diff --git a/spec/finders/contributed_projects_finder_spec.rb b/spec/finders/contributed_projects_finder_spec.rb index 1d907261fe9..86d3e7f8f19 100644 --- a/spec/finders/contributed_projects_finder_spec.rb +++ b/spec/finders/contributed_projects_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ContributedProjectsFinder do +RSpec.describe ContributedProjectsFinder do let(:source_user) { create(:user) } let(:current_user) { create(:user) } diff --git a/spec/finders/deployments_finder_spec.rb b/spec/finders/deployments_finder_spec.rb index b20c7e5a8a5..e4e0f366eeb 100644 --- a/spec/finders/deployments_finder_spec.rb +++ b/spec/finders/deployments_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe DeploymentsFinder do +RSpec.describe DeploymentsFinder do subject { described_class.new(project, params).execute } let(:project) { create(:project, :public, :test_repo) } diff --git a/spec/finders/design_management/designs_finder_spec.rb b/spec/finders/design_management/designs_finder_spec.rb index 04bd0ad0a45..696327cc49c 100644 --- a/spec/finders/design_management/designs_finder_spec.rb +++ b/spec/finders/design_management/designs_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe DesignManagement::DesignsFinder do +RSpec.describe DesignManagement::DesignsFinder do include DesignManagementTestHelpers let_it_be(:user) { create(:user) } diff --git a/spec/finders/design_management/versions_finder_spec.rb b/spec/finders/design_management/versions_finder_spec.rb index 11d53d0d630..6a56ccb10b8 100644 --- a/spec/finders/design_management/versions_finder_spec.rb +++ b/spec/finders/design_management/versions_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe DesignManagement::VersionsFinder do +RSpec.describe DesignManagement::VersionsFinder do include DesignManagementTestHelpers let_it_be(:user) { create(:user) } diff --git a/spec/finders/environments_finder_spec.rb b/spec/finders/environments_finder_spec.rb index 66e404f5236..fd714ab9a8f 100644 --- a/spec/finders/environments_finder_spec.rb +++ b/spec/finders/environments_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe EnvironmentsFinder do +RSpec.describe EnvironmentsFinder do let(:project) { create(:project, :repository) } let(:user) { project.creator } let(:environment) { create(:environment, :available, project: project) } diff --git a/spec/finders/events_finder_spec.rb b/spec/finders/events_finder_spec.rb index 037377cf756..45a049f9442 100644 --- a/spec/finders/events_finder_spec.rb +++ b/spec/finders/events_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe EventsFinder do +RSpec.describe EventsFinder do let_it_be(:user) { create(:user) } let(:other_user) { create(:user) } diff --git a/spec/finders/fork_projects_finder_spec.rb b/spec/finders/fork_projects_finder_spec.rb index 02ce17ac907..9e58378b953 100644 --- a/spec/finders/fork_projects_finder_spec.rb +++ b/spec/finders/fork_projects_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ForkProjectsFinder do +RSpec.describe ForkProjectsFinder do include ProjectForksHelper let(:source_project) { create(:project, :public, :empty_repo) } diff --git a/spec/finders/fork_targets_finder_spec.rb b/spec/finders/fork_targets_finder_spec.rb index f8c03cdf9b3..3c66f4e5757 100644 --- a/spec/finders/fork_targets_finder_spec.rb +++ b/spec/finders/fork_targets_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ForkTargetsFinder do +RSpec.describe ForkTargetsFinder do subject(:finder) { described_class.new(project, user) } let(:project) { create(:project, namespace: create(:group)) } diff --git a/spec/finders/freeze_periods_finder_spec.rb b/spec/finders/freeze_periods_finder_spec.rb index 4ff356b85b7..53cc07d91b0 100644 --- a/spec/finders/freeze_periods_finder_spec.rb +++ b/spec/finders/freeze_periods_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe FreezePeriodsFinder do +RSpec.describe FreezePeriodsFinder do subject(:finder) { described_class.new(project, user).execute } let(:project) { create(:project, :private) } diff --git a/spec/finders/group_descendants_finder_spec.rb b/spec/finders/group_descendants_finder_spec.rb index a08772c6e7e..77ef546e083 100644 --- a/spec/finders/group_descendants_finder_spec.rb +++ b/spec/finders/group_descendants_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe GroupDescendantsFinder do +RSpec.describe GroupDescendantsFinder do let(:user) { create(:user) } let(:group) { create(:group) } let(:params) { {} } diff --git a/spec/finders/group_labels_finder_spec.rb b/spec/finders/group_labels_finder_spec.rb index 7bdd312eff0..d65a8fb4fed 100644 --- a/spec/finders/group_labels_finder_spec.rb +++ b/spec/finders/group_labels_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe GroupLabelsFinder, '#execute' do +RSpec.describe GroupLabelsFinder, '#execute' do let!(:group) { create(:group) } let!(:user) { create(:user) } let!(:label1) { create(:group_label, title: 'Foo', description: 'Lorem ipsum', group: group) } diff --git a/spec/finders/group_members_finder_spec.rb b/spec/finders/group_members_finder_spec.rb index d1d97f6f9f0..68b120db227 100644 --- a/spec/finders/group_members_finder_spec.rb +++ b/spec/finders/group_members_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe GroupMembersFinder, '#execute' do +RSpec.describe GroupMembersFinder, '#execute' do let(:group) { create(:group) } let(:nested_group) { create(:group, parent: group) } let(:deeper_nested_group) { create(:group, parent: nested_group) } diff --git a/spec/finders/group_projects_finder_spec.rb b/spec/finders/group_projects_finder_spec.rb index 89fc1e380dc..7499461ad8f 100644 --- a/spec/finders/group_projects_finder_spec.rb +++ b/spec/finders/group_projects_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe GroupProjectsFinder do +RSpec.describe GroupProjectsFinder do include_context 'GroupProjectsFinder context' subject { finder.execute } diff --git a/spec/finders/groups_finder_spec.rb b/spec/finders/groups_finder_spec.rb index b02bb4e0b8c..78764f79a6c 100644 --- a/spec/finders/groups_finder_spec.rb +++ b/spec/finders/groups_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe GroupsFinder do +RSpec.describe GroupsFinder do describe '#execute' do let(:user) { create(:user) } diff --git a/spec/finders/issues_finder_spec.rb b/spec/finders/issues_finder_spec.rb index 7493fafb5cc..672318c292e 100644 --- a/spec/finders/issues_finder_spec.rb +++ b/spec/finders/issues_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe IssuesFinder do +RSpec.describe IssuesFinder do include_context 'IssuesFinder context' describe '#execute' do diff --git a/spec/finders/joined_groups_finder_spec.rb b/spec/finders/joined_groups_finder_spec.rb index b01bd44470a..8f826ef67ec 100644 --- a/spec/finders/joined_groups_finder_spec.rb +++ b/spec/finders/joined_groups_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe JoinedGroupsFinder do +RSpec.describe JoinedGroupsFinder do describe '#execute' do let!(:profile_owner) { create(:user) } let!(:profile_visitor) { create(:user) } diff --git a/spec/finders/keys_finder_spec.rb b/spec/finders/keys_finder_spec.rb index bae4a542484..277c852c953 100644 --- a/spec/finders/keys_finder_spec.rb +++ b/spec/finders/keys_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe KeysFinder do +RSpec.describe KeysFinder do subject { described_class.new(params).execute } let(:user) { create(:user) } diff --git a/spec/finders/labels_finder_spec.rb b/spec/finders/labels_finder_spec.rb index edb6e183903..851b9e64db6 100644 --- a/spec/finders/labels_finder_spec.rb +++ b/spec/finders/labels_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe LabelsFinder do +RSpec.describe LabelsFinder do describe '#execute' do let_it_be(:group_1) { create(:group) } let_it_be(:group_2) { create(:group) } diff --git a/spec/finders/license_template_finder_spec.rb b/spec/finders/license_template_finder_spec.rb index 183ee67d801..93f13632b6f 100644 --- a/spec/finders/license_template_finder_spec.rb +++ b/spec/finders/license_template_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe LicenseTemplateFinder do +RSpec.describe LicenseTemplateFinder do describe '#execute' do subject(:result) { described_class.new(nil, params).execute } diff --git a/spec/finders/members_finder_spec.rb b/spec/finders/members_finder_spec.rb index d77548c6fd0..b14ad84a96e 100644 --- a/spec/finders/members_finder_spec.rb +++ b/spec/finders/members_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe MembersFinder, '#execute' do +RSpec.describe MembersFinder, '#execute' do let_it_be(:group) { create(:group) } let_it_be(:nested_group) { create(:group, parent: group) } let_it_be(:project, reload: true) { create(:project, namespace: nested_group) } diff --git a/spec/finders/merge_request_target_project_finder_spec.rb b/spec/finders/merge_request_target_project_finder_spec.rb index 4d2e4c5318c..dfb4d86fbb6 100644 --- a/spec/finders/merge_request_target_project_finder_spec.rb +++ b/spec/finders/merge_request_target_project_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe MergeRequestTargetProjectFinder do +RSpec.describe MergeRequestTargetProjectFinder do include ProjectForksHelper let(:user) { create(:user) } diff --git a/spec/finders/merge_requests_finder_spec.rb b/spec/finders/merge_requests_finder_spec.rb index 7eb3d8b67a9..f76110e3d85 100644 --- a/spec/finders/merge_requests_finder_spec.rb +++ b/spec/finders/merge_requests_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe MergeRequestsFinder do +RSpec.describe MergeRequestsFinder do context "multiple projects with merge requests" do include_context 'MergeRequestsFinder multiple projects with merge requests context' diff --git a/spec/finders/metrics/dashboards/annotations_finder_spec.rb b/spec/finders/metrics/dashboards/annotations_finder_spec.rb index 222875ba2e2..223fd2c047c 100644 --- a/spec/finders/metrics/dashboards/annotations_finder_spec.rb +++ b/spec/finders/metrics/dashboards/annotations_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Metrics::Dashboards::AnnotationsFinder do +RSpec.describe Metrics::Dashboards::AnnotationsFinder do describe '#execute' do subject(:annotations) { described_class.new(dashboard: dashboard, params: params).execute } diff --git a/spec/finders/metrics/users_starred_dashboards_finder_spec.rb b/spec/finders/metrics/users_starred_dashboards_finder_spec.rb index c32b8c2d335..61dadb5239c 100644 --- a/spec/finders/metrics/users_starred_dashboards_finder_spec.rb +++ b/spec/finders/metrics/users_starred_dashboards_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Metrics::UsersStarredDashboardsFinder do +RSpec.describe Metrics::UsersStarredDashboardsFinder do describe '#execute' do subject(:starred_dashboards) { described_class.new(user: user, project: project, params: params).execute } diff --git a/spec/finders/milestones_finder_spec.rb b/spec/finders/milestones_finder_spec.rb index 3402eb39b3b..5920c185c64 100644 --- a/spec/finders/milestones_finder_spec.rb +++ b/spec/finders/milestones_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe MilestonesFinder do +RSpec.describe MilestonesFinder do let(:now) { Time.now } let(:group) { create(:group) } let(:project_1) { create(:project, namespace: group) } diff --git a/spec/finders/notes_finder_spec.rb b/spec/finders/notes_finder_spec.rb index 44636a22ef9..5610f5889e6 100644 --- a/spec/finders/notes_finder_spec.rb +++ b/spec/finders/notes_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe NotesFinder do +RSpec.describe NotesFinder do let(:user) { create :user } let(:project) { create(:project) } diff --git a/spec/finders/pending_todos_finder_spec.rb b/spec/finders/pending_todos_finder_spec.rb index b41b1b46a93..10d3c2905be 100644 --- a/spec/finders/pending_todos_finder_spec.rb +++ b/spec/finders/pending_todos_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe PendingTodosFinder do +RSpec.describe PendingTodosFinder do let(:user) { create(:user) } describe '#execute' do diff --git a/spec/finders/personal_access_tokens_finder_spec.rb b/spec/finders/personal_access_tokens_finder_spec.rb index ce8ef80bb99..dde4f010e41 100644 --- a/spec/finders/personal_access_tokens_finder_spec.rb +++ b/spec/finders/personal_access_tokens_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe PersonalAccessTokensFinder do +RSpec.describe PersonalAccessTokensFinder do def finder(options = {}) described_class.new(options) end diff --git a/spec/finders/personal_projects_finder_spec.rb b/spec/finders/personal_projects_finder_spec.rb index 7686dd3dc9d..62e9999fdd6 100644 --- a/spec/finders/personal_projects_finder_spec.rb +++ b/spec/finders/personal_projects_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe PersonalProjectsFinder do +RSpec.describe PersonalProjectsFinder do let(:source_user) { create(:user) } let(:current_user) { create(:user) } let(:finder) { described_class.new(source_user) } diff --git a/spec/finders/projects/export_job_finder_spec.rb b/spec/finders/projects/export_job_finder_spec.rb index 31b68717d13..1cc39e35e4d 100644 --- a/spec/finders/projects/export_job_finder_spec.rb +++ b/spec/finders/projects/export_job_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Projects::ExportJobFinder do +RSpec.describe Projects::ExportJobFinder do let(:project) { create(:project) } let(:project_export_job1) { create(:project_export_job, project: project) } let(:project_export_job2) { create(:project_export_job, project: project) } diff --git a/spec/finders/projects/prometheus/alerts_finder_spec.rb b/spec/finders/projects/prometheus/alerts_finder_spec.rb index bb59e77cca8..f47f8addbe9 100644 --- a/spec/finders/projects/prometheus/alerts_finder_spec.rb +++ b/spec/finders/projects/prometheus/alerts_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Projects::Prometheus::AlertsFinder do +RSpec.describe Projects::Prometheus::AlertsFinder do let(:finder) { described_class.new(params) } let(:params) { {} } diff --git a/spec/finders/projects/serverless/functions_finder_spec.rb b/spec/finders/projects/serverless/functions_finder_spec.rb index 1f0e3cd2eda..3d3e4183d4e 100644 --- a/spec/finders/projects/serverless/functions_finder_spec.rb +++ b/spec/finders/projects/serverless/functions_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Projects::Serverless::FunctionsFinder do +RSpec.describe Projects::Serverless::FunctionsFinder do include KubernetesHelpers include PrometheusHelpers include ReactiveCachingHelpers diff --git a/spec/finders/projects_finder_spec.rb b/spec/finders/projects_finder_spec.rb index 379cbe83a08..929927ec1c4 100644 --- a/spec/finders/projects_finder_spec.rb +++ b/spec/finders/projects_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ProjectsFinder, :do_not_mock_admin_mode do +RSpec.describe ProjectsFinder, :do_not_mock_admin_mode do include AdminModeHelper describe '#execute' do diff --git a/spec/finders/prometheus_metrics_finder_spec.rb b/spec/finders/prometheus_metrics_finder_spec.rb index 41b2e700e1e..10ef9f76637 100644 --- a/spec/finders/prometheus_metrics_finder_spec.rb +++ b/spec/finders/prometheus_metrics_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe PrometheusMetricsFinder do +RSpec.describe PrometheusMetricsFinder do describe '#execute' do let(:finder) { described_class.new(params) } let(:params) { {} } diff --git a/spec/finders/protected_branches_finder_spec.rb b/spec/finders/protected_branches_finder_spec.rb index c6b9964b6c5..487d1be697a 100644 --- a/spec/finders/protected_branches_finder_spec.rb +++ b/spec/finders/protected_branches_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ProtectedBranchesFinder do +RSpec.describe ProtectedBranchesFinder do let(:project) { create(:project) } let!(:protected_branch) { create(:protected_branch, project: project) } let!(:another_protected_branch) { create(:protected_branch, project: project) } diff --git a/spec/finders/releases_finder_spec.rb b/spec/finders/releases_finder_spec.rb index cb4e5fed816..3dc01570d64 100644 --- a/spec/finders/releases_finder_spec.rb +++ b/spec/finders/releases_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ReleasesFinder do +RSpec.describe ReleasesFinder do let(:user) { create(:user) } let(:project) { create(:project, :repository) } let(:params) { {} } diff --git a/spec/finders/resource_milestone_event_finder_spec.rb b/spec/finders/resource_milestone_event_finder_spec.rb index fa7fda37849..ff4508996e2 100644 --- a/spec/finders/resource_milestone_event_finder_spec.rb +++ b/spec/finders/resource_milestone_event_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ResourceMilestoneEventFinder do +RSpec.describe ResourceMilestoneEventFinder do let_it_be(:user) { create(:user) } let_it_be(:issue_project) { create(:project) } let_it_be(:issue) { create(:issue, project: issue_project) } diff --git a/spec/finders/sentry_issue_finder_spec.rb b/spec/finders/sentry_issue_finder_spec.rb index 520f690a134..b6d62965cb9 100644 --- a/spec/finders/sentry_issue_finder_spec.rb +++ b/spec/finders/sentry_issue_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe SentryIssueFinder do +RSpec.describe SentryIssueFinder do let(:user) { create(:user) } let(:project) { create(:project, :repository) } let(:issue) { create(:issue, project: project) } diff --git a/spec/finders/serverless_domain_finder_spec.rb b/spec/finders/serverless_domain_finder_spec.rb index c41f09535d3..4e6b9f07544 100644 --- a/spec/finders/serverless_domain_finder_spec.rb +++ b/spec/finders/serverless_domain_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe ServerlessDomainFinder do +RSpec.describe ServerlessDomainFinder do let(:function_name) { 'test-function' } let(:pages_domain_name) { 'serverless.gitlab.io' } let(:valid_cluster_uuid) { 'aba1cdef123456f278' } diff --git a/spec/finders/snippets_finder_spec.rb b/spec/finders/snippets_finder_spec.rb index fdcc73f6e92..0affc832b30 100644 --- a/spec/finders/snippets_finder_spec.rb +++ b/spec/finders/snippets_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe SnippetsFinder do +RSpec.describe SnippetsFinder do include ExternalAuthorizationServiceHelpers include Gitlab::Allowable diff --git a/spec/finders/starred_projects_finder_spec.rb b/spec/finders/starred_projects_finder_spec.rb index 7aa8251c3ab..15d4ae52ddd 100644 --- a/spec/finders/starred_projects_finder_spec.rb +++ b/spec/finders/starred_projects_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe StarredProjectsFinder do +RSpec.describe StarredProjectsFinder do let(:project1) { create(:project, :public, :empty_repo) } let(:project2) { create(:project, :public, :empty_repo) } let(:other_project) { create(:project, :public, :empty_repo) } diff --git a/spec/finders/tags_finder_spec.rb b/spec/finders/tags_finder_spec.rb index b9de2d29895..08978a32e50 100644 --- a/spec/finders/tags_finder_spec.rb +++ b/spec/finders/tags_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe TagsFinder do +RSpec.describe TagsFinder do let(:user) { create(:user) } let(:project) { create(:project, :repository) } let(:repository) { project.repository } diff --git a/spec/finders/template_finder_spec.rb b/spec/finders/template_finder_spec.rb index ed47752cf60..34f81e249e2 100644 --- a/spec/finders/template_finder_spec.rb +++ b/spec/finders/template_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe TemplateFinder do +RSpec.describe TemplateFinder do using RSpec::Parameterized::TableSyntax describe '#build' do diff --git a/spec/finders/todos_finder_spec.rb b/spec/finders/todos_finder_spec.rb index 87650835b05..4123783d828 100644 --- a/spec/finders/todos_finder_spec.rb +++ b/spec/finders/todos_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe TodosFinder do +RSpec.describe TodosFinder do describe '#execute' do let(:user) { create(:user) } let(:group) { create(:group) } diff --git a/spec/finders/uploader_finder_spec.rb b/spec/finders/uploader_finder_spec.rb index bb6d83289ef..814d4b88b57 100644 --- a/spec/finders/uploader_finder_spec.rb +++ b/spec/finders/uploader_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe UploaderFinder do +RSpec.describe UploaderFinder do describe '#execute' do let(:project) { build(:project) } let(:upload) { create(:upload, :issuable_upload, :with_file) } diff --git a/spec/finders/user_finder_spec.rb b/spec/finders/user_finder_spec.rb index b89b422aa2c..e9ba2f48164 100644 --- a/spec/finders/user_finder_spec.rb +++ b/spec/finders/user_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe UserFinder do +RSpec.describe UserFinder do let_it_be(:user) { create(:user) } describe '#find_by_id' do diff --git a/spec/finders/user_recent_events_finder_spec.rb b/spec/finders/user_recent_events_finder_spec.rb index eef6448a4a2..04ba05c68e4 100644 --- a/spec/finders/user_recent_events_finder_spec.rb +++ b/spec/finders/user_recent_events_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe UserRecentEventsFinder do +RSpec.describe UserRecentEventsFinder do let(:current_user) { create(:user) } let(:project_owner) { create(:user) } let(:private_project) { create(:project, :private, creator: project_owner) } diff --git a/spec/finders/users_finder_spec.rb b/spec/finders/users_finder_spec.rb index 67c97511c3e..17b36247b05 100644 --- a/spec/finders/users_finder_spec.rb +++ b/spec/finders/users_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe UsersFinder do +RSpec.describe UsersFinder do describe '#execute' do include_context 'UsersFinder#execute filter by project context' diff --git a/spec/finders/users_star_projects_finder_spec.rb b/spec/finders/users_star_projects_finder_spec.rb index fb1d8088f44..038506cc93f 100644 --- a/spec/finders/users_star_projects_finder_spec.rb +++ b/spec/finders/users_star_projects_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe UsersStarProjectsFinder do +RSpec.describe UsersStarProjectsFinder do let(:project) { create(:project, :public, :empty_repo) } let(:user) { create(:user) } diff --git a/spec/finders/users_with_pending_todos_finder_spec.rb b/spec/finders/users_with_pending_todos_finder_spec.rb index fa15355531c..565b65fbefe 100644 --- a/spec/finders/users_with_pending_todos_finder_spec.rb +++ b/spec/finders/users_with_pending_todos_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe UsersWithPendingTodosFinder do +RSpec.describe UsersWithPendingTodosFinder do describe '#execute' do it 'returns the users for all pending todos of a target' do issue = create(:issue) diff --git a/spec/fixtures/api/schemas/entities/merge_request_noteable.json b/spec/fixtures/api/schemas/entities/merge_request_noteable.json index c0eb320e67f..4ef19ed32c2 100644 --- a/spec/fixtures/api/schemas/entities/merge_request_noteable.json +++ b/spec/fixtures/api/schemas/entities/merge_request_noteable.json @@ -32,7 +32,8 @@ }, "is_project_archived": { "type": "boolean" }, "locked_discussion_docs_path": { "type": "string" }, - "archived_project_docs_path": { "type": "string" } + "archived_project_docs_path": { "type": "string" }, + "project_id": { "type": "integer"} }, "additionalProperties": false } diff --git a/spec/frontend/fixtures/abuse_reports.rb b/spec/frontend/fixtures/abuse_reports.rb index 712ed2e8d7e..48b055fcda5 100644 --- a/spec/frontend/fixtures/abuse_reports.rb +++ b/spec/frontend/fixtures/abuse_reports.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Admin::AbuseReportsController, '(JavaScript fixtures)', type: :controller do +RSpec.describe Admin::AbuseReportsController, '(JavaScript fixtures)', type: :controller do include JavaScriptFixturesHelpers let(:admin) { create(:admin) } diff --git a/spec/frontend/fixtures/admin_users.rb b/spec/frontend/fixtures/admin_users.rb index b0f7d69f091..f068ada53e1 100644 --- a/spec/frontend/fixtures/admin_users.rb +++ b/spec/frontend/fixtures/admin_users.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Admin::UsersController, '(JavaScript fixtures)', type: :controller do +RSpec.describe Admin::UsersController, '(JavaScript fixtures)', type: :controller do include StubENV include JavaScriptFixturesHelpers diff --git a/spec/frontend/fixtures/application_settings.rb b/spec/frontend/fixtures/application_settings.rb index a16888d8f03..6156e6a43bc 100644 --- a/spec/frontend/fixtures/application_settings.rb +++ b/spec/frontend/fixtures/application_settings.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Admin::ApplicationSettingsController, '(JavaScript fixtures)', type: :controller do +RSpec.describe Admin::ApplicationSettingsController, '(JavaScript fixtures)', type: :controller do include StubENV include JavaScriptFixturesHelpers diff --git a/spec/frontend/fixtures/autocomplete_sources.rb b/spec/frontend/fixtures/autocomplete_sources.rb index 812364c8b06..8858d69a939 100644 --- a/spec/frontend/fixtures/autocomplete_sources.rb +++ b/spec/frontend/fixtures/autocomplete_sources.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Projects::AutocompleteSourcesController, '(JavaScript fixtures)', type: :controller do +RSpec.describe Projects::AutocompleteSourcesController, '(JavaScript fixtures)', type: :controller do include JavaScriptFixturesHelpers let_it_be(:admin) { create(:admin) } diff --git a/spec/frontend/fixtures/blob.rb b/spec/frontend/fixtures/blob.rb index 28a3badaa17..712c3bd9b23 100644 --- a/spec/frontend/fixtures/blob.rb +++ b/spec/frontend/fixtures/blob.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Projects::BlobController, '(JavaScript fixtures)', type: :controller do +RSpec.describe Projects::BlobController, '(JavaScript fixtures)', type: :controller do include JavaScriptFixturesHelpers let(:admin) { create(:admin) } diff --git a/spec/frontend/fixtures/boards.rb b/spec/frontend/fixtures/boards.rb index b3c7865a088..90e2ca4db63 100644 --- a/spec/frontend/fixtures/boards.rb +++ b/spec/frontend/fixtures/boards.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Projects::BoardsController, '(JavaScript fixtures)', type: :controller do +RSpec.describe Projects::BoardsController, '(JavaScript fixtures)', type: :controller do include JavaScriptFixturesHelpers let(:admin) { create(:admin) } diff --git a/spec/frontend/fixtures/branches.rb b/spec/frontend/fixtures/branches.rb index 2dc8cde625a..4667dfb69f8 100644 --- a/spec/frontend/fixtures/branches.rb +++ b/spec/frontend/fixtures/branches.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Projects::BranchesController, '(JavaScript fixtures)', type: :controller do +RSpec.describe Projects::BranchesController, '(JavaScript fixtures)', type: :controller do include JavaScriptFixturesHelpers let(:admin) { create(:admin) } diff --git a/spec/frontend/fixtures/clusters.rb b/spec/frontend/fixtures/clusters.rb index fd64d3c0e28..d0940c7dc7f 100644 --- a/spec/frontend/fixtures/clusters.rb +++ b/spec/frontend/fixtures/clusters.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Projects::ClustersController, '(JavaScript fixtures)', type: :controller do +RSpec.describe Projects::ClustersController, '(JavaScript fixtures)', type: :controller do include JavaScriptFixturesHelpers let(:admin) { create(:admin) } diff --git a/spec/frontend/fixtures/commit.rb b/spec/frontend/fixtures/commit.rb index c9a5aa9a67c..c5c00afd4ca 100644 --- a/spec/frontend/fixtures/commit.rb +++ b/spec/frontend/fixtures/commit.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Projects::CommitController, '(JavaScript fixtures)', type: :controller do +RSpec.describe Projects::CommitController, '(JavaScript fixtures)', type: :controller do include JavaScriptFixturesHelpers let_it_be(:project) { create(:project, :repository) } diff --git a/spec/frontend/fixtures/deploy_keys.rb b/spec/frontend/fixtures/deploy_keys.rb index f491c424bcf..e87600e9d24 100644 --- a/spec/frontend/fixtures/deploy_keys.rb +++ b/spec/frontend/fixtures/deploy_keys.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Projects::DeployKeysController, '(JavaScript fixtures)', type: :controller do +RSpec.describe Projects::DeployKeysController, '(JavaScript fixtures)', type: :controller do include JavaScriptFixturesHelpers let(:admin) { create(:admin) } diff --git a/spec/frontend/fixtures/groups.rb b/spec/frontend/fixtures/groups.rb index 2421b67a130..6f0d7aa1f7c 100644 --- a/spec/frontend/fixtures/groups.rb +++ b/spec/frontend/fixtures/groups.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Groups (JavaScript fixtures)', type: :controller do +RSpec.describe 'Groups (JavaScript fixtures)', type: :controller do include JavaScriptFixturesHelpers let(:admin) { create(:admin) } diff --git a/spec/frontend/fixtures/issues.rb b/spec/frontend/fixtures/issues.rb index 9a194e5ca84..2c380ba6a96 100644 --- a/spec/frontend/fixtures/issues.rb +++ b/spec/frontend/fixtures/issues.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Projects::IssuesController, '(JavaScript fixtures)', type: :controller do +RSpec.describe Projects::IssuesController, '(JavaScript fixtures)', type: :controller do include JavaScriptFixturesHelpers let(:admin) { create(:admin, feed_token: 'feedtoken:coldfeed') } @@ -75,7 +75,7 @@ describe Projects::IssuesController, '(JavaScript fixtures)', type: :controller end end -describe API::Issues, '(JavaScript fixtures)', type: :request do +RSpec.describe API::Issues, '(JavaScript fixtures)', type: :request do include ApiHelpers include JavaScriptFixturesHelpers diff --git a/spec/frontend/fixtures/jobs.rb b/spec/frontend/fixtures/jobs.rb index 787ab517f75..64197a62301 100644 --- a/spec/frontend/fixtures/jobs.rb +++ b/spec/frontend/fixtures/jobs.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Projects::JobsController, '(JavaScript fixtures)', type: :controller do +RSpec.describe Projects::JobsController, '(JavaScript fixtures)', type: :controller do include JavaScriptFixturesHelpers let(:admin) { create(:admin) } diff --git a/spec/frontend/fixtures/labels.rb b/spec/frontend/fixtures/labels.rb index e5a0501ac03..2b7babb2e52 100644 --- a/spec/frontend/fixtures/labels.rb +++ b/spec/frontend/fixtures/labels.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Labels (JavaScript fixtures)' do +RSpec.describe 'Labels (JavaScript fixtures)' do include JavaScriptFixturesHelpers let(:admin) { create(:admin) } diff --git a/spec/frontend/fixtures/merge_requests.rb b/spec/frontend/fixtures/merge_requests.rb index a347ef683e7..7801eb27ce8 100644 --- a/spec/frontend/fixtures/merge_requests.rb +++ b/spec/frontend/fixtures/merge_requests.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Projects::MergeRequestsController, '(JavaScript fixtures)', type: :controller do +RSpec.describe Projects::MergeRequestsController, '(JavaScript fixtures)', type: :controller do include JavaScriptFixturesHelpers let(:admin) { create(:admin) } diff --git a/spec/frontend/fixtures/merge_requests_diffs.rb b/spec/frontend/fixtures/merge_requests_diffs.rb index 76bb8567a64..63bd02d0fbd 100644 --- a/spec/frontend/fixtures/merge_requests_diffs.rb +++ b/spec/frontend/fixtures/merge_requests_diffs.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Projects::MergeRequests::DiffsController, '(JavaScript fixtures)', type: :controller do +RSpec.describe Projects::MergeRequests::DiffsController, '(JavaScript fixtures)', type: :controller do include JavaScriptFixturesHelpers let(:admin) { create(:admin) } diff --git a/spec/frontend/fixtures/metrics_dashboard.rb b/spec/frontend/fixtures/metrics_dashboard.rb index f0c741af37d..b5dee7525f6 100644 --- a/spec/frontend/fixtures/metrics_dashboard.rb +++ b/spec/frontend/fixtures/metrics_dashboard.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe MetricsDashboard, '(JavaScript fixtures)', type: :controller do +RSpec.describe MetricsDashboard, '(JavaScript fixtures)', type: :controller do include JavaScriptFixturesHelpers include MetricsDashboardHelpers diff --git a/spec/frontend/fixtures/pipeline_schedules.rb b/spec/frontend/fixtures/pipeline_schedules.rb index e00a35d5362..e47bb25ec0a 100644 --- a/spec/frontend/fixtures/pipeline_schedules.rb +++ b/spec/frontend/fixtures/pipeline_schedules.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Projects::PipelineSchedulesController, '(JavaScript fixtures)', type: :controller do +RSpec.describe Projects::PipelineSchedulesController, '(JavaScript fixtures)', type: :controller do include JavaScriptFixturesHelpers let(:admin) { create(:admin) } diff --git a/spec/frontend/fixtures/pipelines.rb b/spec/frontend/fixtures/pipelines.rb index 83fc13af7d3..93e2c19fc27 100644 --- a/spec/frontend/fixtures/pipelines.rb +++ b/spec/frontend/fixtures/pipelines.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Projects::PipelinesController, '(JavaScript fixtures)', type: :controller do +RSpec.describe Projects::PipelinesController, '(JavaScript fixtures)', type: :controller do include JavaScriptFixturesHelpers let(:admin) { create(:admin) } diff --git a/spec/frontend/fixtures/projects.rb b/spec/frontend/fixtures/projects.rb index ff21dbaebe8..d33909fb98b 100644 --- a/spec/frontend/fixtures/projects.rb +++ b/spec/frontend/fixtures/projects.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Projects (JavaScript fixtures)', type: :controller do +RSpec.describe 'Projects (JavaScript fixtures)', type: :controller do include JavaScriptFixturesHelpers runners_token = 'runnerstoken:intabulasreferre' diff --git a/spec/frontend/fixtures/prometheus_service.rb b/spec/frontend/fixtures/prometheus_service.rb index c404b8260d2..8c923d91d08 100644 --- a/spec/frontend/fixtures/prometheus_service.rb +++ b/spec/frontend/fixtures/prometheus_service.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Projects::ServicesController, '(JavaScript fixtures)', type: :controller do +RSpec.describe Projects::ServicesController, '(JavaScript fixtures)', type: :controller do include JavaScriptFixturesHelpers let(:admin) { create(:admin) } diff --git a/spec/frontend/fixtures/raw.rb b/spec/frontend/fixtures/raw.rb index 9c9fa4ec40b..337067121d0 100644 --- a/spec/frontend/fixtures/raw.rb +++ b/spec/frontend/fixtures/raw.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Raw files', '(JavaScript fixtures)' do +RSpec.describe 'Raw files', '(JavaScript fixtures)' do include JavaScriptFixturesHelpers let(:namespace) { create(:namespace, name: 'frontend-fixtures' )} diff --git a/spec/frontend/fixtures/search.rb b/spec/frontend/fixtures/search.rb index cbe3e373986..fcd68662acc 100644 --- a/spec/frontend/fixtures/search.rb +++ b/spec/frontend/fixtures/search.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe SearchController, '(JavaScript fixtures)', type: :controller do +RSpec.describe SearchController, '(JavaScript fixtures)', type: :controller do include JavaScriptFixturesHelpers render_views diff --git a/spec/frontend/fixtures/services.rb b/spec/frontend/fixtures/services.rb index 1b81a83ca49..0877998cc9d 100644 --- a/spec/frontend/fixtures/services.rb +++ b/spec/frontend/fixtures/services.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Projects::ServicesController, '(JavaScript fixtures)', type: :controller do +RSpec.describe Projects::ServicesController, '(JavaScript fixtures)', type: :controller do include JavaScriptFixturesHelpers let(:admin) { create(:admin) } diff --git a/spec/frontend/fixtures/sessions.rb b/spec/frontend/fixtures/sessions.rb index a4dc0aef79c..0ef14c1d4fa 100644 --- a/spec/frontend/fixtures/sessions.rb +++ b/spec/frontend/fixtures/sessions.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Sessions (JavaScript fixtures)' do +RSpec.describe 'Sessions (JavaScript fixtures)' do include JavaScriptFixturesHelpers before(:all) do diff --git a/spec/frontend/fixtures/snippet.rb b/spec/frontend/fixtures/snippet.rb index d27c2fbe68b..26b088bbd88 100644 --- a/spec/frontend/fixtures/snippet.rb +++ b/spec/frontend/fixtures/snippet.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe SnippetsController, '(JavaScript fixtures)', type: :controller do +RSpec.describe SnippetsController, '(JavaScript fixtures)', type: :controller do include JavaScriptFixturesHelpers let(:admin) { create(:admin) } diff --git a/spec/frontend/fixtures/test_report.rb b/spec/frontend/fixtures/test_report.rb index d0ecaf11994..16496aa901b 100644 --- a/spec/frontend/fixtures/test_report.rb +++ b/spec/frontend/fixtures/test_report.rb @@ -2,7 +2,7 @@ require "spec_helper" -describe Projects::PipelinesController, "(JavaScript fixtures)", type: :controller do +RSpec.describe Projects::PipelinesController, "(JavaScript fixtures)", type: :controller do include JavaScriptFixturesHelpers let(:namespace) { create(:namespace, name: "frontend-fixtures") } diff --git a/spec/frontend/fixtures/todos.rb b/spec/frontend/fixtures/todos.rb index e5bdb4998ed..399be272e9b 100644 --- a/spec/frontend/fixtures/todos.rb +++ b/spec/frontend/fixtures/todos.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Todos (JavaScript fixtures)' do +RSpec.describe 'Todos (JavaScript fixtures)' do include JavaScriptFixturesHelpers let(:admin) { create(:admin) } diff --git a/spec/frontend/fixtures/u2f.rb b/spec/frontend/fixtures/u2f.rb index 9710fbbc181..be3874d7c42 100644 --- a/spec/frontend/fixtures/u2f.rb +++ b/spec/frontend/fixtures/u2f.rb @@ -2,7 +2,7 @@ require 'spec_helper' -context 'U2F' do +RSpec.context 'U2F' do include JavaScriptFixturesHelpers let(:user) { create(:user, :two_factor_via_u2f, otp_secret: 'otpsecret:coolkids') } diff --git a/spec/frontend/issue_show/components/app_spec.js b/spec/frontend/issue_show/components/app_spec.js index 6c13537147a..d970fd349e7 100644 --- a/spec/frontend/issue_show/components/app_spec.js +++ b/spec/frontend/issue_show/components/app_spec.js @@ -1,3 +1,4 @@ +import { GlIntersectionObserver } from '@gitlab/ui'; import { mount } from '@vue/test-utils'; import MockAdapter from 'axios-mock-adapter'; import { TEST_HOST } from 'helpers/test_constants'; @@ -25,6 +26,8 @@ describe('Issuable output', () => { let realtimeRequestCount = 0; let wrapper; + const findStickyHeader = () => wrapper.find('[data-testid="issue-sticky-header"]'); + beforeEach(() => { setFixtures(` <div> @@ -42,6 +45,11 @@ describe('Issuable output', () => { </div> `); + window.IntersectionObserver = class { + disconnect = jest.fn(); + observe = jest.fn(); + }; + mock = new MockAdapter(axios); mock .onGet('/gitlab-org/gitlab-shell/-/issues/9/realtime_changes/realtime_changes') @@ -58,6 +66,7 @@ describe('Issuable output', () => { endpoint: '/gitlab-org/gitlab-shell/-/issues/9/realtime_changes', updateEndpoint: TEST_HOST, issuableRef: '#1', + issuableStatus: 'opened', initialTitleHtml: '', initialTitleText: '', initialDescriptionHtml: 'test', @@ -75,6 +84,7 @@ describe('Issuable output', () => { }); afterEach(() => { + delete window.IntersectionObserver; mock.restore(); realtimeRequestCount = 0; @@ -520,4 +530,39 @@ describe('Issuable output', () => { expect(wrapper.vm.issueChanged).toBe(false); }); }); + + describe('sticky header', () => { + describe('when title is in view', () => { + it('is not shown', () => { + expect(wrapper.contains('.issue-sticky-header')).toBe(false); + }); + }); + + describe('when title is not in view', () => { + beforeEach(() => { + wrapper.vm.state.titleText = 'Sticky header title'; + wrapper.find(GlIntersectionObserver).vm.$emit('disappear'); + }); + + it('is shown with title', () => { + expect(findStickyHeader().text()).toContain('Sticky header title'); + }); + + it('is shown with Open when status is opened', () => { + wrapper.setProps({ issuableStatus: 'opened' }); + + return wrapper.vm.$nextTick(() => { + expect(findStickyHeader().text()).toContain('Open'); + }); + }); + + it('is shown with Closed when status is closed', () => { + wrapper.setProps({ issuableStatus: 'closed' }); + + return wrapper.vm.$nextTick(() => { + expect(findStickyHeader().text()).toContain('Closed'); + }); + }); + }); + }); }); diff --git a/spec/frontend/monitoring/components/charts/stacked_column_spec.js b/spec/frontend/monitoring/components/charts/stacked_column_spec.js index 06493678a9b..bb2fbc68eaa 100644 --- a/spec/frontend/monitoring/components/charts/stacked_column_spec.js +++ b/spec/frontend/monitoring/components/charts/stacked_column_spec.js @@ -1,7 +1,7 @@ -import { shallowMount } from '@vue/test-utils'; +import { shallowMount, mount } from '@vue/test-utils'; import timezoneMock from 'timezone-mock'; import { cloneDeep } from 'lodash'; -import { GlStackedColumnChart } from '@gitlab/ui/dist/charts'; +import { GlStackedColumnChart, GlChartLegend } from '@gitlab/ui/dist/charts'; import StackedColumnChart from '~/monitoring/components/charts/stacked_column.vue'; import { stackedColumnMockedData } from '../../mock_data'; @@ -11,16 +11,25 @@ jest.mock('~/lib/utils/icon_utils', () => ({ describe('Stacked column chart component', () => { let wrapper; + const findChart = () => wrapper.find(GlStackedColumnChart); + const findLegend = () => wrapper.find(GlChartLegend); - const createWrapper = (props = {}) => { - wrapper = shallowMount(StackedColumnChart, { + const createWrapper = (props = {}, mountingMethod = shallowMount) => + mountingMethod(StackedColumnChart, { propsData: { graphData: stackedColumnMockedData, ...props, }, + stubs: { + GlPopover: true, + }, + attachToDocument: true, }); - }; + + beforeEach(() => { + wrapper = createWrapper({}, mount); + }); describe('when graphData is present', () => { beforeEach(() => { @@ -130,4 +139,54 @@ describe('Stacked column chart component', () => { expect(findChart().exists()).toBe(true); }); }); + + describe('legend', () => { + beforeEach(() => { + wrapper = createWrapper({}, mount); + }); + + it('allows user to override legend label texts using props', () => { + const legendRelatedProps = { + legendMinText: 'legendMinText', + legendMaxText: 'legendMaxText', + legendAverageText: 'legendAverageText', + legendCurrentText: 'legendCurrentText', + }; + wrapper.setProps({ + ...legendRelatedProps, + }); + + return wrapper.vm.$nextTick().then(() => { + expect(findChart().props()).toMatchObject(legendRelatedProps); + }); + }); + + it('should render a tabular legend layout by default', () => { + expect(findLegend().props('layout')).toBe('table'); + }); + + describe('when inline legend layout prop is set', () => { + beforeEach(() => { + wrapper.setProps({ + legendLayout: 'inline', + }); + }); + + it('should render an inline legend layout', () => { + expect(findLegend().props('layout')).toBe('inline'); + }); + }); + + describe('when table legend layout prop is set', () => { + beforeEach(() => { + wrapper.setProps({ + legendLayout: 'table', + }); + }); + + it('should render a tabular legend layout', () => { + expect(findLegend().props('layout')).toBe('table'); + }); + }); + }); }); diff --git a/spec/frontend/monitoring/components/charts/time_series_spec.js b/spec/frontend/monitoring/components/charts/time_series_spec.js index 271b65748ea..50d2c9c80b2 100644 --- a/spec/frontend/monitoring/components/charts/time_series_spec.js +++ b/spec/frontend/monitoring/components/charts/time_series_spec.js @@ -55,6 +55,7 @@ describe('Time series component', () => { stubs: { GlPopover: true, }, + attachToDocument: true, }); }; @@ -87,19 +88,23 @@ describe('Time series component', () => { return wrapper.vm.$nextTick(); }); - it('allows user to override max value label text using prop', () => { - wrapper.setProps({ legendMaxText: 'legendMaxText' }); - - return wrapper.vm.$nextTick().then(() => { - expect(wrapper.props().legendMaxText).toBe('legendMaxText'); - }); + afterEach(() => { + wrapper.destroy(); }); - it('allows user to override average value label text using prop', () => { - wrapper.setProps({ legendAverageText: 'averageText' }); + it('allows user to override legend label texts using props', () => { + const legendRelatedProps = { + legendMinText: 'legendMinText', + legendMaxText: 'legendMaxText', + legendAverageText: 'legendAverageText', + legendCurrentText: 'legendCurrentText', + }; + wrapper.setProps({ + ...legendRelatedProps, + }); return wrapper.vm.$nextTick().then(() => { - expect(wrapper.props().legendAverageText).toBe('averageText'); + expect(findChart().props()).toMatchObject(legendRelatedProps); }); }); @@ -744,4 +749,45 @@ describe('Time series component', () => { }); }); }); + + describe('legend layout', () => { + const findLegend = () => wrapper.find(GlChartLegend); + + beforeEach(() => { + createWrapper(mockGraphData, mount); + return wrapper.vm.$nextTick(); + }); + + afterEach(() => { + wrapper.destroy(); + }); + + it('should render a tabular legend layout by default', () => { + expect(findLegend().props('layout')).toBe('table'); + }); + + describe('when inline legend layout prop is set', () => { + beforeEach(() => { + wrapper.setProps({ + legendLayout: 'inline', + }); + }); + + it('should render an inline legend layout', () => { + expect(findLegend().props('layout')).toBe('inline'); + }); + }); + + describe('when table legend layout prop is set', () => { + beforeEach(() => { + wrapper.setProps({ + legendLayout: 'table', + }); + }); + + it('should render a tabular legend layout', () => { + expect(findLegend().props('layout')).toBe('table'); + }); + }); + }); }); diff --git a/spec/graphql/features/authorization_spec.rb b/spec/graphql/features/authorization_spec.rb index 4f54695e5be..6e5a8b9f4be 100644 --- a/spec/graphql/features/authorization_spec.rb +++ b/spec/graphql/features/authorization_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Gitlab::Graphql::Authorization' do +RSpec.describe 'Gitlab::Graphql::Authorization' do include GraphqlHelpers let_it_be(:user) { create(:user) } diff --git a/spec/graphql/features/feature_flag_spec.rb b/spec/graphql/features/feature_flag_spec.rb index 51914cf0ca8..b484663d675 100644 --- a/spec/graphql/features/feature_flag_spec.rb +++ b/spec/graphql/features/feature_flag_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Graphql Field feature flags' do +RSpec.describe 'Graphql Field feature flags' do include GraphqlHelpers let_it_be(:user) { create(:user) } diff --git a/spec/graphql/gitlab_schema_spec.rb b/spec/graphql/gitlab_schema_spec.rb index 303ae81b55b..5d6aa863994 100644 --- a/spec/graphql/gitlab_schema_spec.rb +++ b/spec/graphql/gitlab_schema_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe GitlabSchema do +RSpec.describe GitlabSchema do let_it_be(:connections) { GitlabSchema.connections.all_wrappers } let(:user) { build :user } diff --git a/spec/graphql/mutations/alert_management/create_alert_issue_spec.rb b/spec/graphql/mutations/alert_management/create_alert_issue_spec.rb index 1e51767cf0e..fa5a84b4fcc 100644 --- a/spec/graphql/mutations/alert_management/create_alert_issue_spec.rb +++ b/spec/graphql/mutations/alert_management/create_alert_issue_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Mutations::AlertManagement::CreateAlertIssue do +RSpec.describe Mutations::AlertManagement::CreateAlertIssue do let_it_be(:current_user) { create(:user) } let_it_be(:project) { create(:project) } let_it_be(:alert) { create(:alert_management_alert, project: project, status: 'triggered') } diff --git a/spec/graphql/mutations/alert_management/update_alert_status_spec.rb b/spec/graphql/mutations/alert_management/update_alert_status_spec.rb index bb8c95bfb36..68513c02040 100644 --- a/spec/graphql/mutations/alert_management/update_alert_status_spec.rb +++ b/spec/graphql/mutations/alert_management/update_alert_status_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Mutations::AlertManagement::UpdateAlertStatus do +RSpec.describe Mutations::AlertManagement::UpdateAlertStatus do let_it_be(:current_user) { create(:user) } let_it_be(:alert) { create(:alert_management_alert, :triggered) } let_it_be(:project) { alert.project } diff --git a/spec/graphql/mutations/branches/create_spec.rb b/spec/graphql/mutations/branches/create_spec.rb index 744f8f1f2bc..e378a8e3d41 100644 --- a/spec/graphql/mutations/branches/create_spec.rb +++ b/spec/graphql/mutations/branches/create_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Mutations::Branches::Create do +RSpec.describe Mutations::Branches::Create do subject(:mutation) { described_class.new(object: nil, context: context, field: nil) } let_it_be(:project) { create(:project, :public, :repository) } diff --git a/spec/graphql/mutations/commits/create_spec.rb b/spec/graphql/mutations/commits/create_spec.rb index fa37be090c2..bb0b8c577b0 100644 --- a/spec/graphql/mutations/commits/create_spec.rb +++ b/spec/graphql/mutations/commits/create_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Mutations::Commits::Create do +RSpec.describe Mutations::Commits::Create do subject(:mutation) { described_class.new(object: nil, context: context, field: nil) } let_it_be(:project) { create(:project, :public, :repository) } diff --git a/spec/graphql/mutations/concerns/mutations/resolves_group_spec.rb b/spec/graphql/mutations/concerns/mutations/resolves_group_spec.rb index 51d3c4f5d6b..6bed3a752ed 100644 --- a/spec/graphql/mutations/concerns/mutations/resolves_group_spec.rb +++ b/spec/graphql/mutations/concerns/mutations/resolves_group_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Mutations::ResolvesGroup do +RSpec.describe Mutations::ResolvesGroup do let(:mutation_class) do Class.new(Mutations::BaseMutation) do include Mutations::ResolvesGroup diff --git a/spec/graphql/mutations/concerns/mutations/resolves_issuable_spec.rb b/spec/graphql/mutations/concerns/mutations/resolves_issuable_spec.rb index 145e42e2a51..706a54931ea 100644 --- a/spec/graphql/mutations/concerns/mutations/resolves_issuable_spec.rb +++ b/spec/graphql/mutations/concerns/mutations/resolves_issuable_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Mutations::ResolvesIssuable do +RSpec.describe Mutations::ResolvesIssuable do let_it_be(:mutation_class) do Class.new(Mutations::BaseMutation) do include Mutations::ResolvesIssuable diff --git a/spec/graphql/mutations/design_management/delete_spec.rb b/spec/graphql/mutations/design_management/delete_spec.rb index 60be6dad62a..3efa865c64b 100644 --- a/spec/graphql/mutations/design_management/delete_spec.rb +++ b/spec/graphql/mutations/design_management/delete_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Mutations::DesignManagement::Delete do +RSpec.describe Mutations::DesignManagement::Delete do include DesignManagementTestHelpers let(:issue) { create(:issue) } diff --git a/spec/graphql/mutations/design_management/upload_spec.rb b/spec/graphql/mutations/design_management/upload_spec.rb index 783af70448c..326d88cea80 100644 --- a/spec/graphql/mutations/design_management/upload_spec.rb +++ b/spec/graphql/mutations/design_management/upload_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'spec_helper' -describe Mutations::DesignManagement::Upload do +RSpec.describe Mutations::DesignManagement::Upload do include DesignManagementTestHelpers include ConcurrentHelpers diff --git a/spec/graphql/mutations/discussions/toggle_resolve_spec.rb b/spec/graphql/mutations/discussions/toggle_resolve_spec.rb index 73ed94abab9..9ac4d6ab165 100644 --- a/spec/graphql/mutations/discussions/toggle_resolve_spec.rb +++ b/spec/graphql/mutations/discussions/toggle_resolve_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Mutations::Discussions::ToggleResolve do +RSpec.describe Mutations::Discussions::ToggleResolve do subject(:mutation) do described_class.new(object: nil, context: { current_user: user }, field: nil) end diff --git a/spec/graphql/mutations/issues/set_confidential_spec.rb b/spec/graphql/mutations/issues/set_confidential_spec.rb index c90ce2658d6..820f9aa5e17 100644 --- a/spec/graphql/mutations/issues/set_confidential_spec.rb +++ b/spec/graphql/mutations/issues/set_confidential_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Mutations::Issues::SetConfidential do +RSpec.describe Mutations::Issues::SetConfidential do let(:issue) { create(:issue) } let(:user) { create(:user) } diff --git a/spec/graphql/mutations/issues/set_due_date_spec.rb b/spec/graphql/mutations/issues/set_due_date_spec.rb index 84df6fce7c7..a638971d966 100644 --- a/spec/graphql/mutations/issues/set_due_date_spec.rb +++ b/spec/graphql/mutations/issues/set_due_date_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Mutations::Issues::SetDueDate do +RSpec.describe Mutations::Issues::SetDueDate do let(:issue) { create(:issue) } let(:user) { create(:user) } diff --git a/spec/initializers/secret_token_spec.rb b/spec/initializers/secret_token_spec.rb index b3f7f19cc29..b7979144c72 100644 --- a/spec/initializers/secret_token_spec.rb +++ b/spec/initializers/secret_token_spec.rb @@ -37,10 +37,10 @@ describe 'create_tokens' do expect(keys).to all(match(hex_key)) end - it 'generates an RSA key for openid_connect_signing_key and ci_jwt_signing_key' do + it 'generates an RSA key for openid_connect_signing_key' do create_tokens - keys = secrets.values_at(:openid_connect_signing_key, :ci_jwt_signing_key) + keys = secrets.values_at(:openid_connect_signing_key) expect(keys.uniq).to eq(keys) expect(keys).to all(match(rsa_key)) @@ -51,7 +51,6 @@ describe 'create_tokens' do expect(self).to receive(:warn_missing_secret).with('otp_key_base') expect(self).to receive(:warn_missing_secret).with('db_key_base') expect(self).to receive(:warn_missing_secret).with('openid_connect_signing_key') - expect(self).to receive(:warn_missing_secret).with('ci_jwt_signing_key') create_tokens end @@ -64,7 +63,6 @@ describe 'create_tokens' do expect(new_secrets['otp_key_base']).to eq(secrets.otp_key_base) expect(new_secrets['db_key_base']).to eq(secrets.db_key_base) expect(new_secrets['openid_connect_signing_key']).to eq(secrets.openid_connect_signing_key) - expect(new_secrets['ci_jwt_signing_key']).to eq(secrets.ci_jwt_signing_key) end create_tokens @@ -81,7 +79,6 @@ describe 'create_tokens' do before do secrets.db_key_base = 'db_key_base' secrets.openid_connect_signing_key = 'openid_connect_signing_key' - secrets.ci_jwt_signing_key = 'ci_jwt_signing_key' allow(File).to receive(:exist?).with('.secret').and_return(true) allow(File).to receive(:read).with('.secret').and_return('file_key') @@ -93,7 +90,6 @@ describe 'create_tokens' do secrets.secret_key_base = 'secret_key_base' secrets.otp_key_base = 'otp_key_base' secrets.openid_connect_signing_key = 'openid_connect_signing_key' - secrets.ci_jwt_signing_key = 'ci_jwt_signing_key' end it 'does not issue a warning' do @@ -120,7 +116,6 @@ describe 'create_tokens' do secrets.secret_key_base = 'secret_key_base' secrets.otp_key_base = 'otp_key_base' secrets.openid_connect_signing_key = 'openid_connect_signing_key' - secrets.ci_jwt_signing_key = 'ci_jwt_signing_key' end it 'does not write any files' do @@ -136,7 +131,6 @@ describe 'create_tokens' do expect(secrets.otp_key_base).to eq('otp_key_base') expect(secrets.db_key_base).to eq('db_key_base') expect(secrets.openid_connect_signing_key).to eq('openid_connect_signing_key') - expect(secrets.ci_jwt_signing_key).to eq('ci_jwt_signing_key') end it 'deletes the .secret file' do @@ -161,7 +155,6 @@ describe 'create_tokens' do expect(new_secrets['otp_key_base']).to eq('file_key') expect(new_secrets['db_key_base']).to eq('db_key_base') expect(new_secrets['openid_connect_signing_key']).to eq('openid_connect_signing_key') - expect(new_secrets['ci_jwt_signing_key']).to eq('ci_jwt_signing_key') end create_tokens diff --git a/spec/lib/gitlab/ci/build/step_spec.rb b/spec/lib/gitlab/ci/build/step_spec.rb index 9c1a8cf5e91..1cebda2cc7e 100644 --- a/spec/lib/gitlab/ci/build/step_spec.rb +++ b/spec/lib/gitlab/ci/build/step_spec.rb @@ -51,6 +51,30 @@ describe Gitlab::Ci::Build::Step do end end + describe '#from_release' do + subject { described_class.from_release(job) } + + before do + job.run! + end + + context 'with release' do + let(:job) { create(:ci_build, :release_options) } + + it 'returns the release-cli command line' do + expect(subject.script).to eq("release-cli create --name \"Release $CI_COMMIT_SHA\" --description \"Created using the release-cli $EXTRA_DESCRIPTION\" --tag-name \"release-$CI_COMMIT_SHA\" --ref \"$CI_COMMIT_SHA\"") + end + end + + context 'when release is empty' do + let(:job) { create(:ci_build) } + + it 'does not fabricate an object' do + is_expected.to be_nil + end + end + end + describe '#from_after_script' do let(:job) { create(:ci_build) } @@ -61,7 +85,7 @@ describe Gitlab::Ci::Build::Step do end context 'when after_script is empty' do - it 'doesn not fabricate an object' do + it 'does not fabricate an object' do is_expected.to be_nil end end diff --git a/spec/lib/gitlab/ci/jwt_spec.rb b/spec/lib/gitlab/ci/jwt_spec.rb index f3de7f0f5b8..f2897708b08 100644 --- a/spec/lib/gitlab/ci/jwt_spec.rb +++ b/spec/lib/gitlab/ci/jwt_spec.rb @@ -93,7 +93,7 @@ describe Gitlab::Ci::Jwt do end describe '.for_build' do - let(:rsa_key) { OpenSSL::PKey::RSA.new(Rails.application.secrets.ci_jwt_signing_key) } + let(:rsa_key) { OpenSSL::PKey::RSA.new(Rails.application.secrets.openid_connect_signing_key) } subject(:jwt) { described_class.for_build(build) } diff --git a/spec/models/blob_viewer/metrics_dashboard_yml_spec.rb b/spec/models/blob_viewer/metrics_dashboard_yml_spec.rb index 7ded9685e7e..f5b8586975d 100644 --- a/spec/models/blob_viewer/metrics_dashboard_yml_spec.rb +++ b/spec/models/blob_viewer/metrics_dashboard_yml_spec.rb @@ -24,9 +24,16 @@ describe BlobViewer::MetricsDashboardYml do viewer.valid? end - it 'returns true' do + it 'returns true', :aggregate_failures do + yml = ::Gitlab::Config::Loader::Yaml.new(data).load_raw! + + expect_next_instance_of(::Gitlab::Config::Loader::Yaml, data) do |loader| + expect(loader).to receive(:load_raw!).and_call_original + end expect(PerformanceMonitoring::PrometheusDashboard) - .to receive(:from_json).with(YAML.safe_load(data)) + .to receive(:from_json) + .with(yml) + .and_call_original expect(viewer.valid?).to be_truthy end end @@ -92,4 +99,29 @@ describe BlobViewer::MetricsDashboardYml do end end end + + context 'when YAML loader raises error' do + let(:data) do + <<~YAML + large yaml file + YAML + end + + before do + allow(::Gitlab::Config::Loader::Yaml).to receive(:new) + .and_raise(::Gitlab::Config::Loader::Yaml::DataTooLargeError, 'The parsed YAML is too big') + end + + it 'is invalid' do + expect(PerformanceMonitoring::PrometheusDashboard).not_to receive(:from_json) + expect(viewer.valid?).to be(false) + end + + it 'returns validation errors' do + yaml_wrapped_errors = { 'YAML syntax': ["The parsed YAML is too big"] } + + expect(viewer.errors).to be_kind_of(ActiveModel::Errors) + expect(viewer.errors.messages).to eq(yaml_wrapped_errors) + end + end end diff --git a/spec/models/ci/build_spec.rb b/spec/models/ci/build_spec.rb index 23d29653068..6fdd8463329 100644 --- a/spec/models/ci/build_spec.rb +++ b/spec/models/ci/build_spec.rb @@ -4216,7 +4216,7 @@ describe Ci::Build do subject { build.supported_runner?(runner_features) } - context 'when feature is required by build' do + context 'when `upload_multiple_artifacts` feature is required by build' do before do expect(build).to receive(:runner_required_feature_names) do [:upload_multiple_artifacts] @@ -4240,7 +4240,7 @@ describe Ci::Build do end end - context 'when refspecs feature is required by build' do + context 'when `refspecs` feature is required by build' do before do allow(build).to receive(:merge_request_ref?) { true } end @@ -4257,6 +4257,26 @@ describe Ci::Build do it { is_expected.to be_falsey } end end + + context 'when `release_steps` feature is required by build' do + before do + expect(build).to receive(:runner_required_feature_names) do + [:release_steps] + end + end + + context 'when runner provides given feature' do + let(:runner_features) { { release_steps: true } } + + it { is_expected.to be_truthy } + end + + context 'when runner does not provide given feature' do + let(:runner_features) { {} } + + it { is_expected.to be_falsey } + end + end end describe '#deployment_status' do diff --git a/spec/requests/api/runner_spec.rb b/spec/requests/api/runner_spec.rb index 2f2cef3a11b..774615757b9 100644 --- a/spec/requests/api/runner_spec.rb +++ b/spec/requests/api/runner_spec.rb @@ -648,6 +648,44 @@ describe API::Runner, :clean_gitlab_redis_shared_state do end end + context 'when job is for a release' do + let!(:job) { create(:ci_build, :release_options, pipeline: pipeline) } + + context 'when `release_steps` is passed by the runner' do + it 'exposes release info' do + request_job info: { features: { release_steps: true } } + + expect(response).to have_gitlab_http_status(:created) + expect(response.headers).not_to have_key('X-GitLab-Last-Update') + expect(json_response['steps']).to eq([ + { + "name" => "script", + "script" => ["make changelog | tee release_changelog.txt"], + "timeout" => 3600, + "when" => "on_success", + "allow_failure" => false + }, + { + "name" => "release", + "script" => + "release-cli create --ref \"$CI_COMMIT_SHA\" --name \"Release $CI_COMMIT_SHA\" --tag-name \"release-$CI_COMMIT_SHA\" --description \"Created using the release-cli $EXTRA_DESCRIPTION\"", + "timeout" => 3600, + "when" => "on_success", + "allow_failure" => false + } + ]) + end + end + + context 'when `release_steps` is not passed by the runner' do + it 'drops the job' do + request_job + + expect(response).to have_gitlab_http_status(:no_content) + end + end + end + context 'when job is made for merge request' do let(:pipeline) { create(:ci_pipeline, source: :merge_request_event, project: project, ref: 'feature', merge_request: merge_request) } let!(:job) { create(:ci_build, pipeline: pipeline, name: 'spinach', ref: 'feature', stage: 'test', stage_idx: 0) } diff --git a/spec/routing/openid_connect_spec.rb b/spec/routing/openid_connect_spec.rb index 70470032930..fc170f8986c 100644 --- a/spec/routing/openid_connect_spec.rb +++ b/spec/routing/openid_connect_spec.rb @@ -3,6 +3,7 @@ require 'spec_helper' # oauth_discovery_keys GET /oauth/discovery/keys(.:format) doorkeeper/openid_connect/discovery#keys +# jwks GET /-/jwks(.:format) doorkeeper/openid_connect/discovery#keys # oauth_discovery_provider GET /.well-known/openid-configuration(.:format) doorkeeper/openid_connect/discovery#provider # oauth_discovery_webfinger GET /.well-known/webfinger(.:format) doorkeeper/openid_connect/discovery#webfinger describe Doorkeeper::OpenidConnect::DiscoveryController, 'routing' do @@ -17,6 +18,10 @@ describe Doorkeeper::OpenidConnect::DiscoveryController, 'routing' do it "to #keys" do expect(get('/oauth/discovery/keys')).to route_to('doorkeeper/openid_connect/discovery#keys') end + + it "/-/jwks" do + expect(get('/-/jwks')).to route_to('doorkeeper/openid_connect/discovery#keys') + end end # oauth_userinfo GET /oauth/userinfo(.:format) doorkeeper/openid_connect/userinfo#show diff --git a/spec/routing/routing_spec.rb b/spec/routing/routing_spec.rb index 370a5ec0f99..9c3d17f7d8f 100644 --- a/spec/routing/routing_spec.rb +++ b/spec/routing/routing_spec.rb @@ -368,10 +368,3 @@ describe AutocompleteController, 'routing' do expect(get("/autocomplete/award_emojis")).to route_to('autocomplete#award_emojis') end end - -# jwks GET /-/jwks(.:format) jwks#index -describe JwksController, "routing" do - it "to #index" do - expect(get('/-/jwks')).to route_to('jwks#index') - end -end diff --git a/spec/services/audit_event_service_spec.rb b/spec/services/audit_event_service_spec.rb index 96df6689bb0..dc86735805c 100644 --- a/spec/services/audit_event_service_spec.rb +++ b/spec/services/audit_event_service_spec.rb @@ -4,12 +4,16 @@ require 'spec_helper' describe AuditEventService do let(:project) { create(:project) } - let(:user) { create(:user) } + let(:user) { create(:user, :with_sign_ins) } let(:project_member) { create(:project_member, user: user) } let(:service) { described_class.new(user, project, { action: :destroy }) } let(:logger) { instance_double(Gitlab::AuditJsonLogger) } describe '#security_event' do + before do + stub_licensed_features(admin_audit_log: false) + end + it 'creates an event and logs to a file' do expect(service).to receive(:file_logger).and_return(logger) expect(logger).to receive(:info).with(author_id: user.id, diff --git a/spec/support/shared_examples/models/application_setting_shared_examples.rb b/spec/support/shared_examples/models/application_setting_shared_examples.rb index aed85a6630a..01513161d24 100644 --- a/spec/support/shared_examples/models/application_setting_shared_examples.rb +++ b/spec/support/shared_examples/models/application_setting_shared_examples.rb @@ -288,11 +288,37 @@ RSpec.shared_examples 'application settings examples' do end describe '#pick_repository_storage' do - it 'uses Array#sample to pick a random storage' do - array = double('array', sample: 'random') - expect(setting).to receive(:repository_storages).and_return(array) + before do + allow(setting).to receive(:repository_storages_weighted).and_return({ 'default' => 20, 'backup' => 80 }) + end + + it 'chooses repository based on weight' do + picked_storages = { 'default' => 0.0, 'backup' => 0.0 } + 10_000.times { picked_storages[setting.pick_repository_storage] += 1 } + + expect(((picked_storages['default'] / 10_000) * 100).round.to_i).to be_between(19, 21) + expect(((picked_storages['backup'] / 10_000) * 100).round.to_i).to be_between(79, 81) + end + end + + describe '#normalized_repository_storage_weights' do + using RSpec::Parameterized::TableSyntax - expect(setting.pick_repository_storage).to eq('random') + where(:storages, :normalized) do + { 'default' => 0, 'backup' => 100 } | { 'default' => 0.0, 'backup' => 1.0 } + { 'default' => 100, 'backup' => 100 } | { 'default' => 0.5, 'backup' => 0.5 } + { 'default' => 20, 'backup' => 80 } | { 'default' => 0.2, 'backup' => 0.8 } + { 'default' => 0, 'backup' => 0 } | { 'default' => 0.0, 'backup' => 0.0 } + end + + with_them do + before do + allow(setting).to receive(:repository_storages_weighted).and_return(storages) + end + + it 'normalizes storage weights' do + expect(setting.normalized_repository_storage_weights).to eq(normalized) + end end end diff --git a/spec/support/shared_examples/models/concerns/has_repository_shared_examples.rb b/spec/support/shared_examples/models/concerns/has_repository_shared_examples.rb index 30c8c7d0fe5..f37ef3533c3 100644 --- a/spec/support/shared_examples/models/concerns/has_repository_shared_examples.rb +++ b/spec/support/shared_examples/models/concerns/has_repository_shared_examples.rb @@ -148,18 +148,18 @@ RSpec.shared_examples 'model with repository' do expect(subject).to eq('picked') end - it 'picks from the latest available storage', :request_store do + it 'picks from the available storages based on weight', :request_store do stub_env('IN_MEMORY_APPLICATION_SETTINGS', 'false') Gitlab::CurrentSettings.expire_current_application_settings Gitlab::CurrentSettings.current_application_settings settings = ApplicationSetting.last - settings.repository_storages = %w(picked) + settings.repository_storages_weighted = { 'picked' => 100, 'default' => 0 } settings.save! - expect(Gitlab::CurrentSettings.repository_storages).to eq(%w(default)) + expect(Gitlab::CurrentSettings.repository_storages_weighted).to eq({ 'default' => 100 }) expect(subject).to eq('picked') - expect(Gitlab::CurrentSettings.repository_storages).to eq(%w(picked)) + expect(Gitlab::CurrentSettings.repository_storages_weighted).to eq({ 'default' => 0, 'picked' => 100 }) end end end |