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:
Julie Ralph
2015-10-31 09:50:19 -07:00
parent a16214c614
commit 686457890d
25 changed files with 1128 additions and 1121 deletions

View File

@ -55,15 +55,15 @@ export function main() {
describe('integration', () => {
it('should work with mutable objects',
inject([TestComponentBuilder, AsyncTestCompleter], (tcb: TestComponentBuilder, async) => {
tcb.createAsync(TestComp).then((rootTC) => {
tcb.createAsync(TestComp).then((fixture) => {
let mutable: number[] = [1];
rootTC.debugElement.componentInstance.data = mutable;
rootTC.detectChanges();
expect(rootTC.debugElement.nativeElement).toHaveText("[\n 1\n]");
fixture.debugElement.componentInstance.data = mutable;
fixture.detectChanges();
expect(fixture.debugElement.nativeElement).toHaveText("[\n 1\n]");
mutable.push(2);
rootTC.detectChanges();
expect(rootTC.debugElement.nativeElement).toHaveText("[\n 1,\n 2\n]");
fixture.detectChanges();
expect(fixture.debugElement.nativeElement).toHaveText("[\n 1,\n 2\n]");
async.done();
});

View File

@ -91,15 +91,15 @@ export function main() {
describe('integration', () => {
it('should work with mutable arrays',
inject([TestComponentBuilder, AsyncTestCompleter], (tcb: TestComponentBuilder, async) => {
tcb.createAsync(TestComp).then((rootTC) => {
tcb.createAsync(TestComp).then((fixture) => {
let mutable: number[] = [1, 2];
rootTC.debugElement.componentInstance.data = mutable;
rootTC.detectChanges();
expect(rootTC.debugElement.nativeElement).toHaveText('2');
fixture.debugElement.componentInstance.data = mutable;
fixture.detectChanges();
expect(fixture.debugElement.nativeElement).toHaveText('2');
mutable.push(3);
rootTC.detectChanges();
expect(rootTC.debugElement.nativeElement).toHaveText('2,3');
fixture.detectChanges();
expect(fixture.debugElement.nativeElement).toHaveText('2,3');
async.done();
});