| 91 | it('should delay element removal when an animation is specified', fakeAsync(() => { |
| 92 | const logSpy = jasmine.createSpy('logSpy'); |
| 93 | @Component({ |
| 94 | changeDetection: ChangeDetectionStrategy.Eager, |
| 95 | selector: 'test-cmp', |
| 96 | styles: styles, |
| 97 | template: |
| 98 | '<div>@if (show()) {<p animate.leave="fade" (animationend)="logMe($event)">I should fade</p>}</div>', |
| 99 | encapsulation: ViewEncapsulation.None, |
| 100 | }) |
| 101 | class TestComponent { |
| 102 | show = signal(true); |
| 103 | |
| 104 | logMe(event: AnimationEvent) { |
| 105 | logSpy(); |
| 106 | } |
| 107 | } |
| 108 | |
| 109 | TestBed.configureTestingModule({animationsEnabled: true}); |
| 110 | |