diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-15 09:07:50 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-15 09:07:50 +0300 |
commit | 3c5195204b69df0bc69a0c98c7d61d258dc39866 (patch) | |
tree | 10af5c42e5ff538069565954476925709d94b679 /spec/features | |
parent | c40b7517717b0d23893a92527819fd05c2531b93 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/merge_request/admin_views_hidden_merge_request_spec.rb | 26 | ||||
-rw-r--r-- | spec/features/merge_requests/admin_views_hidden_merge_requests_spec.rb | 26 |
2 files changed, 0 insertions, 52 deletions
diff --git a/spec/features/merge_request/admin_views_hidden_merge_request_spec.rb b/spec/features/merge_request/admin_views_hidden_merge_request_spec.rb deleted file mode 100644 index 99344d2cf32..00000000000 --- a/spec/features/merge_request/admin_views_hidden_merge_request_spec.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe 'Admin views hidden merge request', feature_category: :code_review do - context 'when signed in as admin and viewing a hidden merge request', :js do - let_it_be(:admin) { create(:admin) } - let_it_be(:author) { create(:user, :banned) } - let_it_be(:project) { create(:project, :repository) } - let!(:merge_request) { create(:merge_request, source_project: project, author: author) } - - before do - sign_in(admin) - gitlab_enable_admin_mode_sign_in(admin) - visit(project_merge_request_path(project, merge_request)) - end - - it 'shows a hidden merge request icon' do - page.within('.detail-page-header-body') do - tooltip = format(_('This %{issuable} is hidden because its author has been banned'), issuable: 'merge request') - expect(page).to have_css("div[data-testid='hidden'][title='#{tooltip}']") - expect(page).to have_css('svg[data-testid="spam-icon"]') - end - end - end -end diff --git a/spec/features/merge_requests/admin_views_hidden_merge_requests_spec.rb b/spec/features/merge_requests/admin_views_hidden_merge_requests_spec.rb deleted file mode 100644 index bc5ec124861..00000000000 --- a/spec/features/merge_requests/admin_views_hidden_merge_requests_spec.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe 'Admin views hidden merge requests', feature_category: :code_review do - context 'when signed in as admin and viewing a hidden merge request' do - let_it_be(:admin) { create(:admin) } - let_it_be(:author) { create(:user, :banned) } - let_it_be(:project) { create(:project) } - let!(:merge_request) { create(:merge_request, source_project: project, author: author) } - - before do - sign_in(admin) - gitlab_enable_admin_mode_sign_in(admin) - visit(project_merge_requests_path(project)) - end - - it 'shows a hidden merge request icon' do - page.within("#merge_request_#{merge_request.id}") do - tooltip = format(_('This %{issuable} is hidden because its author has been banned'), issuable: 'merge request') - expect(page).to have_css("span[title='#{tooltip}']") - expect(page).to have_css('svg[data-testid="spam-icon"]') - end - end - end -end |