Commit 0f366c74 authored by Phil Hughes's avatar Phil Hughes

Fixed default group sort option

Closes #38808
parent 05054803
class Dashboard::GroupsController < Dashboard::ApplicationController class Dashboard::GroupsController < Dashboard::ApplicationController
def index def index
@sort = params[:sort] || 'id_desc' @sort = params[:sort] || 'created_desc'
@groups = @groups =
if params[:parent_id] && Group.supports_nested_groups? if params[:parent_id] && Group.supports_nested_groups?
......
---
title: Fixed group sort dropdown defaulting to empty
merge_request:
author:
type: fixed
...@@ -5,6 +5,12 @@ RSpec.describe 'Dashboard Group' do ...@@ -5,6 +5,12 @@ RSpec.describe 'Dashboard Group' do
sign_in(create(:user)) sign_in(create(:user))
end end
it 'defaults sort dropdown to last created' do
visit dashboard_groups_path
expect(page).to have_button('Last created')
end
it 'creates new group', js: true do it 'creates new group', js: true do
visit dashboard_groups_path visit dashboard_groups_path
find('.btn-new').trigger('click') find('.btn-new').trigger('click')
......
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