Commit 6a603654 authored by Scott Hampton's avatar Scott Hampton

Merge branch 'unsubscribe-pipeline-subscriptions' into 'master'

Delete pipeline subscriptions from the UI

See merge request gitlab-org/gitlab!45166
parents 5103b264 a56a02ee
...@@ -20,8 +20,9 @@ ...@@ -20,8 +20,9 @@
%tr %tr
%th= _("Project") %th= _("Project")
%th= _("Author") %th= _("Author")
%th
%tbody %tbody
- @project.upstream_projects.each do |project| - @project.upstream_project_subscriptions.each do |subscription|
= render 'projects/settings/subscriptions/project', project: project = render 'projects/settings/subscriptions/project', project: subscription.upstream_project, subscription: subscription
- @project.downstream_projects.each do |project| - @project.downstream_project_subscriptions.each do |subscription|
= render 'projects/settings/subscriptions/project', project: project = render 'projects/settings/subscriptions/project', project: subscription.downstream_project, subscription: subscription
- tooltip = _('Delete subscription')
%tr %tr
%td %td
= project.name = project.name
%td %td
= user_avatar_without_link(user: project.owner, size: 32) = user_avatar_without_link(user: project.owner, size: 32)
= project.owner.name = project.owner.name
%td.gl-text-right
= link_to project_subscription_path(@project, subscription.id), method: :delete, data: { toggle: 'tooltip', title: tooltip, container: 'body', testid: 'delete-subscription' }, class: "gl-button btn btn-danger" do
= sprite_icon('close', size: 16, css_class: 'gl-icon')
---
title: Delete pipeline subscriptions from the UI
merge_request: 45166
author:
type: added
...@@ -56,4 +56,18 @@ RSpec.describe 'Project Subscriptions', :js do ...@@ -56,4 +56,18 @@ RSpec.describe 'Project Subscriptions', :js do
expect(page).to have_content('This project path either does not exist or you do not have access.') expect(page).to have_content('This project path either does not exist or you do not have access.')
end end
it 'subscription is removed successfully' do
within '#pipeline-subscriptions' do
within 'form' do
fill_in 'upstream_project_path', with: upstream_project.full_path
click_on 'Subscribe'
end
end
find('[data-testid="delete-subscription"]').click
expect(page).to have_content('Subscription successfully deleted.')
end
end end
...@@ -8618,6 +8618,9 @@ msgstr "" ...@@ -8618,6 +8618,9 @@ msgstr ""
msgid "Delete source branch" msgid "Delete source branch"
msgstr "" msgstr ""
msgid "Delete subscription"
msgstr ""
msgid "Delete this attachment" msgid "Delete this attachment"
msgstr "" msgstr ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment