@@ -157,49 +157,49 @@ describe('Standalone Menu Pattern', () => {
157157
158158 it ( 'should select an item on click' , ( ) => {
159159 const banana = getItem ( 'Banana' ) ;
160- spyOn ( fixture . componentInstance , 'onSelect ' ) ;
160+ spyOn ( fixture . componentInstance , 'itemSelected ' ) ;
161161
162162 click ( banana ! ) ;
163- expect ( fixture . componentInstance . onSelect ) . toHaveBeenCalledWith ( 'Banana' ) ;
163+ expect ( fixture . componentInstance . itemSelected ) . toHaveBeenCalledWith ( 'Banana' ) ;
164164 } ) ;
165165
166166 it ( 'should select an item on enter' , ( ) => {
167167 const banana = getItem ( 'Banana' ) ;
168- spyOn ( fixture . componentInstance , 'onSelect ' ) ;
168+ spyOn ( fixture . componentInstance , 'itemSelected ' ) ;
169169
170170 keydown ( document . activeElement ! , 'ArrowDown' ) ; // Move focus to Banana
171171 expect ( document . activeElement ) . toBe ( banana ) ;
172172
173173 keydown ( banana ! , 'Enter' ) ;
174- expect ( fixture . componentInstance . onSelect ) . toHaveBeenCalledWith ( 'Banana' ) ;
174+ expect ( fixture . componentInstance . itemSelected ) . toHaveBeenCalledWith ( 'Banana' ) ;
175175 } ) ;
176176
177177 it ( 'should select an item on space' , ( ) => {
178178 const banana = getItem ( 'Banana' ) ;
179- spyOn ( fixture . componentInstance , 'onSelect ' ) ;
179+ spyOn ( fixture . componentInstance , 'itemSelected ' ) ;
180180
181181 keydown ( document . activeElement ! , 'ArrowDown' ) ; // Move focus to Banana
182182 expect ( document . activeElement ) . toBe ( banana ) ;
183183
184184 keydown ( banana ! , ' ' ) ;
185- expect ( fixture . componentInstance . onSelect ) . toHaveBeenCalledWith ( 'Banana' ) ;
185+ expect ( fixture . componentInstance . itemSelected ) . toHaveBeenCalledWith ( 'Banana' ) ;
186186 } ) ;
187187
188188 it ( 'should not select a disabled item' , ( ) => {
189189 const cherry = getItem ( 'Cherry' ) ;
190- spyOn ( fixture . componentInstance , 'onSelect ' ) ;
190+ spyOn ( fixture . componentInstance , 'itemSelected ' ) ;
191191
192192 click ( cherry ! ) ;
193- expect ( fixture . componentInstance . onSelect ) . not . toHaveBeenCalled ( ) ;
193+ expect ( fixture . componentInstance . itemSelected ) . not . toHaveBeenCalled ( ) ;
194194
195195 keydown ( document . activeElement ! , 'End' ) ;
196196 expect ( document . activeElement ) . toBe ( cherry ) ;
197197
198198 keydown ( cherry ! , 'Enter' ) ;
199- expect ( fixture . componentInstance . onSelect ) . not . toHaveBeenCalled ( ) ;
199+ expect ( fixture . componentInstance . itemSelected ) . not . toHaveBeenCalled ( ) ;
200200
201201 keydown ( cherry ! , ' ' ) ;
202- expect ( fixture . componentInstance . onSelect ) . not . toHaveBeenCalled ( ) ;
202+ expect ( fixture . componentInstance . itemSelected ) . not . toHaveBeenCalled ( ) ;
203203 } ) ;
204204 } ) ;
205205
@@ -317,18 +317,18 @@ describe('Standalone Menu Pattern', () => {
317317 } ) ;
318318
319319 it ( 'should close on selecting an item on click' , ( ) => {
320- spyOn ( fixture . componentInstance , 'onSelect ' ) ;
320+ spyOn ( fixture . componentInstance , 'itemSelected ' ) ;
321321 click ( getItem ( 'Berries' ) ! ) ; // open submenu
322322 expect ( isSubmenuExpanded ( ) ) . toBe ( true ) ;
323323
324324 click ( getItem ( 'Blueberry' ) ! ) ;
325325
326- expect ( fixture . componentInstance . onSelect ) . toHaveBeenCalledWith ( 'Blueberry' ) ;
326+ expect ( fixture . componentInstance . itemSelected ) . toHaveBeenCalledWith ( 'Blueberry' ) ;
327327 expect ( isSubmenuExpanded ( ) ) . toBe ( false ) ;
328328 } ) ;
329329
330330 it ( 'should close on selecting an item on enter' , ( ) => {
331- spyOn ( fixture . componentInstance , 'onSelect ' ) ;
331+ spyOn ( fixture . componentInstance , 'itemSelected ' ) ;
332332 const apple = getItem ( 'Apple' ) ;
333333 const banana = getItem ( 'Banana' ) ;
334334 const berries = getItem ( 'Berries' ) ;
@@ -342,12 +342,12 @@ describe('Standalone Menu Pattern', () => {
342342
343343 keydown ( blueberry ! , 'Enter' ) ;
344344
345- expect ( fixture . componentInstance . onSelect ) . toHaveBeenCalledWith ( 'Blueberry' ) ;
345+ expect ( fixture . componentInstance . itemSelected ) . toHaveBeenCalledWith ( 'Blueberry' ) ;
346346 expect ( isSubmenuExpanded ( ) ) . toBe ( false ) ;
347347 } ) ;
348348
349349 it ( 'should close on selecting an item on space' , ( ) => {
350- spyOn ( fixture . componentInstance , 'onSelect ' ) ;
350+ spyOn ( fixture . componentInstance , 'itemSelected ' ) ;
351351 const apple = getItem ( 'Apple' ) ;
352352 const banana = getItem ( 'Banana' ) ;
353353 const berries = getItem ( 'Berries' ) ;
@@ -361,7 +361,7 @@ describe('Standalone Menu Pattern', () => {
361361
362362 keydown ( blueberry ! , ' ' ) ;
363363
364- expect ( fixture . componentInstance . onSelect ) . toHaveBeenCalledWith ( 'Blueberry' ) ;
364+ expect ( fixture . componentInstance . itemSelected ) . toHaveBeenCalledWith ( 'Blueberry' ) ;
365365 expect ( isSubmenuExpanded ( ) ) . toBe ( false ) ;
366366 } ) ;
367367
@@ -959,7 +959,7 @@ describe('Menu Bar Pattern', () => {
959959
960960@Component ( {
961961 template : `
962- <div ngMenu [expansionDelay]="0" (onSelect )="onSelect ($event)">
962+ <div ngMenu [expansionDelay]="0" (itemSelected )="itemSelected ($event)">
963963 <ng-template ngMenuContent>
964964 <div ngMenuItem value='Apple' searchTerm='Apple'>Apple</div>
965965 <div ngMenuItem value='Banana' searchTerm='Banana'>Banana</div>
@@ -980,7 +980,7 @@ describe('Menu Bar Pattern', () => {
980980 imports : [ Menu , MenuItem , MenuContent ] ,
981981} )
982982class StandaloneMenuExample {
983- onSelect ( value : string ) { }
983+ itemSelected ( value : string ) { }
984984}
985985
986986@Component ( {
0 commit comments