import { DebugElement, EventEmitter, OutputEmitterRef, Type } from '@angular/core'; import { ComponentFixture } from '@angular/core/testing'; import { Observable, Subject } from 'rxjs'; import { DOMSelector } from '../dom-selectors'; import { SpyObject } from '../mock'; import { Token } from '../token'; import { OutputType, KeyboardEventOptions, KeysMatching, SpectatorElement } from '../types'; import { BaseSpectator } from './base-spectator'; type KeysMatchingReturnType = keyof { [P in keyof T as T[P] extends V ? P : never]: P; } & keyof T; type KeysMatchingOutputFunction = KeysMatchingReturnType>; type KeysMatchingClassicOutput = KeysMatchingReturnType | Subject>; type KeysMatchingOutput = KeysMatchingOutputFunction | KeysMatchingClassicOutput; /** * @internal */ export declare abstract class DomSpectator extends BaseSpectator { fixture: ComponentFixture; debugElement: DebugElement; protected instance: I; element: Element; constructor(fixture: ComponentFixture, debugElement: DebugElement, instance: I, element: Element); inject(token: Token): SpyObject; detectChanges(): void; query(selector: string | DOMSelector, options?: { root: boolean; }): R | null; query(directive: Type, options?: { root: boolean; }): R | null; query(selector: string | DOMSelector, options?: { parentSelector: Type | string | DOMSelector; }): R | null; query(directive: Type, options?: { parentSelector?: Type | string | DOMSelector; }): R | null; query(directiveOrSelector: Type | string, options: { read: Token; root?: boolean; parentSelector?: Type | string | DOMSelector; }): R | null; queryAll(selector: string | DOMSelector, options?: { root: boolean; }): R[]; queryAll(directive: Type, options?: { root: boolean; }): R[]; queryAll(selector: string | DOMSelector, options?: { parentSelector: Type | string | DOMSelector; }): R[]; queryAll(directive: Type, options?: { parentSelector: Type | string | DOMSelector; }): R[]; queryAll(directiveOrSelector: Type | string, options: { read: Token; root?: boolean; parentSelector?: Type | string | DOMSelector; }): R[]; queryLast(selector: string | DOMSelector, options?: { root: boolean; }): R | null; queryLast(directive: Type, options?: { root: boolean; }): R | null; queryLast(selector: string | DOMSelector, options?: { parentSelector: Type | string | DOMSelector; }): R | null; queryLast(directive: Type, options?: { parentSelector: Type | string | DOMSelector; }): R | null; queryLast(directiveOrSelector: Type | string, options: { read: Token; root?: boolean; parentSelector?: Type | string | DOMSelector; }): R | null; output = KeysMatchingOutput>(output: K): I[K]; output = KeysMatchingClassicOutput>(output: K): Observable; output = KeysMatchingOutputFunction>(output: K): OutputEmitterRef; tick(millis?: number): void; click(selector?: SpectatorElement): void; blur(selector?: SpectatorElement): void; focus(selector?: SpectatorElement): void; dispatchMouseEvent(selector: SpectatorElement | undefined, type: string, x?: number, y?: number, event?: MouseEvent): MouseEvent; dispatchKeyboardEvent(selector: SpectatorElement, type: string, keyCode: number, target?: Element): KeyboardEvent; dispatchKeyboardEvent(selector: SpectatorElement, type: string, key: string, target?: Element): KeyboardEvent; dispatchKeyboardEvent(selector: SpectatorElement, type: string, keyAndCode: KeyboardEventOptions, target?: Element): KeyboardEvent; dispatchFakeEvent(selector: SpectatorElement | undefined, type: string, canBubble?: boolean): Event; triggerEventHandler | OutputEmitterRef> = any>(directiveOrSelector: Type | string | DebugElement, eventName: K, eventObj: OutputType, options?: { root: boolean; }): void; get keyboard(): { pressKey: (key: string, selector?: SpectatorElement, event?: string) => void; pressEscape: (selector?: SpectatorElement, event?: string) => void; pressEnter: (selector?: SpectatorElement, event?: string) => void; pressTab: (selector?: SpectatorElement, event?: string) => void; pressBackspace: (selector?: SpectatorElement, event?: string) => void; }; get mouse(): { contextmenu: (selector?: SpectatorElement) => void; dblclick: (selector?: SpectatorElement) => void; }; dispatchTouchEvent(selector: SpectatorElement | undefined, type: string, x?: number, y?: number): void; typeInElement(value: string, selector?: SpectatorElement): void; selectOption(selector: SpectatorElement | undefined, options: string | string[] | HTMLOptionElement | HTMLOptionElement[], config?: { emitEvents: boolean; }): void; private getNativeElement; private getDebugElement; private getRootDebugElement; } export {};