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