fix(testing): remove test zone for now and rely on returned promises

Adds tests for public Dart and TS frameworks to make sure that
components with templateUrl can be created by the TestComponentBuilder.

Closes #6359

Closes #6601
This commit is contained in:
Julie Ralph
2016-01-20 15:55:30 -08:00
parent 78bfdf78ea
commit c72ed991ad
5 changed files with 72 additions and 72 deletions

View File

@ -26,6 +26,13 @@ class TestService {
}
}
@Component(selector: 'external-template-cmp')
@View(templateUrl: 'test_template.html')
class ExternalTemplateComponent {
ExternalTemplateComponent() {
}
}
class MyToken {}
const TEMPLATE =
@ -79,6 +86,15 @@ void main() {
expect(rootTC.debugElement.nativeElement.text, equals('1;2;3;'));
});
ngTest('should allow a component using a templateUrl', (TestComponentBuilder tcb) async {
var rootTC = await tcb
.createAsync(ExternalTemplateComponent);
rootTC.detectChanges();
expect(rootTC.debugElement.nativeElement.text, equals('from external template\n'));
});
group('expected failures', () {
ngTest('no type in param list', (notTyped) {
expect(1, equals(2));

View File

@ -0,0 +1 @@
<span>from external template</span>