Revert "test(animations): ensure :enter callbacks fire on container insertion (#19674)"
This reverts commit 41f57affb6ae0688ed4b6e4704bc8cf2201bc01a. As it was synched together with 5a9ed2de272912ac74ed56bfec4bdf4551f7b38e which broke an internal test.
This commit is contained in:
parent
8d735da5d8
commit
30ecb6e88a
@ -340,42 +340,6 @@ export function main() {
|
|||||||
expect(completed).toBe(true);
|
expect(completed).toBe(true);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
it('should always fire inner callbacks even if no animation is fired when a view is inserted',
|
|
||||||
fakeAsync(() => {
|
|
||||||
@Component({
|
|
||||||
selector: 'if-cmp',
|
|
||||||
template: `
|
|
||||||
<div *ngIf="exp">
|
|
||||||
<div @myAnimation (@myAnimation.start)="track($event)" (@myAnimation.done)="track($event)"></div>
|
|
||||||
</div>
|
|
||||||
`,
|
|
||||||
animations: [
|
|
||||||
trigger('myAnimation', []),
|
|
||||||
]
|
|
||||||
})
|
|
||||||
class Cmp {
|
|
||||||
exp: any = false;
|
|
||||||
log: string[] = [];
|
|
||||||
track(event: any) { this.log.push(`${event.triggerName}-${event.phaseName}`); }
|
|
||||||
}
|
|
||||||
|
|
||||||
TestBed.configureTestingModule({declarations: [Cmp]});
|
|
||||||
|
|
||||||
const engine = TestBed.get(ɵAnimationEngine);
|
|
||||||
const fixture = TestBed.createComponent(Cmp);
|
|
||||||
const cmp = fixture.componentInstance;
|
|
||||||
fixture.detectChanges();
|
|
||||||
flushMicrotasks();
|
|
||||||
|
|
||||||
expect(cmp.log).toEqual([]);
|
|
||||||
|
|
||||||
cmp.exp = true;
|
|
||||||
fixture.detectChanges();
|
|
||||||
flushMicrotasks();
|
|
||||||
|
|
||||||
expect(cmp.log).toEqual(['myAnimation-start', 'myAnimation-done']);
|
|
||||||
}));
|
|
||||||
|
|
||||||
it('should only turn a view removal as into `void` state transition', () => {
|
it('should only turn a view removal as into `void` state transition', () => {
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'if-cmp',
|
selector: 'if-cmp',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user