Commit cef05ad0 authored by Olena Horal-Koretska's avatar Olena Horal-Koretska

Merge branch 'fix-delete-project-button-in-group-settings' into 'master'

Remove useless delete button in group settings

See merge request gitlab-org/gitlab!66067
parents 01370e6a feaf24e7
= link_to _('Delete'), project, data: { confirm: remove_project_message(project) }, method: :delete, class: "btn gl-button btn-danger"
- if project.archived
%span.badge.badge-warning.badge-pill.gl-badge.md= _('archived')
......@@ -15,13 +15,12 @@
.controls
= link_to _('Members'), project_project_members_path(project), id: "edit_#{dom_id(project)}", class: "btn gl-button"
= link_to _('Edit'), edit_project_path(project), id: "edit_#{dom_id(project)}", class: "btn gl-button"
= link_to _('Delete'), project, data: { confirm: remove_project_message(project)}, method: :delete, class: "btn gl-button btn-danger"
= render 'delete_project_button', project: project
.stats
%span.badge.badge-pill
= storage_counter(project.statistics&.storage_size)
- if project.archived
%span.badge.badge-warning archived
= render 'project_badges', project: project
.title
= link_to(project_path(project)) do
......
- unless project.marked_for_deletion?
= link_to _('Delete'), project, data: { confirm: remove_project_message(project) }, method: :delete, class: "btn gl-button btn-danger"
- if project.marked_for_deletion?
%span.badge.badge-warning.badge-pill.gl-badge.md= _('pending deletion')
- elsif project.archived
%span.badge.badge-warning.badge-pill.gl-badge.md= _('archived')
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe 'Group projects page' do
let(:user) { create :user }
let(:group) { create :group }
before do
group.add_owner(user)
sign_in(user)
end
context 'when group has project pending deletion' do
before do
stub_licensed_features(adjourned_deletion_for_projects_and_groups: true)
end
let!(:project) { create(:project, :archived, namespace: group, marked_for_deletion_at: Date.current) }
it 'renders projects list' do
visit projects_group_path(group)
expect(page).to have_link project.name
expect(page).not_to have_css('span.badge.badge-warning', text: 'archived')
expect(page).to have_css('span.badge.badge-warning', text: 'pending deletion')
end
end
end
......@@ -23,7 +23,7 @@ RSpec.describe 'User browse group projects page' do
visit projects_group_path(group)
expect(page).to have_link project.name
expect(page).to have_xpath("//span[@class='badge badge-warning']", text: 'archived')
expect(page).to have_css('span.badge.badge-warning', text: 'archived')
end
end
end
......
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