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

PR Close #27627
This commit is contained in:
Pawel Kozlowski 2018-12-12 16:21:58 +01:00 committed by Alex Rickabaugh
parent fc6dc78fe9
commit 28ceca0163
3 changed files with 219 additions and 213 deletions

View File

@ -996,10 +996,11 @@ const TEST_COMPILER_PROVIDERS: Provider[] = [
expect(directiveLog.filter(['ngAfterViewInit'])).toEqual([]); expect(directiveLog.filter(['ngAfterViewInit'])).toEqual([]);
})); }));
fixmeIvy('unknown').it( fixmeIvy(
'should not call ngAfterViewInit again if it throws', fakeAsync(() => { 'FW-830: Exception thrown in ngAfterViewInit triggers ngAfterViewInit re-execution')
const ctx = .it('should not call ngAfterViewInit again if it throws', fakeAsync(() => {
createCompFixture('<div testDirective="dir" throwOn="ngAfterViewInit"></div>'); const ctx = createCompFixture(
'<div testDirective="dir" throwOn="ngAfterViewInit"></div>');
let errored = false; let errored = false;
// First pass fails, but ngAfterViewInit should be called. // First pass fails, but ngAfterViewInit should be called.
@ -1185,8 +1186,8 @@ const TEST_COMPILER_PROVIDERS: Provider[] = [
/Previous value: 'changed: undefined'\. Current value: 'changed: 1'/g); /Previous value: 'changed: undefined'\. Current value: 'changed: 1'/g);
})); }));
fixmeIvy('unknown').it( fixmeIvy('FW-831: Views created in a cd hooks throw in view engine')
'should warn when the view has been created in a cd hook', fakeAsync(() => { .it('should warn when the view has been created in a cd hook', fakeAsync(() => {
const ctx = createCompFixture('<div *gh9882>{{ a }}</div>', TestData); const ctx = createCompFixture('<div *gh9882>{{ a }}</div>', TestData);
ctx.componentInstance.a = 1; ctx.componentInstance.a = 1;
expect(() => ctx.detectChanges()) expect(() => ctx.detectChanges())
@ -1537,7 +1538,8 @@ const TEST_COMPILER_PROVIDERS: Provider[] = [
childThrows: LifetimeMethods; childThrows: LifetimeMethods;
} }
fixmeIvy('unknown').describe('calling init', () => { fixmeIvy('FW-832: View engine supports recursive detectChanges() calls')
.describe('calling init', () => {
function initialize(options: Options) { function initialize(options: Options) {
@Component({selector: 'my-child', template: ''}) @Component({selector: 'my-child', template: ''})
class MyChild { class MyChild {

View File

@ -699,9 +699,9 @@ function declareTests(config?: {useJit: boolean}) {
expect(cmp.prop).toEqual('two'); expect(cmp.prop).toEqual('two');
}); });
if (getDOM().supportsDOMEvents()) { fixmeIvy(
fixmeIvy('unknown').it( 'FW-764: fixture.detectChanges() is not respecting OnPush flag on components in the root template')
'should be checked when an async pipe requests a check', fakeAsync(() => { .it('should be checked when an async pipe requests a check', fakeAsync(() => {
TestBed.configureTestingModule( TestBed.configureTestingModule(
{declarations: [MyComp, PushCmpWithAsyncPipe], imports: [CommonModule]}); {declarations: [MyComp, PushCmpWithAsyncPipe], imports: [CommonModule]});
const template = '<push-cmp-with-async #cmp></push-cmp-with-async>'; const template = '<push-cmp-with-async #cmp></push-cmp-with-async>';
@ -725,7 +725,6 @@ function declareTests(config?: {useJit: boolean}) {
fixture.detectChanges(); fixture.detectChanges();
expect(cmp.numberOfChecks).toEqual(2); expect(cmp.numberOfChecks).toEqual(2);
})); }));
}
}); });
it('should create a component that injects an @Host', () => { it('should create a component that injects an @Host', () => {
@ -1871,7 +1870,8 @@ function declareTests(config?: {useJit: boolean}) {
if (getDOM().supportsDOMEvents()) { if (getDOM().supportsDOMEvents()) {
describe('svg', () => { describe('svg', () => {
fixmeIvy('unknown').it('should support svg elements', () => { fixmeIvy('FW-672: SVG attribute xlink:href is output as :xlink:href (extra ":")')
.it('should support svg elements', () => {
TestBed.configureTestingModule({declarations: [MyComp]}); TestBed.configureTestingModule({declarations: [MyComp]});
const template = '<svg><use xlink:href="Port" /></svg>'; const template = '<svg><use xlink:href="Port" /></svg>';
TestBed.overrideComponent(MyComp, {set: {template}}); TestBed.overrideComponent(MyComp, {set: {template}});
@ -1890,7 +1890,8 @@ function declareTests(config?: {useJit: boolean}) {
expect(firstAttribute.namespaceURI).toEqual('http://www.w3.org/1999/xlink'); expect(firstAttribute.namespaceURI).toEqual('http://www.w3.org/1999/xlink');
}); });
fixmeIvy('unknown').it('should support foreignObjects with document fragments', () => { fixmeIvy('FW-811: Align HTML namespaces between Ivy and Render2')
.it('should support foreignObjects with document fragments', () => {
TestBed.configureTestingModule({declarations: [MyComp]}); TestBed.configureTestingModule({declarations: [MyComp]});
const template = const template =
'<svg><foreignObject><xhtml:div><p>Test</p></xhtml:div></foreignObject></svg>'; '<svg><foreignObject><xhtml:div><p>Test</p></xhtml:div></foreignObject></svg>';
@ -1912,7 +1913,8 @@ function declareTests(config?: {useJit: boolean}) {
describe('attributes', () => { describe('attributes', () => {
fixmeIvy('unknown').it('should support attributes with namespace', () => { fixmeIvy('FW-672: SVG attribute xlink:href is output as :xlink:href (extra ":")')
.it('should support attributes with namespace', () => {
TestBed.configureTestingModule({declarations: [MyComp, SomeCmp]}); TestBed.configureTestingModule({declarations: [MyComp, SomeCmp]});
const template = '<svg:use xlink:href="#id" />'; const template = '<svg:use xlink:href="#id" />';
TestBed.overrideComponent(SomeCmp, {set: {template}}); TestBed.overrideComponent(SomeCmp, {set: {template}});
@ -1923,7 +1925,8 @@ function declareTests(config?: {useJit: boolean}) {
.toEqual('#id'); .toEqual('#id');
}); });
fixmeIvy('unknown').it('should support binding to attributes with namespace', () => { fixmeIvy('FW-672: SVG attribute xlink:href is output as :xlink:href (extra ":")')
.it('should support binding to attributes with namespace', () => {
TestBed.configureTestingModule({declarations: [MyComp, SomeCmp]}); TestBed.configureTestingModule({declarations: [MyComp, SomeCmp]});
const template = '<svg:use [attr.xlink:href]="value" />'; const template = '<svg:use [attr.xlink:href]="value" />';
TestBed.overrideComponent(SomeCmp, {set: {template}}); TestBed.overrideComponent(SomeCmp, {set: {template}});

View File

@ -81,7 +81,8 @@ describe('projection', () => {
expect(main.nativeElement).toHaveText(''); expect(main.nativeElement).toHaveText('');
}); });
fixmeIvy('unknown').it('should support multiple content tags', () => { fixmeIvy('FW-833: Directive / projected node matching against class name')
.it('should support multiple content tags', () => {
TestBed.configureTestingModule({declarations: [MultipleContentTagsComponent]}); TestBed.configureTestingModule({declarations: [MultipleContentTagsComponent]});
TestBed.overrideComponent(MainComp, { TestBed.overrideComponent(MainComp, {
set: { set: {