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([]);
}));
fixmeIvy('unknown').it(
'should not call ngAfterViewInit again if it throws', fakeAsync(() => {
const ctx =
createCompFixture('<div testDirective="dir" throwOn="ngAfterViewInit"></div>');
fixmeIvy(
'FW-830: Exception thrown in ngAfterViewInit triggers ngAfterViewInit re-execution')
.it('should not call ngAfterViewInit again if it throws', fakeAsync(() => {
const ctx = createCompFixture(
'<div testDirective="dir" throwOn="ngAfterViewInit"></div>');
let errored = false;
// 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);
}));
fixmeIvy('unknown').it(
'should warn when the view has been created in a cd hook', fakeAsync(() => {
fixmeIvy('FW-831: Views created in a cd hooks throw in view engine')
.it('should warn when the view has been created in a cd hook', fakeAsync(() => {
const ctx = createCompFixture('<div *gh9882>{{ a }}</div>', TestData);
ctx.componentInstance.a = 1;
expect(() => ctx.detectChanges())
@ -1537,7 +1538,8 @@ const TEST_COMPILER_PROVIDERS: Provider[] = [
childThrows: LifetimeMethods;
}
fixmeIvy('unknown').describe('calling init', () => {
fixmeIvy('FW-832: View engine supports recursive detectChanges() calls')
.describe('calling init', () => {
function initialize(options: Options) {
@Component({selector: 'my-child', template: ''})
class MyChild {

View File

@ -699,9 +699,9 @@ function declareTests(config?: {useJit: boolean}) {
expect(cmp.prop).toEqual('two');
});
if (getDOM().supportsDOMEvents()) {
fixmeIvy('unknown').it(
'should be checked when an async pipe requests a check', fakeAsync(() => {
fixmeIvy(
'FW-764: fixture.detectChanges() is not respecting OnPush flag on components in the root template')
.it('should be checked when an async pipe requests a check', fakeAsync(() => {
TestBed.configureTestingModule(
{declarations: [MyComp, PushCmpWithAsyncPipe], imports: [CommonModule]});
const template = '<push-cmp-with-async #cmp></push-cmp-with-async>';
@ -725,7 +725,6 @@ function declareTests(config?: {useJit: boolean}) {
fixture.detectChanges();
expect(cmp.numberOfChecks).toEqual(2);
}));
}
});
it('should create a component that injects an @Host', () => {
@ -1871,7 +1870,8 @@ function declareTests(config?: {useJit: boolean}) {
if (getDOM().supportsDOMEvents()) {
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]});
const template = '<svg><use xlink:href="Port" /></svg>';
TestBed.overrideComponent(MyComp, {set: {template}});
@ -1890,7 +1890,8 @@ function declareTests(config?: {useJit: boolean}) {
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]});
const template =
'<svg><foreignObject><xhtml:div><p>Test</p></xhtml:div></foreignObject></svg>';
@ -1912,7 +1913,8 @@ function declareTests(config?: {useJit: boolean}) {
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]});
const template = '<svg:use xlink:href="#id" />';
TestBed.overrideComponent(SomeCmp, {set: {template}});
@ -1923,7 +1925,8 @@ function declareTests(config?: {useJit: boolean}) {
.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]});
const template = '<svg:use [attr.xlink:href]="value" />';
TestBed.overrideComponent(SomeCmp, {set: {template}});

View File

@ -81,7 +81,8 @@ describe('projection', () => {
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.overrideComponent(MainComp, {
set: {