File tree 1 file changed +3
-5
lines changed
1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -107,11 +107,9 @@ describe('MatPaginator', () => {
107
107
expect ( getNextButton ( fixture ) . getAttribute ( 'aria-label' ) ) . toBe ( 'Next page' ) ;
108
108
109
109
const select = fixture . nativeElement . querySelector ( '.mat-mdc-select' ) ;
110
- const selectLabelIds = select . getAttribute ( 'aria-labelledby' ) ?. split ( / \s / g) as string [ ] ;
111
- const selectLabelTexts = selectLabelIds ?. map ( labelId => {
112
- return fixture . nativeElement . querySelector ( `#${ labelId } ` ) ?. textContent ?. trim ( ) ;
113
- } ) ;
114
- expect ( selectLabelTexts ) . toContain ( 'Items per page:' ) ;
110
+ const selectLabelId = select . getAttribute ( 'aria-labelledby' ) . trim ( ) ;
111
+ const selectLabelText = fixture . nativeElement . querySelector ( `#${ selectLabelId } ` ) ?. textContent ;
112
+ expect ( selectLabelText ) . toContain ( 'Items per page:' ) ;
115
113
} ) ;
116
114
117
115
it ( 'should re-render when the i18n labels change' , ( ) => {
You can’t perform that action at this time.
0 commit comments