chore(test): rename RootTestComponent to ComponentFixture
BREAKING CHANGE:
Before:
```
testComponentBuilder.createAsync(MyComponent).then(root: RootTestComponent => {
}
```
After:
```
testComponentBuilder.createAsync(MyComponent).then(fixture: ComponentFixture => {
}
```
Closes #4711
This commit is contained in:
@@ -13,7 +13,7 @@ import {
|
||||
it,
|
||||
xit,
|
||||
TestComponentBuilder,
|
||||
RootTestComponent
|
||||
ComponentFixture
|
||||
} from 'angular2/testing_internal';
|
||||
|
||||
import {OnDestroy} from 'angular2/lifecycle_hooks';
|
||||
@@ -24,7 +24,7 @@ import {DynamicComponentLoader} from 'angular2/src/core/linker/dynamic_component
|
||||
import {ElementRef} from 'angular2/src/core/linker/element_ref';
|
||||
import {DOCUMENT} from 'angular2/src/core/render/render';
|
||||
import {DOM} from 'angular2/src/core/dom/dom_adapter';
|
||||
import {RootTestComponent_} from "angular2/src/testing/test_component_builder";
|
||||
import {ComponentFixture_} from "angular2/src/testing/test_component_builder";
|
||||
|
||||
export function main() {
|
||||
describe('DynamicComponentLoader', function() {
|
||||
@@ -232,7 +232,7 @@ export function main() {
|
||||
DOM.appendChild(doc.body, rootEl);
|
||||
loader.loadAsRoot(ChildComp, null, injector)
|
||||
.then((componentRef) => {
|
||||
var el = new RootTestComponent_(componentRef);
|
||||
var el = new ComponentFixture_(componentRef);
|
||||
expect(rootEl.parentNode).toBe(doc.body);
|
||||
|
||||
el.detectChanges();
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -15,7 +15,7 @@ import {
|
||||
containsRegexp,
|
||||
stringifyElement,
|
||||
TestComponentBuilder,
|
||||
RootTestComponent,
|
||||
ComponentFixture,
|
||||
fakeAsync,
|
||||
tick
|
||||
} from 'angular2/testing_internal';
|
||||
@@ -293,7 +293,7 @@ export function main() {
|
||||
{template: '<simple string-prop="text"></simple>', directives: [Simple]}))
|
||||
.overrideTemplate(Simple, '<ng-content></ng-content><p>P,</p>{{stringProp}}')
|
||||
.createAsync(MainComp)
|
||||
.then((main: RootTestComponent) => {
|
||||
.then((main: ComponentFixture) => {
|
||||
|
||||
main.detectChanges();
|
||||
|
||||
@@ -314,7 +314,7 @@ export function main() {
|
||||
{template: '<simple string-prop="text"></simple>', directives: [Simple]}))
|
||||
.overrideTemplate(Simple, '<style></style><p>P,</p>{{stringProp}}')
|
||||
.createAsync(MainComp)
|
||||
.then((main: RootTestComponent) => {
|
||||
.then((main: ComponentFixture) => {
|
||||
|
||||
main.detectChanges();
|
||||
expect(main.debugElement.nativeElement).toHaveText('P,text');
|
||||
|
||||
@@ -211,10 +211,10 @@ export function main() {
|
||||
|
||||
tcb.overrideTemplate(MyComp, template)
|
||||
.createAsync(MyComp)
|
||||
.then((rtc) => {
|
||||
rtc.debugElement.componentInstance.shouldShow = true;
|
||||
rtc.detectChanges();
|
||||
rtc.destroy();
|
||||
.then((fixture) => {
|
||||
fixture.debugElement.componentInstance.shouldShow = true;
|
||||
fixture.detectChanges();
|
||||
fixture.destroy();
|
||||
|
||||
async.done();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user