chore(test): remove deprecated RootTestComponent
Uses of `RootTestComponent` should be migrated to `ComponentFixture`.
This commit is contained in:
		
							parent
							
								
									c7242a39d2
								
							
						
					
					
						commit
						ad99199d50
					
				| @ -24,9 +24,9 @@ import {DebugElement, DebugElement_} from 'angular2/src/core/debug/debug_element | |||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * @deprecated Use ComponentFixture |  * Fixture for debugging and testing a component. | ||||||
|  */ |  */ | ||||||
| export abstract class RootTestComponent { | export abstract class ComponentFixture { | ||||||
|   debugElement: DebugElement; |   debugElement: DebugElement; | ||||||
| 
 | 
 | ||||||
|   abstract detectChanges(): void; |   abstract detectChanges(): void; | ||||||
| @ -34,9 +34,6 @@ export abstract class RootTestComponent { | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| export abstract class ComponentFixture extends RootTestComponent {} |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| export class ComponentFixture_ extends ComponentFixture { | export class ComponentFixture_ extends ComponentFixture { | ||||||
|   /** @internal */ |   /** @internal */ | ||||||
|   _componentRef: ComponentRef; |   _componentRef: ComponentRef; | ||||||
|  | |||||||
| @ -1,5 +1,5 @@ | |||||||
| import { | import { | ||||||
|   RootTestComponent, |   ComponentFixture, | ||||||
|   AsyncTestCompleter, |   AsyncTestCompleter, | ||||||
|   TestComponentBuilder, |   TestComponentBuilder, | ||||||
|   beforeEach, |   beforeEach, | ||||||
| @ -22,7 +22,7 @@ import {RouteConfig, Route, AuxRoute, Redirect} from 'angular2/src/router/route_ | |||||||
| 
 | 
 | ||||||
| import {TEST_ROUTER_PROVIDERS, RootCmp, compile, clickOnElement, getHref} from './util'; | import {TEST_ROUTER_PROVIDERS, RootCmp, compile, clickOnElement, getHref} from './util'; | ||||||
| 
 | 
 | ||||||
| function getLinkElement(rtc: RootTestComponent) { | function getLinkElement(rtc: ComponentFixture) { | ||||||
|   return rtc.debugElement.componentViewChildren[0].nativeElement; |   return rtc.debugElement.componentViewChildren[0].nativeElement; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| @ -33,7 +33,7 @@ export function main() { | |||||||
|   describe('auxiliary routes', () => { |   describe('auxiliary routes', () => { | ||||||
| 
 | 
 | ||||||
|     var tcb: TestComponentBuilder; |     var tcb: TestComponentBuilder; | ||||||
|     var fixture: RootTestComponent; |     var fixture: ComponentFixture; | ||||||
|     var rtr; |     var rtr; | ||||||
| 
 | 
 | ||||||
|     beforeEachProviders(() => TEST_ROUTER_PROVIDERS); |     beforeEachProviders(() => TEST_ROUTER_PROVIDERS); | ||||||
|  | |||||||
| @ -8,7 +8,7 @@ import { | |||||||
|   inject, |   inject, | ||||||
|   it, |   it, | ||||||
|   TestComponentBuilder, |   TestComponentBuilder, | ||||||
|   RootTestComponent, |   ComponentFixture, | ||||||
|   xit, |   xit, | ||||||
| } from 'angular2/testing_internal'; | } from 'angular2/testing_internal'; | ||||||
| 
 | 
 | ||||||
| @ -32,7 +32,7 @@ import { | |||||||
|   asyncRouteDataCmp |   asyncRouteDataCmp | ||||||
| } from './fixture_components'; | } from './fixture_components'; | ||||||
| 
 | 
 | ||||||
| function getLinkElement(rtc: RootTestComponent) { | function getLinkElement(rtc: ComponentFixture) { | ||||||
|   return rtc.debugElement.componentViewChildren[0].nativeElement; |   return rtc.debugElement.componentViewChildren[0].nativeElement; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -8,7 +8,7 @@ import { | |||||||
|   inject, |   inject, | ||||||
|   it, |   it, | ||||||
|   TestComponentBuilder, |   TestComponentBuilder, | ||||||
|   RootTestComponent, |   ComponentFixture, | ||||||
|   xit, |   xit, | ||||||
| } from 'angular2/testing_internal'; | } from 'angular2/testing_internal'; | ||||||
| 
 | 
 | ||||||
| @ -19,7 +19,7 @@ import {Router, Route, Location} from 'angular2/router'; | |||||||
| import {HelloCmp, UserCmp, TeamCmp, ParentCmp, ParentWithDefaultCmp} from './fixture_components'; | import {HelloCmp, UserCmp, TeamCmp, ParentCmp, ParentWithDefaultCmp} from './fixture_components'; | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| function getLinkElement(rtc: RootTestComponent) { | function getLinkElement(rtc: ComponentFixture) { | ||||||
|   return rtc.debugElement.componentViewChildren[0].nativeElement; |   return rtc.debugElement.componentViewChildren[0].nativeElement; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -1,5 +1,5 @@ | |||||||
| import { | import { | ||||||
|   RootTestComponent, |   ComponentFixture, | ||||||
|   AsyncTestCompleter, |   AsyncTestCompleter, | ||||||
|   TestComponentBuilder, |   TestComponentBuilder, | ||||||
|   beforeEach, |   beforeEach, | ||||||
| @ -34,7 +34,7 @@ export function main() { | |||||||
|   describe('redirects', () => { |   describe('redirects', () => { | ||||||
| 
 | 
 | ||||||
|     var tcb: TestComponentBuilder; |     var tcb: TestComponentBuilder; | ||||||
|     var rootTC: RootTestComponent; |     var rootTC: ComponentFixture; | ||||||
|     var rtr; |     var rtr; | ||||||
| 
 | 
 | ||||||
|     beforeEachProviders(() => TEST_ROUTER_PROVIDERS); |     beforeEachProviders(() => TEST_ROUTER_PROVIDERS); | ||||||
|  | |||||||
| @ -3,7 +3,7 @@ import {Type, isBlank} from 'angular2/src/facade/lang'; | |||||||
| import {BaseException} from 'angular2/src/facade/exceptions'; | import {BaseException} from 'angular2/src/facade/exceptions'; | ||||||
| 
 | 
 | ||||||
| import { | import { | ||||||
|   RootTestComponent, |   ComponentFixture, | ||||||
|   AsyncTestCompleter, |   AsyncTestCompleter, | ||||||
|   TestComponentBuilder, |   TestComponentBuilder, | ||||||
|   beforeEach, |   beforeEach, | ||||||
|  | |||||||
| @ -7,11 +7,7 @@ | |||||||
|  * |  * | ||||||
|  */ |  */ | ||||||
| export * from './src/testing/testing'; | export * from './src/testing/testing'; | ||||||
| export { | export {ComponentFixture, TestComponentBuilder} from './src/testing/test_component_builder'; | ||||||
|   ComponentFixture, |  | ||||||
|   RootTestComponent, |  | ||||||
|   TestComponentBuilder |  | ||||||
| } from './src/testing/test_component_builder'; |  | ||||||
| export * from './src/testing/test_injector'; | export * from './src/testing/test_injector'; | ||||||
| export * from './src/testing/fake_async'; | export * from './src/testing/fake_async'; | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user