@@ -153,4 +153,37 @@ suite('MenuService', function () {
153153 assert . equal ( three . id , 'b' ) ;
154154 assert . equal ( four . id , 'a' ) ;
155155 } ) ;
156+
157+
158+ test ( 'in group sorting, special: navigation' , function ( ) {
159+
160+ disposables . push ( MenuRegistry . appendMenuItem ( MenuId . ExplorerContext , {
161+ command : { id : 'a' , title : 'aaa' } ,
162+ group : 'navigation' ,
163+ order : 1.3
164+ } ) ) ;
165+
166+ disposables . push ( MenuRegistry . appendMenuItem ( MenuId . ExplorerContext , {
167+ command : { id : 'b' , title : 'fff' } ,
168+ group : 'navigation' ,
169+ order : 1.2
170+ } ) ) ;
171+
172+ disposables . push ( MenuRegistry . appendMenuItem ( MenuId . ExplorerContext , {
173+ command : { id : 'c' , title : 'zzz' } ,
174+ group : 'navigation' ,
175+ order : 1.1
176+ } ) ) ;
177+
178+ const groups = menuService . createMenu ( MenuId . ExplorerContext , keybindingService ) . getActions ( ) ;
179+
180+ assert . equal ( groups . length , 1 ) ;
181+ const [ [ , actions ] ] = groups ;
182+
183+ assert . equal ( actions . length , 3 ) ;
184+ const [ one , two , three ] = actions ;
185+ assert . equal ( one . id , 'c' ) ;
186+ assert . equal ( two . id , 'b' ) ;
187+ assert . equal ( three . id , 'a' ) ;
188+ } ) ;
156189} ) ;
0 commit comments