@skyux-sdk/testing
Version:
This library was generated with [Nx](https://nx.dev).
31 lines (30 loc) • 1.43 kB
TypeScript
import { DebugElement } from '@angular/core';
import { ComponentFixture } from '@angular/core/testing';
import { SkyAppTestUtilityDomEventOptions } from './test-utility-dom-event-options';
export declare class SkyAppTestUtility {
static fireDomEvent(element: EventTarget | null | undefined, eventName: string, options?: SkyAppTestUtilityDomEventOptions): void;
/**
* Returns the inner text content of an element.
*/
static getText(element: any): string | undefined;
/**
* Returns true if the element exists on the page.
*/
static isVisible(element: any): boolean | undefined;
/**
* Sets the value of an input element and triggers its 'input' and 'change' events.
*/
static setInputValue(element: any, value: string): void;
/**
* Returns the URL of an element's background image, if it exists.
*/
static getBackgroundImageUrl(el: any): string | undefined;
/**
* Returns a DebugElement representing a SKY UX component.
* @internal
* @param fixture The ComponentFixture where the SKY UX component resides.
* @param skyTestId The value of the `data-sky-id` property specified on the SKY UX component.
* @param componentSelector The selector name for the SKY UX component (e.g. 'sky-alert').
*/
static getDebugElementByTestId(fixture: ComponentFixture<any>, skyTestId: string, componentSelector: string): DebugElement;
}