Commit 3f32ae9e authored by Stan Hu's avatar Stan Hu

Merge branch '355503-unable-to-invite-groups-to-a-project-when-group-lock-enabled' into 'master'

Resolve Unable to Invite Groups to a Project When Group Lock Enabled

See merge request gitlab-org/gitlab!82636
parents 4ac5a40a 8d2ebd4d
- return unless can_admin_project_member?(project)
- return unless can_invite_members_for_project?(project)
.js-invite-groups-modal{ data: common_invite_group_modal_data(project, ProjectMember, 'true') }
......@@ -29,9 +29,11 @@ RSpec.describe 'projects/project_members/index', :aggregate_failures do
expect(rendered).to have_content('You can invite another group to')
expect(rendered).not_to have_link('Import from a project')
expect(rendered).to have_selector('.js-invite-group-trigger')
expect(rendered).to have_selector('.js-invite-groups-modal')
expect(rendered).not_to have_selector('.js-invite-members-trigger')
expect(rendered).not_to have_content('Members can be added by project')
expect(response).to render_template(partial: 'projects/_invite_members_modal')
expect(response).to render_template(partial: 'projects/_invite_groups_modal')
end
context 'when project can not be shared' do
......@@ -44,6 +46,8 @@ RSpec.describe 'projects/project_members/index', :aggregate_failures do
expect(rendered).to have_content('Project members')
expect(rendered).not_to have_content('You can invite')
expect(rendered).not_to have_selector('.js-invite-group-trigger')
expect(response).not_to render_template(partial: 'projects/_invite_groups_modal')
expect(response).to render_template(partial: 'projects/_invite_members_modal')
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