Skip to content

Commit

Permalink
Fixes to the nav_bar group selection subcategory order (#3344)
Browse files Browse the repository at this point in the history
  • Loading branch information
abujeda authored Feb 7, 2024
1 parent 4efca57 commit aef7ca1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/dashboard/app/apps/nav_bar.rb
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def self.item_from_token(token)
group = OodAppGroup.groups_for(apps: SysRouter.apps).select { |g| g.title.downcase == token.downcase }.first
return nil if group.nil?
group.apps = extract_links(group.apps)
extend_group(group)
extend_group(group, sort: true)
end
end

Expand Down
3 changes: 2 additions & 1 deletion apps/dashboard/test/apps/nav_bar_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ def setup
result = NavBar.items([nav_item])
assert_equal 1, result.size
assert_equal "layouts/nav/group", result[0].partial_path
assert_equal false, result[0].sort
# sort should be true to order subcategories
assert_equal true, result[0].sort
assert_equal "Interactive Apps", result[0].title
assert_equal 4, result[0].apps.size
end
Expand Down

0 comments on commit aef7ca1

Please sign in to comment.