Commit dbb66e1f authored by peterhegman's avatar peterhegman Committed by Peter Hegman

Change subgroups to use official `subgroup` icon

Instead of using the `group` icon

Changelog: changed
parent 658d583a
...@@ -55,7 +55,7 @@ export default { ...@@ -55,7 +55,7 @@ export default {
:title="__('Subgroups')" :title="__('Subgroups')"
:value="item.subgroupCount" :value="item.subgroupCount"
css-class="number-subgroups gl-ml-5" css-class="number-subgroups gl-ml-5"
icon-name="group" icon-name="subgroup"
data-testid="subgroups-count" data-testid="subgroups-count"
/> />
<item-stats-value <item-stats-value
......
...@@ -15,7 +15,7 @@ export default { ...@@ -15,7 +15,7 @@ export default {
computed: { computed: {
iconClass() { iconClass() {
if (this.itemType === ITEM_TYPE.GROUP) { if (this.itemType === ITEM_TYPE.GROUP) {
return 'group'; return 'subgroup';
} }
return 'project'; return 'project';
}, },
......
...@@ -20,7 +20,7 @@ module Sidebars ...@@ -20,7 +20,7 @@ module Sidebars
override :sprite_icon override :sprite_icon
def sprite_icon def sprite_icon
'group' context.group.subgroup? ? 'subgroup' : 'group'
end end
override :active_routes override :active_routes
......
...@@ -34,7 +34,7 @@ describe('ItemTypeIcon', () => { ...@@ -34,7 +34,7 @@ describe('ItemTypeIcon', () => {
it.each` it.each`
type | icon type | icon
${ITEM_TYPE.GROUP} | ${'group'} ${ITEM_TYPE.GROUP} | ${'subgroup'}
${ITEM_TYPE.PROJECT} | ${'project'} ${ITEM_TYPE.PROJECT} | ${'project'}
`('shows "$icon" icon when `itemType` is "$type"', ({ type, icon }) => { `('shows "$icon" icon when `itemType` is "$type"', ({ type, icon }) => {
createComponent({ createComponent({
......
...@@ -28,6 +28,20 @@ RSpec.describe Sidebars::Groups::Menus::GroupInformationMenu do ...@@ -28,6 +28,20 @@ RSpec.describe Sidebars::Groups::Menus::GroupInformationMenu do
end end
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 describe 'Menu Items' do
subject { described_class.new(context).renderable_items.index { |e| e.item_id == item_id } } 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