@@ -9,22 +9,13 @@ import {Component, Type} from '@angular/core';
9
9
import { ComponentFixture , TestBed } from '@angular/core/testing' ;
10
10
import { MatDividerHarness } from '@angular/material/divider/testing' ;
11
11
import { MatListModule } from '@angular/material/list' ;
12
- import { BaseListItemHarnessFilters } from '@angular/material/list/testing/list-harness-filters' ;
13
- import {
14
- MatActionListItemHarness ,
15
- MatListItemHarness ,
16
- MatListItemHarnessBase ,
17
- MatListOptionHarness ,
18
- MatNavListItemHarness ,
19
- MatSubheaderHarness
20
- } from '@angular/material/list/testing/list-item-harness-base' ;
21
- import {
22
- MatActionListHarness ,
23
- MatListHarness ,
24
- MatListHarnessBase ,
25
- MatNavListHarness ,
26
- MatSelectionListHarness
27
- } from './list-harness-base' ;
12
+ import { MatActionListHarness , MatActionListItemHarness } from './action-list-harness' ;
13
+ import { MatListHarness , MatListItemHarness } from './list-harness' ;
14
+ import { MatListHarnessBase } from './list-harness-base' ;
15
+ import { BaseListItemHarnessFilters } from './list-harness-filters' ;
16
+ import { MatListItemHarnessBase , MatSubheaderHarness } from './list-item-harness-base' ;
17
+ import { MatNavListHarness , MatNavListItemHarness } from './nav-list-harness' ;
18
+ import { MatListOptionHarness , MatSelectionListHarness } from './selection-list-harness' ;
28
19
29
20
/** Tests that apply to all types of mat-list. */
30
21
function runBaseListFunctionalityTests <
@@ -111,7 +102,8 @@ function runBaseListFunctionalityTests<
111
102
} ) ;
112
103
113
104
it ( 'should get all items, subheaders, and dividers' , async ( ) => {
114
- const itemsSubheadersAndDividers = await simpleListHarness . getItemsWithSubheadersAndDividers ( ) ;
105
+ const itemsSubheadersAndDividers =
106
+ await simpleListHarness . getItemsWithSubheadersAndDividers ( ) ;
115
107
expect ( itemsSubheadersAndDividers . length ) . toBe ( 7 ) ;
116
108
expect ( itemsSubheadersAndDividers [ 0 ] instanceof listItemHarnessBase ) . toBe ( true ) ;
117
109
expect ( await ( itemsSubheadersAndDividers [ 0 ] as MatListItemHarnessBase ) . getText ( ) )
@@ -133,12 +125,12 @@ function runBaseListFunctionalityTests<
133
125
} ) ;
134
126
135
127
it ( 'should get all items, subheaders, and dividers excluding some harness types' , async ( ) => {
136
- const items =
137
- await simpleListHarness . getItemsWithSubheadersAndDividers ( { subheader : false , divider : false } ) ;
138
- const subheaders =
139
- await simpleListHarness . getItemsWithSubheadersAndDividers ( { item : false , divider : false } ) ;
140
- const dividers =
141
- await simpleListHarness . getItemsWithSubheadersAndDividers ( { item : false , subheader : false } ) ;
128
+ const items = await simpleListHarness . getItemsWithSubheadersAndDividers (
129
+ { subheader : false , divider : false } ) ;
130
+ const subheaders = await simpleListHarness . getItemsWithSubheadersAndDividers (
131
+ { item : false , divider : false } ) ;
132
+ const dividers = await simpleListHarness . getItemsWithSubheadersAndDividers (
133
+ { item : false , subheader : false } ) ;
142
134
expect ( await Promise . all ( items . map ( i => i . getText ( ) ) ) )
143
135
. toEqual ( [ 'Item 1' , 'Item 2' , 'Item 3' ] ) ;
144
136
expect ( await Promise . all ( subheaders . map ( s => s . getText ( ) ) ) )
0 commit comments