@@ -279,7 +279,7 @@ describe('MatChipList', () => {
279
279
280
280
describe ( 'when the input has focus' , ( ) => {
281
281
282
- it ( 'should focus the last chip when press DELETE' , ( ) => {
282
+ it ( 'should not focus the last chip when press DELETE' , ( ) => {
283
283
let nativeInput = fixture . nativeElement . querySelector ( 'input' ) ;
284
284
let DELETE_EVENT : KeyboardEvent =
285
285
createKeyboardEvent ( 'keydown' , DELETE , nativeInput ) ;
@@ -292,8 +292,8 @@ describe('MatChipList', () => {
292
292
chipListInstance . _keydown ( DELETE_EVENT ) ;
293
293
fixture . detectChanges ( ) ;
294
294
295
- // It focuses the last chip
296
- expect ( manager . activeItemIndex ) . toEqual ( chips . length - 1 ) ;
295
+ // It doesn't focus the last chip
296
+ expect ( manager . activeItemIndex ) . toEqual ( - 1 ) ;
297
297
} ) ;
298
298
299
299
it ( 'should focus the last chip when press BACKSPACE' , ( ) => {
@@ -786,7 +786,7 @@ describe('MatChipList', () => {
786
786
787
787
describe ( 'when the input has focus' , ( ) => {
788
788
789
- it ( 'should focus the last chip when press DELETE' , ( ) => {
789
+ it ( 'should not focus the last chip when press DELETE' , ( ) => {
790
790
let nativeInput = fixture . nativeElement . querySelector ( 'input' ) ;
791
791
let DELETE_EVENT : KeyboardEvent =
792
792
createKeyboardEvent ( 'keydown' , DELETE , nativeInput ) ;
@@ -799,8 +799,8 @@ describe('MatChipList', () => {
799
799
chipListInstance . _keydown ( DELETE_EVENT ) ;
800
800
fixture . detectChanges ( ) ;
801
801
802
- // It focuses the last chip
803
- expect ( manager . activeItemIndex ) . toEqual ( chips . length - 1 ) ;
802
+ // It doesn't focus the last chip
803
+ expect ( manager . activeItemIndex ) . toEqual ( - 1 ) ;
804
804
} ) ;
805
805
806
806
it ( 'should focus the last chip when press BACKSPACE' , ( ) => {
0 commit comments