ComponentFixture
Fixture for debugging and testing a component.
debugElement
DebugElementThe DebugElement associated with the root element of this component.
componentInstance
TThe instance of the root component class.
nativeElement
anyThe native element at the root of the component.
elementRef
ElementRef<any>The ElementRef for the element at the root of the component.
changeDetectorRef
ChangeDetectorRefThe ChangeDetectorRef for the component
ngZone
NgZone | nullcomponentRef
ComponentRef<T>detectChanges
voidTrigger a change detection cycle for the component.
booleanvoidcheckNoChanges
voidDo a change detection run to make sure there were no changes.
voidautoDetectChanges
2 overloadsSet whether the fixture should autodetect changes.
Also runs detectChanges once so that any existing change is detected.
booleanWhether to autodetect changes. By default, true.
voidEnables automatically synchronizing the view, as it would in an application.
Also runs detectChanges once so that any existing change is detected.
voidisStable
booleanReturn whether the fixture is currently stable or has async tasks that have not been completed yet.
booleanwhenStable
Promise<any>Get a promise that resolves when the fixture is stable.
This can be used to resume testing after events have triggered asynchronous activity or asynchronous change detection.
Promise<any>getDeferBlocks
Promise<DeferBlockFixture[]>Retrieves all defer block fixtures in the component fixture.
Promise<DeferBlockFixture[]>whenRenderingDone
Promise<any>Get a promise that resolves when the ui state is stable following animations.
Promise<any>destroy
voidTrigger component destruction.
void