import { Type } from '@angular/core'; import { ComponentFixture } from '@angular/core/testing'; import { NgtxMultiElement } from '.'; import { LifeCycleHooks, QueryTarget, TypeObjectMap } from '../types/index'; import { NgtxElement } from './element'; export declare class NgtxFixture { private fixture?; private root; get rootElement(): NgtxElement; constructor(fixture?: ComponentFixture | undefined); /** * **Provides the test helpers with the correct `fixture` instance on which they work.** * * Call this function in the `beforeEach`-hook in which the fixture is created. * * --- * Use it like that: * * ~~~ts * describe('MyTests', ngtx({ useFixture, ... }) => { * // ... * * beforeEach(() => { * fixture = TestBed.createComponent(MyComponent); * component = fixture.componentInstance; * // use it here. internally it will call fixture.detectChanges() * // so no need to do it after this call again. * useFixture(fixture); * }); * }); * ~~~ * @param fixture The test's `fixture` instance. */ useFixture(fixture: ComponentFixture, skipInitialChangeDetection?: boolean): NgtxFixture; /** * **Shortcut for `fixture.detectChanges()`.** * * Optionally accepts a component instance on which then `ngOnInit` and * `ngOnChanges` life-cycle hooks are called (however: without any arguments). * * --- * * ~~~ts * detectChanges(); * ~~~ * * --- * @param component (Optional) A component instance to call the `ngOnInit`- and `ngOnChanges`-life-cycles on. */ detectChanges(): void; /** * **Shortcut for `fixture.detectChanges()`.** * * Optionally accepts a component instance on which then `ngOnInit` and * `ngOnChanges` life-cycle hooks are called (however: without any arguments). * * --- * * ~~~ts * // runs ngOnInit and ngOnChanges hooks * // on component, before detecting changes: * detectChanges(component); * ~~~ * * --- * @param component (Optional) A component instance to call the `ngOnInit`- and `ngOnChanges`-life-cycles on. */ detectChanges, Html extends HTMLElement = HTMLElement>(component: T, changes?: TypeObjectMap): void; get(cssSelector: string): NgtxElement; get(component: Type): NgtxElement; get(queries: QueryTarget[]): NgtxElement; getAll(cssSelector: string): NgtxMultiElement; getAll(queryTarget: Type): NgtxMultiElement; getAll(queryTarget: QueryTarget[]): NgtxMultiElement; /** * Triggers the specified event on the fixture's root debug-element. * @param name The event name to be dispatched. * @param eventArgs (Optional) The event args to emit. * @deprecated Consider using ngtx' [declarative api](https://github.com/Centigrade/ngtx/blob/experimental/effect-testing-api/docs/DECLARATIVE_TEST_API.md) instead of imperatively calling this helper. */ triggerEvent(name: string, eventArgs?: any): void; private checkFixture; }