@@ -2381,43 +1946,6 @@ describe('query', () => {
.toBe(0, `Expected content query not to match
.`);
});
- it('should match shallow content queries in views inserted / removed by ngIf', () => {
- function IfTemplate(rf: RenderFlags, ctx: any) {
- if (rf & RenderFlags.Create) {
- Δelement(0, 'div', null, ['foo', '']);
- }
- }
-
- /**
- *
- *
- *
- */
- const AppComponent = createComponent('app-component', function(rf: RenderFlags, ctx: any) {
- if (rf & RenderFlags.Create) {
- ΔelementStart(0, 'shallow-comp');
- { Δtemplate(1, IfTemplate, 2, 0, 'div', [AttributeMarker.Template, 'ngIf', '']); }
- ΔelementEnd();
- }
- if (rf & RenderFlags.Update) {
- ΔelementProperty(1, 'ngIf', Δbind(ctx.showing));
- }
- }, 2, 1, [ShallowComp, NgIf]);
-
- const fixture = new ComponentFixture(AppComponent);
- const qList = shallowCompInstance !.foos;
- expect(qList.length).toBe(0);
-
- fixture.component.showing = true;
- fixture.update();
- expect(qList.length).toBe(1);
-
- fixture.component.showing = false;
- fixture.update();
- expect(qList.length).toBe(0);
- });
-
-
// https://stackblitz.com/edit/angular-wlenwd?file=src%2Fapp%2Fapp.component.ts
it('should support view and content queries matching the same element', () => {
/**