@@ -28,19 +28,16 @@ describe('MatExpansionPanel', () => {
28
28
29
29
it ( 'should expand and collapse the panel' , fakeAsync ( ( ) => {
30
30
const fixture = TestBed . createComponent ( PanelWithContent ) ;
31
- const contentEl = fixture . nativeElement . querySelector ( '.mat-expansion-panel-content' ) ;
32
31
const headerEl = fixture . nativeElement . querySelector ( '.mat-expansion-panel-header' ) ;
33
32
fixture . detectChanges ( ) ;
34
33
35
34
expect ( headerEl . classList ) . not . toContain ( 'mat-expanded' ) ;
36
- expect ( contentEl . classList ) . not . toContain ( 'mat-expanded' ) ;
37
35
38
36
fixture . componentInstance . expanded = true ;
39
37
fixture . detectChanges ( ) ;
40
38
flush ( ) ;
41
39
42
40
expect ( headerEl . classList ) . toContain ( 'mat-expanded' ) ;
43
- expect ( contentEl . classList ) . toContain ( 'mat-expanded' ) ;
44
41
} ) ) ;
45
42
46
43
it ( 'should be able to render panel content lazily' , fakeAsync ( ( ) => {
@@ -267,23 +264,7 @@ describe('MatExpansionPanel', () => {
267
264
expect ( fixture . componentInstance . expanded ) . toBe ( false ) ;
268
265
} ) ;
269
266
270
- it ( 'should not set the mat-expanded class until the open animation is done' , fakeAsync ( ( ) => {
271
- const fixture = TestBed . createComponent ( PanelWithContent ) ;
272
- const contentEl = fixture . nativeElement . querySelector ( '.mat-expansion-panel-content' ) ;
273
-
274
- fixture . detectChanges ( ) ;
275
- expect ( contentEl . classList ) . not . toContain ( 'mat-expanded' ,
276
- 'Expected class not to be there on init' ) ;
277
-
278
- fixture . componentInstance . expanded = true ;
279
- fixture . detectChanges ( ) ;
280
- expect ( contentEl . classList ) . not . toContain ( 'mat-expanded' ,
281
- 'Expected class not to be added immediately after becoming expanded' ) ;
282
267
283
- flush ( ) ;
284
- expect ( contentEl . classList ) . toContain ( 'mat-expanded' ,
285
- 'Expected class to be added after the animation has finished' ) ;
286
- } ) ) ;
287
268
288
269
it ( 'should emit events for body expanding and collapsing animations' , fakeAsync ( ( ) => {
289
270
const fixture = TestBed . createComponent ( PanelWithContent ) ;
0 commit comments