Commit a73ab8e7 authored by Andrew Fontaine's avatar Andrew Fontaine

Merge branch 'peterhegman/change-group-icon-to-subgroup-icon' into 'master'

Change subgroups to use official `subgroup` icon

See merge request gitlab-org/gitlab!85005
parents 75acd425 dbb66e1f
......@@ -55,7 +55,7 @@ export default {
:title="__('Subgroups')"
:value="item.subgroupCount"
css-class="number-subgroups gl-ml-5"
icon-name="group"
icon-name="subgroup"
data-testid="subgroups-count"
/>
<item-stats-value
......
......@@ -15,7 +15,7 @@ export default {
computed: {
iconClass() {
if (this.itemType === ITEM_TYPE.GROUP) {
return 'group';
return 'subgroup';
}
return 'project';
},
......
......@@ -20,7 +20,7 @@ module Sidebars
override :sprite_icon
def sprite_icon
'group'
context.group.subgroup? ? 'subgroup' : 'group'
end
override :active_routes
......
......@@ -34,7 +34,7 @@ describe('ItemTypeIcon', () => {
it.each`
type | icon
${ITEM_TYPE.GROUP} | ${'group'}
${ITEM_TYPE.GROUP} | ${'subgroup'}
${ITEM_TYPE.PROJECT} | ${'project'}
`('shows "$icon" icon when `itemType` is "$type"', ({ type, icon }) => {
createComponent({
......
......@@ -28,6 +28,20 @@ RSpec.describe Sidebars::Groups::Menus::GroupInformationMenu do
end
end
describe '#sprite_icon' do
subject { described_class.new(context).sprite_icon }
context 'when group is a root group' do
specify { is_expected.to eq 'group'}
end
context 'when group is a child group' do
let(:group) { build(:group, parent: root_group) }
specify { is_expected.to eq 'subgroup'}
end
end
describe 'Menu Items' do
subject { described_class.new(context).renderable_items.index { |e| e.item_id == item_id } }
......
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