test(core): add more root causes for TestBed tests failures (#27236)
PR Close #27236
This commit is contained in:
parent
3c9ad1d231
commit
9e5223eaba
|
@ -241,7 +241,8 @@ function declareTests(config?: {useJit: boolean}) {
|
|||
expect(getDOM().getProperty(nativeEl, 'htmlFor')).toBe('foo');
|
||||
});
|
||||
|
||||
fixmeIvy('unknown') && it('should consume directive watch expression change.', () => {
|
||||
fixmeIvy('FW-587: Inputs with aliases in component decorators don\'t work') &&
|
||||
it('should consume directive watch expression change.', () => {
|
||||
TestBed.configureTestingModule({declarations: [MyComp, MyDir]});
|
||||
const template = '<span>' +
|
||||
'<div my-dir [elprop]="ctxProp"></div>' +
|
||||
|
@ -265,7 +266,8 @@ function declareTests(config?: {useJit: boolean}) {
|
|||
});
|
||||
|
||||
describe('pipes', () => {
|
||||
fixmeIvy('unknown') && it('should support pipes in bindings', () => {
|
||||
fixmeIvy('FW-587: Inputs with aliases in component decorators don\'t work') &&
|
||||
it('should support pipes in bindings', () => {
|
||||
TestBed.configureTestingModule({declarations: [MyComp, MyDir, DoublePipe]});
|
||||
const template = '<div my-dir #dir="mydir" [elprop]="ctxProp | double"></div>';
|
||||
TestBed.overrideComponent(MyComp, {set: {template}});
|
||||
|
@ -291,7 +293,8 @@ function declareTests(config?: {useJit: boolean}) {
|
|||
});
|
||||
|
||||
// GH issue 328 - https://github.com/angular/angular/issues/328
|
||||
fixmeIvy('unknown') && it('should support different directive types on a single node', () => {
|
||||
fixmeIvy('FW-587: Inputs with aliases in component decorators don\'t work') &&
|
||||
it('should support different directive types on a single node', () => {
|
||||
TestBed.configureTestingModule({declarations: [MyComp, ChildComp, MyDir]});
|
||||
const template = '<child-cmp my-dir [elprop]="ctxProp"></child-cmp>';
|
||||
TestBed.overrideComponent(MyComp, {set: {template}});
|
||||
|
@ -350,7 +353,7 @@ function declareTests(config?: {useJit: boolean}) {
|
|||
expect(tc.injector.get(EventDir)).not.toBeNull();
|
||||
});
|
||||
|
||||
fixmeIvy('unknown') &&
|
||||
fixmeIvy('FW-680: Throw meaningful error for uninitialized @Output') &&
|
||||
it('should display correct error message for uninitialized @Output', () => {
|
||||
@Component({selector: 'my-uninitialized-output', template: '<p>It works!</p>'})
|
||||
class UninitializedOutputComp {
|
||||
|
@ -374,7 +377,7 @@ function declareTests(config?: {useJit: boolean}) {
|
|||
const fixture = TestBed.createComponent(MyComp);
|
||||
});
|
||||
|
||||
fixmeIvy('unknown') &&
|
||||
fixmeIvy('FW-678: ivy generates different DOM structure for <ng-container>') &&
|
||||
it('should support template directives via `<ng-template>` elements.', () => {
|
||||
TestBed.configureTestingModule({declarations: [MyComp, SomeViewport]});
|
||||
const template =
|
||||
|
@ -477,7 +480,7 @@ function declareTests(config?: {useJit: boolean}) {
|
|||
.toBeAnInstanceOf(ExportDir);
|
||||
});
|
||||
|
||||
fixmeIvy('unknown') &&
|
||||
fixmeIvy('FW-708: Directives with multiple exports are not supported') &&
|
||||
it('should assign a directive to a ref when it has multiple exportAs names', () => {
|
||||
TestBed.configureTestingModule(
|
||||
{declarations: [MyComp, DirectiveWithMultipleExportAsNames]});
|
||||
|
@ -542,7 +545,7 @@ function declareTests(config?: {useJit: boolean}) {
|
|||
expect(value.tagName.toLowerCase()).toEqual('div');
|
||||
});
|
||||
|
||||
fixmeIvy('unknown') &&
|
||||
fixmeIvy('FW-709: Context discovery does not support templates (comment nodes)') &&
|
||||
it('should assign the TemplateRef to a user-defined variable', () => {
|
||||
const fixture =
|
||||
TestBed.configureTestingModule({declarations: [MyComp]})
|
||||
|
@ -566,7 +569,8 @@ function declareTests(config?: {useJit: boolean}) {
|
|||
});
|
||||
|
||||
describe('variables', () => {
|
||||
fixmeIvy('unknown') && it('should allow to use variables in a for loop', () => {
|
||||
fixmeIvy('FW-678: ivy generates different DOM structure for <ng-container>') &&
|
||||
it('should allow to use variables in a for loop', () => {
|
||||
const template =
|
||||
'<ng-template ngFor [ngForOf]="[1]" let-i><child-cmp-no-template #cmp></child-cmp-no-template>{{i}}-{{cmp.ctxProp}}</ng-template>';
|
||||
|
||||
|
@ -920,7 +924,7 @@ function declareTests(config?: {useJit: boolean}) {
|
|||
.toEqual('button');
|
||||
});
|
||||
|
||||
fixmeIvy('unknown') && it('should support updating host element via hostProperties', () => {
|
||||
it('should support updating host element via hostProperties', () => {
|
||||
TestBed.configureTestingModule({declarations: [MyComp, DirectiveUpdatingHostProperties]});
|
||||
const template = '<div update-host-properties></div>';
|
||||
TestBed.overrideComponent(MyComp, {set: {template}});
|
||||
|
@ -955,7 +959,8 @@ function declareTests(config?: {useJit: boolean}) {
|
|||
expect(tc.properties['title']).toBe(undefined);
|
||||
});
|
||||
|
||||
fixmeIvy('unknown') && it('should not allow pipes in hostProperties', () => {
|
||||
fixmeIvy('FW-725: Pipes in host bindings fail with a cryptic error') &&
|
||||
it('should not allow pipes in hostProperties', () => {
|
||||
@Directive({selector: '[host-properties]', host: {'[id]': 'id | uppercase'}})
|
||||
class DirectiveWithHostProps {
|
||||
}
|
||||
|
@ -1281,7 +1286,8 @@ function declareTests(config?: {useJit: boolean}) {
|
|||
expect(needsAttribute.fooAttribute).toBeNull();
|
||||
});
|
||||
|
||||
fixmeIvy('unknown') && it('should support custom interpolation', () => {
|
||||
fixmeIvy('FW-723: Custom interpolation markers are not supported') &&
|
||||
it('should support custom interpolation', () => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [
|
||||
MyComp, ComponentWithCustomInterpolationA, ComponentWithCustomInterpolationB,
|
||||
|
@ -1506,7 +1512,7 @@ function declareTests(config?: {useJit: boolean}) {
|
|||
}
|
||||
});
|
||||
|
||||
fixmeIvy('unknown') &&
|
||||
fixmeIvy('FW-722: getDebugContext needs to be replaced / re-implemented') &&
|
||||
it('should provide an error context when an error happens in DI', () => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [MyComp, DirectiveThrowingAnError],
|
||||
|
@ -1525,7 +1531,7 @@ function declareTests(config?: {useJit: boolean}) {
|
|||
}
|
||||
});
|
||||
|
||||
fixmeIvy('unknown') &&
|
||||
fixmeIvy('FW-722: getDebugContext needs to be replaced / re-implemented') &&
|
||||
it('should provide an error context when an error happens in change detection', () => {
|
||||
TestBed.configureTestingModule({declarations: [MyComp, DirectiveThrowingAnError]});
|
||||
const template = `<input [value]="one.two.three" #local>`;
|
||||
|
@ -1544,7 +1550,7 @@ function declareTests(config?: {useJit: boolean}) {
|
|||
}
|
||||
});
|
||||
|
||||
fixmeIvy('unknown') &&
|
||||
fixmeIvy('FW-722: getDebugContext needs to be replaced / re-implemented') &&
|
||||
it('should provide an error context when an error happens in change detection (text node)',
|
||||
() => {
|
||||
TestBed.configureTestingModule({declarations: [MyComp]});
|
||||
|
@ -1561,6 +1567,7 @@ function declareTests(config?: {useJit: boolean}) {
|
|||
});
|
||||
|
||||
if (getDOM().supportsDOMEvents()) { // this is required to use fakeAsync
|
||||
fixmeIvy('FW-722: getDebugContext needs to be replaced / re-implemented') &&
|
||||
it('should provide an error context when an error happens in an event handler',
|
||||
fakeAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
|
@ -1623,7 +1630,8 @@ function declareTests(config?: {useJit: boolean}) {
|
|||
});
|
||||
|
||||
describe('Property bindings', () => {
|
||||
fixmeIvy('unknown') && it('should throw on bindings to unknown properties', () => {
|
||||
fixmeIvy('FW-721: Bindings to unknown properties are not reported as errors') &&
|
||||
it('should throw on bindings to unknown properties', () => {
|
||||
TestBed.configureTestingModule({declarations: [MyComp]});
|
||||
const template = '<div unknown="{{ctxProp}}"></div>';
|
||||
TestBed.overrideComponent(MyComp, {set: {template}});
|
||||
|
@ -1657,7 +1665,7 @@ function declareTests(config?: {useJit: boolean}) {
|
|||
expect(el.title).toBeFalsy();
|
||||
});
|
||||
|
||||
fixmeIvy('unknown') &&
|
||||
fixmeIvy('FW-711: elementProperty instruction should not be used in host bindings') &&
|
||||
it('should work when a directive uses hostProperty to update the DOM element', () => {
|
||||
TestBed.configureTestingModule(
|
||||
{declarations: [MyComp, DirectiveWithTitleAndHostProperty]});
|
||||
|
|
Loading…
Reference in New Issue