Commit 615eb1f0 authored by Alfredo Sumaran's avatar Alfredo Sumaran

Merge branch 'feature/admin-user-groups-link' into 'master'

Make the 'Group projects' links clickable in the admin screens

## What does this MR do?
This MR makes the group links within the 'users' section of the admin interface clickable. Currently, to view the details of groups a user is a member of, you have to go back to the 'groups' tab (which isn't ideal).

## Are there points in the code the reviewer needs to double check?
No

## Why was this MR needed?
It's a UX improvement - it saves going back to the 'groups' a user is a member of and then clicking the group to view the group details.

## Screenshots (if relevant)

### Before
![Screenshot_from_2016-11-21_14-25-01](/uploads/2a6b75efd4c700e5760c64f0db17e847/Screenshot_from_2016-11-21_14-25-01.png)

### After
![Screenshot_from_2016-11-21_14-24-42](/uploads/9be288c1d9e4cf818c96e11e24790860/Screenshot_from_2016-11-21_14-24-42.png)

## Does this MR meet the acceptance criteria?

- [ ] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- Tests
  - [ ] Added for this feature/bug
  - [ ] All builds are passing
- [ ] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [ ] Branch has no merge conflicts with `master` (if it does - rebase it please)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?

See merge request !7620
parents e9357405 454e9631
......@@ -7,7 +7,7 @@
%ul.well-list
- @user.groups.each do |group|
%li
%strong= group.name
%strong= link_to group.name, admin_group_path(group)
– access to
#{pluralize(group.projects.count, 'project')}
......
---
title: The admin user projects view now has a clickable group link
merge_request: 7620
author: James Gregory
......@@ -225,4 +225,32 @@ describe "Admin::Users", feature: true do
end
end
end
describe "GET /admin/users/:id/projects" do
before do
@group = create(:group)
@project = create(:project, group: @group)
@simple_user = create(:user)
@group.add_developer(@simple_user)
visit projects_admin_user_path(@simple_user)
end
it "lists group projects" do
within(:css, '.append-bottom-default + .panel') do
expect(page).to have_content 'Group projects'
expect(page).to have_link @group.name, admin_group_path(@group)
end
end
it 'allows navigation to the group details' do
within(:css, '.append-bottom-default + .panel') do
click_link @group.name
end
within(:css, 'h3.page-title') do
expect(page).to have_content "Group: #{@group.name}"
end
expect(page).to have_content @project.name
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