diff --git a/modules/angular2/test/core/compiler/query_integration_spec.ts b/modules/angular2/test/core/compiler/query_integration_spec.ts
index 1248cc00a0..2223c31310 100644
--- a/modules/angular2/test/core/compiler/query_integration_spec.ts
+++ b/modules/angular2/test/core/compiler/query_integration_spec.ts
@@ -269,6 +269,23 @@ export function main() {
expect(q.query.first.nativeElement).toHaveText("1d");
expect(q.query.last.nativeElement).toHaveText("2d");
+ async.done();
+ });
+ }));
+
+ it('should contain all the elements in the light dom even if they get projected',
+ inject([TestComponentBuilder, AsyncTestCompleter], (tcb: TestComponentBuilder, async) => {
+ var template = '' +
+ '' +
+ '';
+
+ tcb.overrideTemplate(MyComp, template)
+ .createAsync(MyComp)
+ .then((view) => {
+ view.detectChanges();
+
+ expect(asNativeElements(view.componentViewChildren)).toHaveText('hello|world|');
+
async.done();
});
}));
@@ -417,6 +434,17 @@ class NeedsQueryByTwoLabels {
}
}
+@Component({selector: 'needs-query-and-project'})
+@View({
+ directives: [NgFor],
+ template: '
{{dir.text}}|
'
+})
+@Injectable()
+class NeedsQueryAndProject {
+ query: QueryList;
+ constructor(@Query(TextDirective) query: QueryList) { this.query = query; }
+}
+
@Component({selector: 'needs-view-query'})
@View({
directives: [TextDirective],
@@ -461,7 +489,7 @@ class NeedsViewQueryIf {
directives: [NgFor, TextDirective],
template: '' +
'
' +
- '
'
})
@Injectable()
class NeedsViewQueryOrder {
@@ -476,6 +504,7 @@ class NeedsViewQueryOrder {
NeedsQueryDesc,
NeedsQueryByLabel,
NeedsQueryByTwoLabels,
+ NeedsQueryAndProject,
NeedsViewQuery,
NeedsViewQueryDesc,
NeedsViewQueryIf,