import type { ComponentFixtureProfile } from '../component-fixture'; import { O3rElement, O3rElementConstructor } from './element'; import { O3rGroup, O3rGroupConstructor } from './group'; export type { ComponentFixtureProfile, Constructable, FixtureWithCustom } from '../component-fixture'; /** * Implementation of the fixture dedicated to angular, hence using angular testing framework. */ export declare class O3rComponentFixture implements ComponentFixtureProfile { /** * DOM element linked to the fixture. */ protected element: V; /** * Root element of this fixture. It will be used as the context for further queries. * @param element */ constructor(element: V); /** * Throws an exception if the element is undefined. * Otherwise returns the element. * @param element ElementProfile to test * @param _timeout specific timeout that will throw when reach */ protected throwOnUndefinedElement(element?: T, _timeout?: number): Promise; /** * Throws an exception if the element is undefined. * Otherwise returns the element. * @param element ElementProfile to test * @param timeout specific timeout that will throw when reach */ protected throwOnUndefined(element: Promise, timeout?: number): Promise; /** * Get the element associated to the selector if present * @param selector Selector to access the element * @param elementConstructor Constructor that will be used to create the Element, defaults to O3rElement * @param options Options supported * @param options.index index Select the element associated to the index * @param options.shouldThrowIfNotPresent If set to true the function will throw if the element is not present * @param options.timeout Duration to wait for the element to be present before it throws */ protected queryWithOptions(selector: string, elementConstructor: undefined, options: { index?: number; shouldThrowIfNotPresent?: boolean; timeout?: number; }): Promise; protected queryWithOptions(selector: string, elementConstructor: O3rElementConstructor, options: { index?: number; shouldThrowIfNotPresent?: boolean; timeout?: number; }): Promise; /** * Get text from the element associated to the given selector, or undefined if the element is not found or not visible * @param selector Selector to access the element * @param options Options supported * @param options.elementConstructor Constructor that will be used to create the Element, defaults to O3rElement * @param options.index index Select the element associated to the index * @param options.shouldThrowIfNotPresent If set to true the function will throw if the element is not present * @param options.timeout Duration to wait for the element to be present before it throws */ protected getText(selector: string, options?: { elementConstructor?: O3rElementConstructor | undefined; index?: number; shouldThrowIfNotPresent?: boolean; timeout?: number; }): Promise; /** * Check if the element associated to the given selector is visible * @param selector Selector to access the element * @param options Options supported * @param options.elementConstructor Constructor that will be used to create the Element, defaults to O3rElement * @param options.index index Select the element associated to the index * @param options.shouldThrowIfNotPresent If set to true the function will throw if the element is not present * @param options.timeout Duration to wait for the element to be present before it throws */ protected isVisible(selector: string, options?: { elementConstructor?: O3rElementConstructor | undefined; index?: number; shouldThrowIfNotPresent?: boolean; timeout?: number; }): Promise; /** * Click on the element associated to the given selector if it exists and is visible * @param selector Selector to access the element * @param options Options supported * @param options.elementConstructor Constructor that will be used to create the Element, defaults to O3rElement * @param options.index index Select the element associated to the index * @param options.shouldThrowIfNotPresent If set to true the function will throw if the element is not present * @param options.timeout Duration to wait for the element to be present before it throws */ protected click(selector: string, options?: { elementConstructor?: O3rElementConstructor | undefined; index?: number; shouldThrowIfNotPresent?: boolean; timeout?: number; }): Promise; /** @inheritdoc */ query(selector: string, returnType?: undefined): Promise; query(selector: string, returnType: O3rElementConstructor): Promise; /** @inheritdoc */ queryNth(selector: string, index: number, returnType?: undefined): Promise; queryNth(selector: string, index: number, returnType: O3rElementConstructor): Promise; /** @inheritdoc */ queryAll(_selector: string, _returnType?: undefined, groupType?: undefined, _timeout?: number): Promise; queryAll(selector: string, returnType: O3rElementConstructor, groupType?: undefined, _timeout?: number): Promise; queryAll>(selector: string, returnType: O3rElementConstructor, groupType: O3rGroupConstructor, _timeout?: number): Promise; /** @inheritdoc */ getElement(): V; /** @inheritdoc */ getSubComponents(): Promise<{ [componentName: string]: ComponentFixtureProfile[]; }>; /** @inheritDoc */ queryNotPresent(selector: string, _timeout?: number): Promise; } //# sourceMappingURL=component-fixture.d.ts.map