import { DebugElement } from '@angular/core'; import { ComponentFixture } from '@angular/core/testing'; import { KeyCode } from '@terminus/ngx-tools/keycodes'; import { TsOptgroupComponent, TsOptionComponent } from '@terminus/ui/option'; import { TsSelectComponent } from '@terminus/ui/select'; /** * Create a mock keydown event * * @param key - The key that should be pressed * @returns The KeyboardEvent */ export declare function createKeydownEvent(key: KeyCode): KeyboardEvent; /** * Get an array of all DebugElements for TsSelectComponents * * @param fixture - The component fixture * @returns An array of DebugElements */ export declare function getAllSelectDebugElements(fixture: ComponentFixture): DebugElement[]; /** * Get an array of all component instances for TsSelectComponents * * @param fixture - The component fixture * @returns An array of TsSelectComponents */ export declare const getAllSelectInstances: (fixture: ComponentFixture) => TsSelectComponent[]; /** * Get the DebugElement for a TsSelectComponent * * @param fixture - The component fixture * @param index - The index of the desired TsSelectComponent * @returns The DebugElement */ export declare function getSelectDebugElement(fixture: ComponentFixture, index?: number): DebugElement; /** * Get the component instance for a TsSelectComponent * * @param fixture - The component fixture * @param index - The index of the desired TsSelectComponent * @returns The instance */ export declare function getSelectInstance(fixture: ComponentFixture, index?: number): TsSelectComponent; /** * Get the element for a TsSelectComponent * * @param fixture - The component fixture * @param index - The index of the desired TsSelectComponent * @returns The element */ export declare function getSelectElement(fixture: ComponentFixture, index?: number): HTMLElement; /** * Get the trigger element for a TsSelectComponent * * @param fixture - The component fixture * @param index - The index of the desired TsSelectComponent * @returns The element */ export declare function getSelectTriggerElement(fixture: ComponentFixture, index?: number): HTMLElement; /** * Get the trigger element for a TsSelectComponent * * @param fixture - The component fixture * @param index - The index of the desired TsSelectComponent * @returns The trigger element */ export declare function getToggleAllElement(fixture: ComponentFixture, index?: number): HTMLElement; /** * Get the panel element for a TsSelectComponent * * @param fixture - The component fixture * @param index - The index of the desired TsSelectComponent * @returns The panel element */ export declare function getPanelElement(fixture: ComponentFixture, index?: number): HTMLElement; /** * Get all TsOptionComponent instances for a TsSelectComponent * * @param fixture - The component fixture * @param index - The index of the desired TsSelectComponent * @returns An array of TsOptionComponents */ export declare function getAllOptionInstances(fixture: ComponentFixture, index?: number): TsOptionComponent[]; /** * Get a specific TsOptionComponent instance for a TsSelectComponent * * @param fixture - The component fixture * @param selectIndex - The index of the desired TsSelectComponent * @param optionIndex - The index of the desired TsOptionComponent * @returns A TsOptionComponent */ export declare function getOptionInstance(fixture: ComponentFixture, selectIndex?: number, optionIndex?: number): TsOptionComponent; /** * Get the element of a TsOptionComponent instance for a TsSelectComponent * * @param fixture - The component fixture * @param selectIndex - The index of the desired TsSelectComponent * @param optionIndex - The index of the desired TsOptionComponent * @returns The TsOptionComponent element */ export declare function getOptionElement(fixture: ComponentFixture, selectIndex?: number, optionIndex?: number): HTMLElement; /** * Get an array of all TsOptgroupComponent * * @param fixture - The component fixture * @param index - The index of the desired TsSelectComponent * @returns An array of TsOptionComponents */ export declare function getAllOptgroups(fixture: ComponentFixture, index?: number): TsOptgroupComponent[]; /** * Get a specific TsOptgroupComponent * * @param fixture - The component fixture * @param selectIndex - The index of the desired TsSelectComponent * @param groupIndex - The index of the desired TsOptgroupComponent * @returns A TsOptgroupComponent */ export declare function getOptgroup(fixture: ComponentFixture, selectIndex?: number, groupIndex?: number): TsOptgroupComponent; /** * Get the element for a TsOptgroupComponent * * @param fixture - The component fixture * @param selectIndex - The index of the desired TsSelectComponent * @param groupIndex - The index of the desired TsOptgroupComponent * @returns The optgroup element */ export declare function getOptgroupElement(fixture: ComponentFixture, selectIndex?: number, groupIndex?: number): HTMLElement; /** * Get the element for the filter input for a TsSelectComponent * * @param fixture - The component fixture * @param index - The index of the desired TsSelectComponent * @returns The filter input element */ export declare function getFilterInputElement(fixture: ComponentFixture, index?: number): HTMLInputElement; /** * Open a select element * * @param fixture - The component fixture * @param index - The index of the desired TsSelectComponent * @returns The whenStable promise */ export declare function openSelect(fixture: ComponentFixture, index?: number): Promise; /** * Select an option * * @param fixture - The component fixture * @param optionText - The text to find the option by * @param selectIndex - The index of the desired TsSelectComponent * @returns The whenStable promise */ export declare function selectOption(fixture: ComponentFixture, optionText: string, selectIndex?: number): Promise;