@@ -13,10 +13,10 @@ import {TestbedHarnessEnvironment} from '@angular/cdk/testing/testbed';
1313import { Combobox , ComboboxPopup , ComboboxWidget } from '../index' ;
1414import { Listbox , Option } from '../../listbox' ;
1515import { ListboxHarness , ListboxOptionHarness } from '../../listbox/testing/listbox-harness' ;
16- import { SimpleComboboxHarness } from './simple- combobox-harness' ;
16+ import { ComboboxHarness } from './combobox-harness' ;
1717import { OverlayModule } from '@angular/cdk/overlay' ;
1818
19- describe ( 'SimpleComboboxHarness ' , ( ) => {
19+ describe ( 'ComboboxHarness ' , ( ) => {
2020 let fixture : ComponentFixture < any > ;
2121 let loader : HarnessLoader ;
2222
@@ -27,22 +27,22 @@ describe('SimpleComboboxHarness', () => {
2727 }
2828
2929 describe ( 'Basic usage' , ( ) => {
30- beforeEach ( ( ) => setupTest ( SimpleComboboxTestApp ) ) ;
30+ beforeEach ( ( ) => setupTest ( ComboboxTestApp ) ) ;
3131
3232 it ( 'should load combobox harness' , async ( ) => {
33- await expectAsync ( loader . getHarness ( SimpleComboboxHarness ) ) . toBeResolved ( ) ;
33+ await expectAsync ( loader . getHarness ( ComboboxHarness ) ) . toBeResolved ( ) ;
3434 } ) ;
3535
3636 it ( 'should get and set values' , async ( ) => {
37- const combobox = await loader . getHarness ( SimpleComboboxHarness ) ;
37+ const combobox = await loader . getHarness ( ComboboxHarness ) ;
3838 await combobox . setValue ( 'California' ) ;
3939 fixture . detectChanges ( ) ;
4040
4141 expect ( await combobox . getValue ( ) ) . toBe ( 'California' ) ;
4242 } ) ;
4343
4444 it ( 'should correctly report disabled state' , async ( ) => {
45- const combobox = await loader . getHarness ( SimpleComboboxHarness ) ;
45+ const combobox = await loader . getHarness ( ComboboxHarness ) ;
4646 expect ( await combobox . isDisabled ( ) ) . toBeFalse ( ) ;
4747
4848 fixture . componentInstance . disabled . set ( true ) ;
@@ -52,7 +52,7 @@ describe('SimpleComboboxHarness', () => {
5252 } ) ;
5353
5454 it ( 'should open and close the popup' , async ( ) => {
55- const combobox = await loader . getHarness ( SimpleComboboxHarness ) ;
55+ const combobox = await loader . getHarness ( ComboboxHarness ) ;
5656 expect ( await combobox . isOpen ( ) ) . toBeFalse ( ) ;
5757
5858 await combobox . open ( ) ;
@@ -65,7 +65,7 @@ describe('SimpleComboboxHarness', () => {
6565 } ) ;
6666
6767 it ( 'should allow loading nested harnesses within the popup content via unified container API' , async ( ) => {
68- const combobox = await loader . getHarness ( SimpleComboboxHarness ) ;
68+ const combobox = await loader . getHarness ( ComboboxHarness ) ;
6969 await combobox . open ( ) ;
7070 fixture . detectChanges ( ) ;
7171
@@ -76,15 +76,15 @@ describe('SimpleComboboxHarness', () => {
7676 } ) ;
7777
7878 it ( 'should fail to resolve nested items when closed' , async ( ) => {
79- const combobox = await loader . getHarness ( SimpleComboboxHarness ) ;
79+ const combobox = await loader . getHarness ( ComboboxHarness ) ;
8080 // Popup isn't open yet, so getPopupWidget should fail.
8181 await expectAsync ( combobox . getPopupWidget ( ListboxHarness ) ) . toBeRejectedWithError (
8282 / C a n n o t r e t r i e v e p o p u p c o n t e n t b e c a u s e t h e c o m b o b o x i s c l o s e d / ,
8383 ) ;
8484 } ) ;
8585
8686 it ( 'should support getting explicit popup loader for descendant matching' , async ( ) => {
87- const combobox = await loader . getHarness ( SimpleComboboxHarness ) ;
87+ const combobox = await loader . getHarness ( ComboboxHarness ) ;
8888 await combobox . open ( ) ;
8989 fixture . detectChanges ( ) ;
9090
@@ -95,7 +95,7 @@ describe('SimpleComboboxHarness', () => {
9595 } ) ;
9696
9797 it ( 'should support focusing and blurring' , async ( ) => {
98- const combobox = await loader . getHarness ( SimpleComboboxHarness ) ;
98+ const combobox = await loader . getHarness ( ComboboxHarness ) ;
9999 await combobox . focus ( ) ;
100100 expect ( await combobox . isFocused ( ) ) . toBeTrue ( ) ;
101101
@@ -106,8 +106,8 @@ describe('SimpleComboboxHarness', () => {
106106
107107 describe ( 'Overlay and Popover integrations' , ( ) => {
108108 it ( 'should find and resolve harnesses nested inside standard CdkOverlay' , async ( ) => {
109- setupTest ( SimpleComboboxOverlayTestApp ) ;
110- const combobox = await loader . getHarness ( SimpleComboboxHarness ) ;
109+ setupTest ( ComboboxOverlayTestApp ) ;
110+ const combobox = await loader . getHarness ( ComboboxHarness ) ;
111111
112112 await combobox . open ( ) ;
113113 fixture . detectChanges ( ) ;
@@ -119,8 +119,8 @@ describe('SimpleComboboxHarness', () => {
119119 } ) ;
120120
121121 it ( 'should resolve nested harnesses when using Native Popover API' , async ( ) => {
122- setupTest ( SimpleComboboxNativePopoverTestApp ) ;
123- const combobox = await loader . getHarness ( SimpleComboboxHarness ) ;
122+ setupTest ( ComboboxNativePopoverTestApp ) ;
123+ const combobox = await loader . getHarness ( ComboboxHarness ) ;
124124
125125 await combobox . open ( ) ;
126126 fixture . detectChanges ( ) ;
@@ -153,7 +153,7 @@ describe('SimpleComboboxHarness', () => {
153153 ` ,
154154 imports : [ Combobox , ComboboxPopup , ComboboxWidget , Listbox , Option ] ,
155155} )
156- class SimpleComboboxTestApp {
156+ class ComboboxTestApp {
157157 disabled = signal ( false ) ;
158158}
159159
@@ -174,7 +174,7 @@ class SimpleComboboxTestApp {
174174 ` ,
175175 imports : [ Combobox , ComboboxPopup , ComboboxWidget , Listbox , Option , OverlayModule ] ,
176176} )
177- class SimpleComboboxOverlayTestApp {
177+ class ComboboxOverlayTestApp {
178178 popupExpanded = signal ( false ) ;
179179}
180180
@@ -195,6 +195,6 @@ class SimpleComboboxOverlayTestApp {
195195 ` ,
196196 imports : [ Combobox , ComboboxPopup , ComboboxWidget , Listbox , Option , OverlayModule ] ,
197197} )
198- class SimpleComboboxNativePopoverTestApp {
198+ class ComboboxNativePopoverTestApp {
199199 popupExpanded = signal ( false ) ;
200200}
0 commit comments