test(ivy): update root causes for @angular/core TestBed failures (#27602)

PR Close #27602
This commit is contained in:
Pawel Kozlowski 2018-12-11 16:53:59 +01:00 committed by Alex Rickabaugh
parent 452668b581
commit 6980631631
1 changed files with 156 additions and 149 deletions

View File

@ -537,8 +537,8 @@ const TEST_COMPILER_PROVIDERS: Provider[] = [
expect(renderLog.log).toEqual(['someProp=Megatron']);
}));
fixmeIvy('unknown').it(
'should record unwrapped values via ngOnChanges', fakeAsync(() => {
fixmeIvy('FW-820: Pipes returning WrappedValue corrupt unrelated bindings ')
.it('should record unwrapped values via ngOnChanges', fakeAsync(() => {
const ctx = createCompFixture(
'<div [testDirective]="\'aName\' | wrappedPipe" [a]="1" [b]="2 | wrappedPipe"></div>');
const dir: TestDirective = queryDirs(ctx.debugElement, TestDirective)[0];
@ -589,8 +589,8 @@ const TEST_COMPILER_PROVIDERS: Provider[] = [
}));
fixmeIvy('unknown').it(
'should call pure pipes that are used multiple times only when the arguments change',
fixmeIvy('FW-821: Pure pipes are instantiated differently in view engine and ivy')
.it('should call pure pipes that are used multiple times only when the arguments change',
fakeAsync(() => {
const ctx = createCompFixture(
`<div [someProp]="name | countingPipe"></div><div [someProp]="age | countingPipe"></div>` +
@ -1076,8 +1076,8 @@ const TEST_COMPILER_PROVIDERS: Provider[] = [
});
describe('ngOnDestroy', () => {
fixmeIvy('unknown').it(
'should be called on view destruction', fakeAsync(() => {
fixmeIvy('FW-763: LView tree not properly constructed / destroyed')
.it('should be called on view destruction', fakeAsync(() => {
const ctx = createCompFixture('<div testDirective="dir"></div>');
ctx.detectChanges(false);
@ -1086,11 +1086,13 @@ const TEST_COMPILER_PROVIDERS: Provider[] = [
expect(directiveLog.filter(['ngOnDestroy'])).toEqual(['dir.ngOnDestroy']);
}));
fixmeIvy('unknown').it(
'should be called after processing the content and view children', fakeAsync(() => {
fixmeIvy('FW-763: LView tree not properly constructed / destroyed')
.it('should be called after processing the content and view children', fakeAsync(() => {
TestBed.overrideComponent(AnotherComponent, {
set: new Component(
{selector: 'other-cmp', template: '<div testDirective="viewChild"></div>'})
set: new Component({
selector: 'other-cmp',
template: '<div testDirective="viewChild"></div>'
})
});
const ctx = createCompFixture(
@ -1102,13 +1104,13 @@ const TEST_COMPILER_PROVIDERS: Provider[] = [
ctx.destroy();
expect(directiveLog.filter(['ngOnDestroy'])).toEqual([
'contentChild0.ngOnDestroy', 'contentChild1.ngOnDestroy', 'viewChild.ngOnDestroy',
'parent.ngOnDestroy'
'contentChild0.ngOnDestroy', 'contentChild1.ngOnDestroy',
'viewChild.ngOnDestroy', 'parent.ngOnDestroy'
]);
}));
fixmeIvy('unknown').it(
'should be called in reverse order so the child is always notified before the parent',
fixmeIvy('FW-763: LView tree not properly constructed / destroyed')
.it('should be called in reverse order so the child is always notified before the parent',
fakeAsync(() => {
const ctx = createCompFixture(
'<div testDirective="parent"><div testDirective="child"></div></div><div testDirective="sibling"></div>');
@ -1121,9 +1123,10 @@ const TEST_COMPILER_PROVIDERS: Provider[] = [
]);
}));
fixmeIvy('unknown').it(
'should deliver synchronous events to parent', fakeAsync(() => {
const ctx = createCompFixture('<div (destroy)="a=$event" onDestroyDirective></div>');
fixmeIvy('FW-763: LView tree not properly constructed / destroyed')
.it('should deliver synchronous events to parent', fakeAsync(() => {
const ctx =
createCompFixture('<div (destroy)="a=$event" onDestroyDirective></div>');
ctx.detectChanges(false);
ctx.destroy();
@ -1131,7 +1134,8 @@ const TEST_COMPILER_PROVIDERS: Provider[] = [
expect(ctx.componentInstance.a).toEqual('destroyed');
}));
fixmeIvy('unknown').it('should call ngOnDestroy on pipes', fakeAsync(() => {
fixmeIvy('FW-763: LView tree not properly constructed / destroyed')
.it('should call ngOnDestroy on pipes', fakeAsync(() => {
const ctx = createCompFixture('{{true | pipeWithOnDestroy }}');
ctx.detectChanges(false);
@ -1142,12 +1146,12 @@ const TEST_COMPILER_PROVIDERS: Provider[] = [
]);
}));
fixmeIvy('unknown').it('should call ngOnDestroy on an injectable class', fakeAsync(() => {
fixmeIvy('FW-763: LView tree not properly constructed / destroyed')
.it('should call ngOnDestroy on an injectable class', fakeAsync(() => {
TestBed.overrideDirective(
TestDirective, {set: {providers: [InjectableWithLifecycle]}});
const ctx = createCompFixture(
'<div testDirective="dir"></div>', TestComponent);
const ctx = createCompFixture('<div testDirective="dir"></div>', TestComponent);
ctx.debugElement.children[0].injector.get(InjectableWithLifecycle);
ctx.detectChanges(false);
@ -1163,8 +1167,8 @@ const TEST_COMPILER_PROVIDERS: Provider[] = [
});
describe('enforce no new changes', () => {
fixmeIvy('unknown').it(
'should throw when a record gets changed after it has been checked', fakeAsync(() => {
fixmeIvy('FW-823: ComponentFixture.checkNoChanges doesn\'t throw under TestBed')
.it('should throw when a record gets changed after it has been checked', fakeAsync(() => {
@Directive({selector: '[changed]'})
class ChangingDirective {
@Input() changed: any;
@ -1198,7 +1202,8 @@ const TEST_COMPILER_PROVIDERS: Provider[] = [
expect(() => ctx.checkNoChanges()).not.toThrow();
}));
fixmeIvy('unknown').it('should not break the next run', fakeAsync(() => {
fixmeIvy('FW-823: ComponentFixture.checkNoChanges doesn\'t throw under TestBed')
.it('should not break the next run', fakeAsync(() => {
const ctx = _bindSimpleValue('a', TestData);
ctx.componentInstance.a = 'value';
expect(() => ctx.checkNoChanges()).toThrow();
@ -1271,7 +1276,9 @@ const TEST_COMPILER_PROVIDERS: Provider[] = [
}));
fixmeIvy('unknown').it('Reattaches in the original cd mode', fakeAsync(() => {
fixmeIvy(
'FW-764: fixture.detectChanges() is not respecting OnPush flag on components in the root template')
.it('Reattaches in the original cd mode', fakeAsync(() => {
const ctx = createCompFixture('<push-cmp></push-cmp>');
const cmp: PushComp = queryDirs(ctx.debugElement, PushComp)[0];
cmp.changeDetectorRef.detach();
@ -1291,10 +1298,10 @@ const TEST_COMPILER_PROVIDERS: Provider[] = [
});
describe('multi directive order', () => {
fixmeIvy('unknown').it(
'should follow the DI order for the same element', fakeAsync(() => {
const ctx =
createCompFixture('<div orderCheck2="2" orderCheck0="0" orderCheck1="1"></div>');
fixmeIvy('FW-822: Order of bindings to directive inputs different in ivy')
.it('should follow the DI order for the same element', fakeAsync(() => {
const ctx = createCompFixture(
'<div orderCheck2="2" orderCheck0="0" orderCheck1="1"></div>');
ctx.detectChanges(false);
ctx.destroy();