test(ivy): update root causes for animation tests (#28091)
PR Close #28091
This commit is contained in:
parent
2afbcafab7
commit
133fe5e561
|
@ -3375,8 +3375,8 @@ const DEFAULT_COMPONENT_ID = '1';
|
|||
expect(getLog().length).toEqual(1);
|
||||
});
|
||||
|
||||
fixmeIvy('unknown').it(
|
||||
'should treat the property as true when the expression is missing', () => {
|
||||
fixmeIvy('FW-951 - Attribute-only synthetic properties are treated differently in Ivy')
|
||||
.it('should treat the property as true when the expression is missing', () => {
|
||||
@Component({
|
||||
selector: 'parent-cmp',
|
||||
animations: [
|
||||
|
@ -3674,19 +3674,19 @@ const DEFAULT_COMPONENT_ID = '1';
|
|||
expect(() => { TestBed.createComponent(Cmp); }).not.toThrowError();
|
||||
});
|
||||
|
||||
fixmeIvy('unknown').it(
|
||||
'should continue to clean up DOM-related animation artificats even if a compiler-level error is thrown midway',
|
||||
() => {
|
||||
@Component({
|
||||
selector: 'if-cmp',
|
||||
animations: [
|
||||
trigger(
|
||||
'foo',
|
||||
[
|
||||
transition('* => something', []),
|
||||
]),
|
||||
],
|
||||
template: `
|
||||
fixmeIvy('FW-952 - Error recovery is handled differently in Ivy than VE')
|
||||
.it('should continue to clean up DOM-related animation artificats even if a compiler-level error is thrown midway',
|
||||
() => {
|
||||
@Component({
|
||||
selector: 'if-cmp',
|
||||
animations: [
|
||||
trigger(
|
||||
'foo',
|
||||
[
|
||||
transition('* => something', []),
|
||||
]),
|
||||
],
|
||||
template: `
|
||||
value = {{ foo[bar] }}
|
||||
<div #contents>
|
||||
<div *ngIf="exp">1</div>
|
||||
|
@ -3694,32 +3694,32 @@ const DEFAULT_COMPONENT_ID = '1';
|
|||
<div *ngIf="exp" [@foo]="'123'">3</div>
|
||||
</div>
|
||||
`,
|
||||
})
|
||||
class Cmp {
|
||||
exp: any = false;
|
||||
})
|
||||
class Cmp {
|
||||
exp: any = false;
|
||||
|
||||
@ViewChild('contents') public contents: any;
|
||||
}
|
||||
@ViewChild('contents') public contents: any;
|
||||
}
|
||||
|
||||
TestBed.configureTestingModule({declarations: [Cmp]});
|
||||
TestBed.configureTestingModule({declarations: [Cmp]});
|
||||
|
||||
const engine = TestBed.get(ɵAnimationEngine);
|
||||
const fixture = TestBed.createComponent(Cmp);
|
||||
const engine = TestBed.get(ɵAnimationEngine);
|
||||
const fixture = TestBed.createComponent(Cmp);
|
||||
|
||||
const runCD = () => fixture.detectChanges();
|
||||
const cmp = fixture.componentInstance;
|
||||
const runCD = () => fixture.detectChanges();
|
||||
const cmp = fixture.componentInstance;
|
||||
|
||||
cmp.exp = true;
|
||||
expect(runCD).toThrow();
|
||||
cmp.exp = true;
|
||||
expect(runCD).toThrow();
|
||||
|
||||
const contents = cmp.contents.nativeElement;
|
||||
expect(contents.innerText.replace(/\s+/gm, '')).toEqual('123');
|
||||
const contents = cmp.contents.nativeElement;
|
||||
expect(contents.innerText.replace(/\s+/gm, '')).toEqual('123');
|
||||
|
||||
cmp.exp = false;
|
||||
expect(runCD).toThrow();
|
||||
cmp.exp = false;
|
||||
expect(runCD).toThrow();
|
||||
|
||||
expect(contents.innerText.trim()).toEqual('');
|
||||
});
|
||||
expect(contents.innerText.trim()).toEqual('');
|
||||
});
|
||||
|
||||
describe('errors for not using the animation module', () => {
|
||||
beforeEach(() => {
|
||||
|
|
Loading…
Reference in New Issue