@@ -2,7 +2,7 @@ import {async, ComponentFixture, TestBed} from '@angular/core/testing';
22import { Component , DebugElement , QueryList } from '@angular/core' ;
33import { By } from '@angular/platform-browser' ;
44import { MdChip , MdChipList , MdChipsModule } from './index' ;
5- import { ListKeyManager } from '../core/a11y/list -key-manager' ;
5+ import { FocusKeyManager } from '../core/a11y/focus -key-manager' ;
66import { FakeEvent } from '../core/a11y/list-key-manager.spec' ;
77import { SPACE , LEFT_ARROW , RIGHT_ARROW } from '../core/keyboard/keycodes' ;
88
@@ -21,7 +21,7 @@ describe('MdChipList', () => {
2121 let chipListInstance : MdChipList ;
2222 let testComponent : StaticChipList ;
2323 let chips : QueryList < MdChip > ;
24- let manager : ListKeyManager ;
24+ let manager : FocusKeyManager ;
2525
2626 beforeEach ( async ( ( ) => {
2727 TestBed . configureTestingModule ( {
@@ -60,7 +60,7 @@ describe('MdChipList', () => {
6060 chipListInstance . focus ( ) ;
6161 fixture . detectChanges ( ) ;
6262
63- expect ( manager . focusedItemIndex ) . toBe ( 0 ) ;
63+ expect ( manager . activeItemIndex ) . toBe ( 0 ) ;
6464 } ) ;
6565
6666 it ( 'watches for chip focus' , ( ) => {
@@ -71,7 +71,7 @@ describe('MdChipList', () => {
7171 lastItem . focus ( ) ;
7272 fixture . detectChanges ( ) ;
7373
74- expect ( manager . focusedItemIndex ) . toBe ( lastIndex ) ;
74+ expect ( manager . activeItemIndex ) . toBe ( lastIndex ) ;
7575 } ) ;
7676
7777 describe ( 'on chip destroy' , ( ) => {
@@ -87,7 +87,7 @@ describe('MdChipList', () => {
8787 fixture . detectChanges ( ) ;
8888
8989 // It focuses the 4th item (now at index 2)
90- expect ( manager . focusedItemIndex ) . toEqual ( 2 ) ;
90+ expect ( manager . activeItemIndex ) . toEqual ( 2 ) ;
9191 } ) ;
9292
9393 it ( 'focuses the previous item' , ( ) => {
@@ -103,7 +103,7 @@ describe('MdChipList', () => {
103103 fixture . detectChanges ( ) ;
104104
105105 // It focuses the next-to-last item
106- expect ( manager . focusedItemIndex ) . toEqual ( lastIndex - 1 ) ;
106+ expect ( manager . activeItemIndex ) . toEqual ( lastIndex - 1 ) ;
107107 } ) ;
108108 } ) ;
109109 } ) ;
@@ -124,14 +124,14 @@ describe('MdChipList', () => {
124124
125125 // Focus the last item in the array
126126 lastItem . focus ( ) ;
127- expect ( manager . focusedItemIndex ) . toEqual ( lastIndex ) ;
127+ expect ( manager . activeItemIndex ) . toEqual ( lastIndex ) ;
128128
129129 // Press the LEFT arrow
130130 chipListInstance . _keydown ( LEFT_EVENT ) ;
131131 fixture . detectChanges ( ) ;
132132
133133 // It focuses the next-to-last item
134- expect ( manager . focusedItemIndex ) . toEqual ( lastIndex - 1 ) ;
134+ expect ( manager . activeItemIndex ) . toEqual ( lastIndex - 1 ) ;
135135 } ) ;
136136
137137 it ( 'right arrow focuses next item' , ( ) => {
@@ -144,14 +144,14 @@ describe('MdChipList', () => {
144144
145145 // Focus the last item in the array
146146 firstItem . focus ( ) ;
147- expect ( manager . focusedItemIndex ) . toEqual ( 0 ) ;
147+ expect ( manager . activeItemIndex ) . toEqual ( 0 ) ;
148148
149149 // Press the RIGHT arrow
150150 chipListInstance . _keydown ( RIGHT_EVENT ) ;
151151 fixture . detectChanges ( ) ;
152152
153153 // It focuses the next-to-last item
154- expect ( manager . focusedItemIndex ) . toEqual ( 1 ) ;
154+ expect ( manager . activeItemIndex ) . toEqual ( 1 ) ;
155155 } ) ;
156156
157157 describe ( 'when selectable is true' , ( ) => {
0 commit comments