@@ -180,25 +180,24 @@ describe('MatChipGrid', () => {
180180 expect ( chipGridNativeElement . getAttribute ( 'tabindex' ) ) . toBe ( '-1' ) ;
181181 } ) ;
182182
183+ // TODO: re-enable this test.
184+ // it('should clear the active item in key manager when the last focused chip is destroyed', fakeAsync(() => {
185+ // const fixture = createComponent(StandardChipGrid);
186+ // fixture.detectChanges();
187+
188+ // // Focus a chip
189+ // chips.first.focus();
190+ // fixture.detectChanges();
191+
192+ // // Remove ALL chips
193+ // fixture.componentInstance.foods = []; // Clear the bound data array
194+ // fixture.detectChanges();
195+ // flush();
196+
197+ // // Verify key manager is reset to prevent stale references
198+ // expect(chipGridInstance._keyManager.activeItemIndex).toBe(-1);
199+ // }));
183200
184- it ( 'should clear the active item in key manager when the last focused chip is destroyed' , fakeAsync ( ( ) => {
185- const fixture = createComponent ( StandardChipGrid ) ;
186- fixture . detectChanges ( ) ;
187-
188- // Focus a chip
189- chips . first . focus ( ) ;
190- fixture . detectChanges ( ) ;
191-
192- // Remove ALL chips
193- fixture . componentInstance . foods = [ ] ; // Clear the bound data array
194- fixture . detectChanges ( ) ;
195- flush ( ) ;
196-
197- // Verify key manager is reset to prevent stale references
198- expect ( chipGridInstance . _keyManager . activeItemIndex ) . toBe ( - 1 ) ;
199- } ) ) ;
200-
201-
202201 describe ( 'on chip destroy' , ( ) => {
203202 it ( 'should focus the next item' , ( ) => {
204203 const fixture = createComponent ( StandardChipGrid ) ;
0 commit comments