diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-08 03:07:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-08 03:07:09 +0300 |
commit | 044a953eb6b92e39cf32678296aa219176c9ad92 (patch) | |
tree | 01dafcb0cd46816b6aec864aed791c521c999a45 /spec/support/shared_examples | |
parent | 23d78a2bf594e74fef0a9330d7a26bd9398ae4b9 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support/shared_examples')
4 files changed, 4 insertions, 20 deletions
diff --git a/spec/support/shared_examples/features/container_registry_shared_examples.rb b/spec/support/shared_examples/features/container_registry_shared_examples.rb index 784f82fdda1..06b2b8c621c 100644 --- a/spec/support/shared_examples/features/container_registry_shared_examples.rb +++ b/spec/support/shared_examples/features/container_registry_shared_examples.rb @@ -7,19 +7,3 @@ RSpec.shared_examples 'handling feature network errors with the container regist expect(page).to have_content 'We are having trouble connecting to the Container Registry' end end - -RSpec.shared_examples 'rejecting tags destruction for an importing repository on' do |tags: []| - it 'rejects the tag destruction operation' do - service = instance_double('Projects::ContainerRepository::DeleteTagsService') - expect(service).to receive(:execute).with(container_repository) { { status: :error, message: 'repository importing' } } - expect(Projects::ContainerRepository::DeleteTagsService).to receive(:new).with(container_repository.project, user, tags: tags) { service } - - first('[data-testid="additional-actions"]').click - first('[data-testid="single-delete-button"]').click - expect(find('.modal .modal-title')).to have_content _('Remove tag') - find('.modal .modal-footer .btn-danger').click - - expect(page).to have_content('Tags temporarily cannot be marked for deletion. Please try again in a few minutes.') - expect(page).to have_link('More details', href: help_page_path('user/packages/container_registry/index', anchor: 'tags-temporarily-cannot-be-marked-for-deletion')) - end -end diff --git a/spec/support/shared_examples/features/wiki/file_attachments_shared_examples.rb b/spec/support/shared_examples/features/wiki/file_attachments_shared_examples.rb index 8d1502bed84..7a3b94ad81d 100644 --- a/spec/support/shared_examples/features/wiki/file_attachments_shared_examples.rb +++ b/spec/support/shared_examples/features/wiki/file_attachments_shared_examples.rb @@ -55,7 +55,7 @@ RSpec.shared_examples 'wiki file attachments' do wait_for_requests expect(page.find('#wiki_content').value) - .to match(%r{\!\[dk\]\(uploads/\h{32}/dk\.png\)$}) + .to match(%r{!\[dk\]\(uploads/\h{32}/dk\.png\)$}) end it 'the links point to the wiki root url' do diff --git a/spec/support/shared_examples/mailers/notify_shared_examples.rb b/spec/support/shared_examples/mailers/notify_shared_examples.rb index 919311adc96..b0cbf0b0d65 100644 --- a/spec/support/shared_examples/mailers/notify_shared_examples.rb +++ b/spec/support/shared_examples/mailers/notify_shared_examples.rb @@ -75,7 +75,7 @@ RSpec.shared_examples 'a new thread email with reply-by-email enabled' do aggregate_failures do is_expected.to have_header('Message-ID', "<#{route_key}@#{host}>") - is_expected.to have_header('References', /\A<reply\-.*@#{host}>\Z/ ) + is_expected.to have_header('References', /\A<reply-.*@#{host}>\Z/ ) end end end @@ -91,7 +91,7 @@ RSpec.shared_examples 'a thread answer email with reply-by-email enabled' do aggregate_failures do is_expected.to have_header('Message-ID', /\A<.*@#{host}>\Z/) is_expected.to have_header('In-Reply-To', "<#{route_key}@#{host}>") - is_expected.to have_header('References', /\A<reply\-.*@#{host}> <#{route_key}@#{host}>\Z/ ) + is_expected.to have_header('References', /\A<reply-.*@#{host}> <#{route_key}@#{host}>\Z/ ) is_expected.to have_subject(/^Re: /) end end diff --git a/spec/support/shared_examples/requests/api/graphql/packages/group_and_project_packages_list_shared_examples.rb b/spec/support/shared_examples/requests/api/graphql/packages/group_and_project_packages_list_shared_examples.rb index 65b40b3b2b8..f5835460a77 100644 --- a/spec/support/shared_examples/requests/api/graphql/packages/group_and_project_packages_list_shared_examples.rb +++ b/spec/support/shared_examples/requests/api/graphql/packages/group_and_project_packages_list_shared_examples.rb @@ -154,7 +154,7 @@ RSpec.shared_examples 'group and project packages query' do end it 'throws an error' do - expect_graphql_errors_to_include(/Argument \'sort\' on Field \'packages\' has an invalid value/) + expect_graphql_errors_to_include(/Argument 'sort' on Field 'packages' has an invalid value/) end end |