Commit b13cf622 authored by Thong Kuah's avatar Thong Kuah

Merge branch '37067-sort-direction-icon' into 'master'

Resolve "When issues sort by weight, direction change but sort icon doesn't change"

Closes #37067

See merge request gitlab-org/gitlab!21447
parents d47b3cd0 f9115ff5
......@@ -55,10 +55,10 @@ module EE
}.merge(super)
end
override :issuable_sort_icon_suffix
def issuable_sort_icon_suffix(sort_value)
override :sort_direction_icon
def sort_direction_icon(sort_value)
if sort_value == sort_value_weight
'lowest'
'sort-lowest'
else
super
end
......
---
title: Fix sort icon direction when sorting by weight
merge_request: 21447
author: Jan Beckmann
type: fixed
# frozen_string_literal: true
require 'spec_helper'
describe SortingHelper do
describe '#sort_direction_icon' do
it 'returns lowest for weight' do
expect(sort_direction_icon('weight')).to eq('sort-lowest')
end
it 'behaves like non-ee for other sort values' do
expect(sort_direction_icon('milestone')).to eq('sort-lowest')
expect(sort_direction_icon('last_joined')).to eq('sort-highest')
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