import { HarnessPredicate, TestElement, BaseHarnessFilters, ComponentHarness } from '@angular/cdk/testing'; import { SkyHarnessFilters, SkyComponentHarness } from '@skyux/core/testing'; import { SkyIndicatorIconType, SkyIndicatorDescriptionType, SkyIllustrationSize, SkyKeyInfoLayoutType, SkyLabelType } from '@skyux/indicators'; import { ComponentFixture } from '@angular/core/testing'; /** * A set of criteria that can be used to filter a list of SkyAlertHarness instances. */ interface SkyAlertHarnessFilters extends SkyHarnessFilters { } /** * Harness for interacting with an alert component in tests. */ declare class SkyAlertHarness extends SkyComponentHarness { #private; /** * @internal */ static hostSelector: string; /** * Gets a `HarnessPredicate` that can be used to search for a * `SkyAlertHarness` that meets certain criteria. */ static with(filters: SkyAlertHarnessFilters): HarnessPredicate; /** * Gets the current alert type. */ getAlertType(): Promise; /** * Gets the current alert text. */ getText(): Promise; /** * Closes the alert. */ close(): Promise; /** * Whether the user closed the alert. */ isClosed(): Promise; /** * Whether the user can close the alert. */ isCloseable(): Promise; /** * Gets the `descriptionType` of the label component. */ getDescriptionType(): Promise; /** * Gets the custom text used for the screen reader description of the label component icon. */ getCustomDescription(): Promise; } /** * Harness for interacting with a chevron component in tests. * @internal */ declare class SkyChevronHarness extends SkyComponentHarness { #private; /** * @internal */ static hostSelector: string; /** * Gets the chevron direction. */ getDirection(): Promise; /** * Whether the chevron is disabled. */ isDisabled(): Promise; /** * Toggles the chevron. */ toggle(): Promise; } /** * A set of criteria that can be used to filter a list of SkyHelpInlineHarness instances. * @docsId SkyHelpInlineHarnessFiltersLegacy * @deprecated Use the `SkyHelpInlineHarnessFilters` from `@skyux/help-inline/testing` instead. */ interface SkyHelpInlineHarnessFilters extends SkyHarnessFilters { } /** * Harness for interacting with a help inline component in tests. * @docsId SkyHelpInlineHarnessLegacy * @deprecated Use the `SkyHelpInlineHarness` from `@skyux/help-inline/testing` instead. */ declare class SkyHelpInlineHarness extends SkyComponentHarness { #private; /** * @internal */ static hostSelector: string; /** * Gets a `HarnessPredicate` that can be used to search for a * `SkyInlineHelpHarness` that meets certain criteria */ static with(filters: SkyHelpInlineHarnessFilters): HarnessPredicate; /** * Clicks the help inline icon button */ click(): Promise; } /** * A set of criteria that can be used to filter a list of `SkyIllustrationHarness` instances. */ interface SkyIllustrationHarnessFilters extends SkyHarnessFilters { } /** * Harness for interacting with an illustration component in tests. */ declare class SkyIllustrationHarness extends SkyComponentHarness { #private; /** * @internal */ static hostSelector: string; /** * Gets a `HarnessPredicate` that can be used to search for a * `SkyIllustrationHarness` that meets certain criteria. */ static with(filters: SkyIllustrationHarnessFilters): HarnessPredicate; /** * Gets the specified name of the illustration. */ getName(): Promise; /** * Gets the specified size of the illustration. */ getSize(): Promise; } /** * A set of criteria that can be used to filter a list of SkyKeyInfoHarness instances. */ interface SkyKeyInfoHarnessFilters extends SkyHarnessFilters { } /** * Harness for interacting with a key info component in tests. */ declare class SkyKeyInfoHarness extends SkyComponentHarness { #private; /** * @internal */ static hostSelector: string; /** * Gets a `HarnessPredicate` that can be used to search for a * `SkyKeyInfoHarness` that meets certain criteria. */ static with(filters: SkyKeyInfoHarnessFilters): HarnessPredicate; /** * Gets the current value text. */ getValueText(): Promise; /** * Gets the current label text. */ getLabelText(): Promise; /** * Gets the current layout type. */ getLayout(): Promise; /** * Clicks the help inline button. */ clickHelpInline(): Promise; /** * Gets the help popover content. */ getHelpPopoverContent(): Promise; /** * Gets the help popover title. */ getHelpPopoverTitle(): Promise; } /** * A set of criteria that can be used to filter a list of `SkyLabelHarness` instances. */ interface SkyLabelHarnessFilters extends SkyHarnessFilters { } /** * Harness for interacting with a label component in tests. */ declare class SkyLabelHarness extends SkyComponentHarness { #private; /** * @internal */ static hostSelector: string; /** * Gets a `HarnessPredicate` that can be used to search for a * `SkyLookupHarness` that meets certain criteria. */ static with(filters: SkyLabelHarnessFilters): HarnessPredicate; /** * Gets the text of the label component. */ getLabelText(): Promise; /** * Gets the `labelType` of the label component. */ getLabelType(): Promise; /** * Gets the `descriptionType` of the label component. */ getDescriptionType(): Promise; /** * Gets the custom text used for the screen reader description of the label component icon. */ getCustomDescription(): Promise; } /** * A set of criteria that can be used to filter a list of SkyStatusIndicatorHarness instances. */ interface SkyStatusIndicatorHarnessFilters extends SkyHarnessFilters { } /** * Harness for interacting with a status indicator component in tests. */ declare class SkyStatusIndicatorHarness extends SkyComponentHarness { #private; /** * @internal */ static hostSelector: string; /** * Gets a `HarnessPredicate` that can be used to search for a * `SkyStatusIndicatorHarness` that meets certain criteria. */ static with(filters: SkyStatusIndicatorHarnessFilters): HarnessPredicate; /** * Gets the current status indicator type. */ getIndicatorType(): Promise; /** * Gets the current status indicator text. */ getText(): Promise; /** * Gets the `descriptionType` of the status indicator component. */ getDescriptionType(): Promise; /** * Gets the custom text used for the screen reader description of the status indicator component icon. */ getCustomDescription(): Promise; /** * Clicks the help inline button. */ clickHelpInline(): Promise; /** * Gets the help inline popover content. */ getHelpPopoverContent(): Promise; /** * Gets the help inline popover title. */ getHelpPopoverTitle(): Promise; } /** * A set of criteria that can be used to filter a list of SkyTextHighlightHarness instances. */ interface SkyTextHighlightHarnessFilters extends SkyHarnessFilters { } /** * Harness to interact with a text highlight directive in tests. */ declare class SkyTextHighlightHarness extends SkyComponentHarness { /** * @internal */ static hostSelector: string; /** * Gets a `HarnessPredicate` that can be used to search for a * `SkyTextHighlightHarness` that meets certain criteria. */ static with(filters: SkyTextHighlightHarnessFilters): HarnessPredicate; /** * Gets an array of all instances of highlighted text. */ getHighlights(): Promise; } /** * A set of criteria that can be used to filter a list of `SkyTokenHarness` instances. */ interface SkyTokenHarnessFilters extends BaseHarnessFilters { /** * Only find instances whose text content matches the given value. */ text?: string | RegExp; } /** * Harness for interacting with a token component in tests. */ declare class SkyTokenHarness extends ComponentHarness { #private; /** * @internal */ static hostSelector: string; /** * Gets a `HarnessPredicate` that can be used to search for a * `SkyTokenHarness` that meets certain criteria. */ static with(filters: SkyTokenHarnessFilters): HarnessPredicate; /** * Selects the token. */ select(): Promise; /** * Dismisses the token. */ dismiss(): Promise; /** * Returns the text content of the token. */ getText(): Promise; /** * Whether the token is disabled. */ isDisabled(): Promise; /** * Whether the token is dismissible. */ isDismissible(): Promise; /** * Whether the token is focused. */ isFocused(): Promise; } /** * A set of criteria that can be used to filter a list of `SkyTokensHarness` instances. */ interface SkyTokensHarnessFilters extends SkyHarnessFilters { } /** * Harness for interacting with a tokens component in tests. */ declare class SkyTokensHarness extends SkyComponentHarness { /** * @internal */ static hostSelector: string; /** * Gets a `HarnessPredicate` that can be used to search for a * `SkyTokensHarness` that meets certain criteria. */ static with(filters: SkyTokensHarnessFilters): HarnessPredicate; /** * Dismisses all tokens, or tokens that meet certain criteria. */ dismissTokens(filters?: SkyTokenHarnessFilters): Promise; /** * Gets a specific token based on the filter criteria. * @param filter The filter criteria. */ getToken(filter: SkyTokenHarnessFilters): Promise; /** * Gets an array of tokens based on the filter criteria. * If no filter is provided, returns all tokens. * @param filters The optional filter criteria. */ getTokens(filters?: SkyTokenHarnessFilters): Promise; /** * Returns the text content of all tokens. */ getTokensText(): Promise; } /** * A set of criteria that can be used to filter a list of SkyWaitHarness instances. */ interface SkyWaitHarnessFilters extends SkyHarnessFilters { /** * Only find blocking or non-blocking instances created by the `SkyWaitService`. */ servicePageWaitType?: 'blocking' | 'non-blocking'; } /** * Harness for interacting with a wait component in tests. */ declare class SkyWaitHarness extends SkyComponentHarness { #private; /** * @internal */ static hostSelector: string; /** * Gets a `HarnessPredicate` that can be used to search for a * `SkyWaitHarness` that meets certain criteria. */ static with(filters: SkyWaitHarnessFilters): HarnessPredicate; /** * Gets the ARIA label for the wait component or throws an error if not waiting. */ getAriaLabel(): Promise; /** * Gets the waiting state of the wait component. */ isWaiting(): Promise; /** * Gets the full page state of the wait component. */ isFullPage(): Promise; /** * Gets the blocking state of the wait component. */ isNonBlocking(): Promise; } /** * Allows interaction with a SKY UX alert component. * @deprecated Use `SkyAlertHarness` instead. * @internal */ declare class SkyAlertFixture { #private; /** * The alert's current text. */ get text(): string | undefined; /** * A flag indicating whether the alert can be closed. */ get closeable(): boolean | undefined; /** * Returns a flag indicating whether the alert is closed. */ get closed(): boolean; /** * The alert's current type. */ get alertType(): string | undefined; constructor(fixture: ComponentFixture, skyTestId: string); /** * Closes the alert. If the alert is not closeable, an error is thrown. */ close(): void; } /** * Allows interaction with a SKY UX label component. * @deprecated Use `SkyLabelHarness` instead. * @internal */ declare class SkyLabelFixture { #private; /** * The label's current type. */ get labelType(): string | undefined; /** * The label's current text. */ get text(): string | undefined; constructor(fixture: ComponentFixture, skyTestId: string); } /** * @deprecated Use `SkyWaitHarness` instead. * @internal */ declare class SkyWaitFixture { #private; get isWaiting(): boolean; get isFullPage(): boolean; get ariaLabel(): string; get isNonBlocking(): boolean; constructor(fixture: ComponentFixture, skyTestId: string); } export { SkyAlertFixture, SkyAlertHarness, SkyChevronHarness, SkyHelpInlineHarness, SkyIllustrationHarness, SkyKeyInfoHarness, SkyLabelFixture, SkyLabelHarness, SkyStatusIndicatorHarness, SkyTextHighlightHarness, SkyTokenHarness, SkyTokensHarness, SkyWaitFixture, SkyWaitHarness }; export type { SkyAlertHarnessFilters, SkyHelpInlineHarnessFilters, SkyIllustrationHarnessFilters, SkyKeyInfoHarnessFilters, SkyLabelHarnessFilters, SkyStatusIndicatorHarnessFilters, SkyTextHighlightHarnessFilters, SkyTokenHarnessFilters, SkyTokensHarnessFilters, SkyWaitHarnessFilters };