parent
0505480324
commit
0f366c7413
|
@ -1,6 +1,6 @@
|
|||
class Dashboard::GroupsController < Dashboard::ApplicationController
|
||||
def index
|
||||
@sort = params[:sort] || 'id_desc'
|
||||
@sort = params[:sort] || 'created_desc'
|
||||
|
||||
@groups =
|
||||
if params[:parent_id] && Group.supports_nested_groups?
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Fixed group sort dropdown defaulting to empty
|
||||
merge_request:
|
||||
author:
|
||||
type: fixed
|
|
@ -5,6 +5,12 @@ RSpec.describe 'Dashboard Group' do
|
|||
sign_in(create(:user))
|
||||
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
|
||||
visit dashboard_groups_path
|
||||
find('.btn-new').trigger('click')
|
||||
|
|
Loading…
Reference in New Issue