@skyux/layout
Version:
This library was generated with [Nx](https://nx.dev).
678 lines (642 loc) • 20.4 kB
TypeScript
import { ComponentFixture } from '@angular/core/testing';
import { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
import { SkyHarnessFilters, SkyComponentHarness, SkyQueryableComponentHarness } from '@skyux/core/testing';
import { SkyBoxHeadingLevel, SkyBoxHeadingStyle, SkyDescriptionListModeType, SkyTextExpandRepeaterListStyleType, SkyActionButtonContainerAlignItemsType } from '@skyux/layout';
/**
* Allows interaction with a SKY UX action button component.
* @deprecated Use `SkyActionButtonHarness` instead.
* @internal
*/
declare class SkyActionButtonFixture {
#private;
/**
* The action button's current header text.
*/
get headerText(): string | undefined;
/**
* The action button's current details text.
*/
get detailsText(): string | undefined;
/**
* The action button's current icon type.
*/
get iconType(): string | undefined;
constructor(fixture: ComponentFixture<any>, skyTestId: string);
/**
* Clicks the action button.
*/
actionClick(): void;
}
/**
* Allows interaction with a SKY UX avatar component.
* @deprecated
* @internal
*/
declare class SkyCardFixture {
#private;
/**
* The card's current title.
*/
get titleText(): string | undefined;
/**
* The card's current content text.
*/
get contentText(): string | undefined;
/**
* A flag indicating whether the user can select the card.
*/
get selectable(): boolean;
/**
* A flag indicating whether the card is currently selected. If the card
* is not selectable, an error is thrown.
*/
get selected(): boolean;
constructor(fixture: ComponentFixture<any>, skyTestId: string);
/**
* Selects the card.
*/
select(): void;
/**
* Deselects the card.
*/
deselect(): void;
}
/**
* Allows interaction with a SKY UX page summary component.
* @deprecated
* @internal
*/
declare class SkyPageSummaryFixture {
#private;
/**
* The page summary's current title text.
*/
get titleText(): string | undefined;
/**
* The page summary's current subtitle text.
*/
get subtitleText(): string | undefined;
/**
* The page summary's current content text.
*/
get contentText(): string | undefined;
constructor(fixture: ComponentFixture<any>, skyTestId: string);
}
/**
* Harness for interacting with a back to top component in tests.
*/
declare class SkyBackToTopHarness extends ComponentHarness {
#private;
/**
* @internal
*/
static hostSelector: string;
/**
* Clicks the back to top button.
*/
clickBackToTop(): Promise<void>;
}
/**
* A set of criteria that can be used to filter a list of `SkyBoxHarness` instances.
*/
interface SkyBoxHarnessFilters extends SkyHarnessFilters {
}
/**
* Harness for interacting with a box component in tests.
*/
declare class SkyBoxHarness extends SkyComponentHarness {
#private;
/**
* @internal
*/
static hostSelector: string;
/**
* Gets a `HarnessPredicate` that can be used to search for a
* `SkyBoxHarness` that meets certain criteria
*/
static with(filters: SkyBoxHarnessFilters): HarnessPredicate<SkyBoxHarness>;
/**
* Clicks the help inline button.
*/
clickHelpInline(): Promise<void>;
/**
* Gets the help popover content.
*/
getHelpPopoverContent(): Promise<string | undefined>;
/**
* Gets the help popover title.
*/
getHelpPopoverTitle(): Promise<string | undefined>;
/**
* Gets the box's heading text. If `headingHidden` is true,
* the text will still be returned.
*/
getHeadingText(): Promise<string | undefined>;
/**
* Whether the heading is hidden.
*/
getHeadingHidden(): Promise<boolean>;
/**
* The semantic heading level used for the checkbox group. Returns undefined if heading level is not set.
*/
getHeadingLevel(): Promise<SkyBoxHeadingLevel | undefined>;
/**
* The heading style used for the checkbox group.
*/
getHeadingStyle(): Promise<SkyBoxHeadingStyle>;
/**
* Gets the aria-label property of the box
*/
getAriaLabel(): Promise<string | null>;
/**
* Gets the aria-labelledby property of the box
*/
getAriaLabelledby(): Promise<string | null>;
/**
* Gets the aria-role property of the box
*/
getAriaRole(): Promise<string | null>;
}
/**
* Harness for interacting with a description list content component in tests.
*/
declare class SkyDescriptionListContentHarness extends ComponentHarness {
#private;
/**
* @internal
*/
static hostSelector: string;
/**
* Clicks the help inline button.
*/
clickHelpInline(): Promise<void>;
/**
* Gets the description component text.
*/
getDescriptionText(): Promise<string>;
/**
* Gets the help popover content.
*/
getHelpPopoverContent(): Promise<string | undefined>;
/**
* Gets the help popover title.
*/
getHelpPopoverTitle(): Promise<string | undefined>;
/**
* Gets the term component text.
*/
getTermText(): Promise<string>;
}
/**
* A set of criteria that can be used to filter a list of `SkyDescriptionListHarness` instances.
*/
interface SkyDescriptionListHarnessFilters extends SkyHarnessFilters {
}
/**
* Harness for interacting with a description list component in tests.
*/
declare class SkyDescriptionListHarness extends SkyComponentHarness {
#private;
/**
* @internal
*/
static hostSelector: string;
/**
* Gets a `HarnessPredicate` that can be used to search for a
* `SkyDescriptionListHarness` that meets certain criteria
*/
static with(filters: SkyDescriptionListHarnessFilters): HarnessPredicate<SkyDescriptionListHarness>;
/**
* Gets the description list content items.
*/
getContent(): Promise<SkyDescriptionListContentHarness[]>;
/**
* Gets the mode of the description list.
*/
getMode(): Promise<SkyDescriptionListModeType>;
}
/**
* A set of criteria that can be used to filter a list of `SkyColumnHarness` instances.
*/
interface SkyColumnHarnessFilters extends SkyHarnessFilters {
}
/**
* Harness for interacting with a fluid grid column component in tests.
*/
declare class SkyColumnHarness extends SkyComponentHarness {
#private;
/**
* @internal
*/
static hostSelector: string;
/**
* Gets a `HarnessPredicate` that can be used to search for a
* `SkyColumnHarness` that meets certain criteria
*/
static with(filters: SkyColumnHarnessFilters): HarnessPredicate<SkyColumnHarness>;
/**
* Gets the size of the column in an XSmall responsive context.
*/
getXSmallSize(): Promise<number>;
/**
* Gets the size of the column in a Small responsive context.
*/
getSmallSize(): Promise<number>;
/**
* Gets the size of the column in a Medium responsive context.
*/
getMediumSize(): Promise<number>;
/**
* Gets the size of the column in a Large responsive context.
*/
getLargeSize(): Promise<number>;
}
/**
* A set of criteria that can be used to filter a list of `SkyFluidGridHarness` instances.
*/
interface SkyFluidGridHarnessFilters extends SkyHarnessFilters {
}
/**
* A set of criteria that can be used to filter a list of `SkyRowHarness` instances.
*/
interface SkyRowHarnessFilters extends SkyHarnessFilters {
}
/**
* Harness for interacting with a fluid grid column component in tests.
*/
declare class SkyRowHarness extends SkyComponentHarness {
#private;
/**
* @internal
*/
static hostSelector: string;
/**
* Gets a `HarnessPredicate` that can be used to search for a
* `SkyRowHarness` that meets certain criteria
*/
static with(filters: SkyRowHarnessFilters): HarnessPredicate<SkyRowHarness>;
/**
* Gets all of the columns in the row.
*/
getColumns(): Promise<SkyColumnHarness[]>;
/**
* Gets the ordering of the columns in the row.
* @returns `normal` | `reverse`
*/
getColumnOrder(): Promise<string>;
}
/**
* Harness for interacting with a fluid grid component in tests.
*/
declare class SkyFluidGridHarness extends SkyComponentHarness {
#private;
/**
* @internal
*/
static hostSelector: string;
/**
* Gets a `HarnessPredicate` that can be used to search for a
* `SkyFluidGridHarness` that meets certain criteria
*/
static with(filters: SkyFluidGridHarnessFilters): HarnessPredicate<SkyFluidGridHarness>;
/**
* Gets the gutter size for the grid.
*/
getGutterSize(): Promise<string>;
/**
* Gets all of the rows in the grid.
*/
getRows(): Promise<SkyRowHarness[]>;
/**
* Whether the fluid grid has margin enabled.
*/
hasMargin(): Promise<boolean>;
}
/**
* A set of criteria that can be used to filter a list of `SkyTextExpandHarness` instances.
*/
interface SkyTextExpandHarnessFilters extends SkyHarnessFilters {
}
/**
* Harness for interacting with a text expand modal component in tests.
*/
declare class SkyTextExpandModalHarness extends ComponentHarness {
#private;
/**
* @internal
*/
static hostSelector: string;
/**
* Clicks the modal close button.
*/
clickCloseButton(): Promise<void>;
/**
* Gets the modal title.
*/
getExpandModalTitle(): Promise<string>;
/**
* Gets the expanded text in the modal.
*/
getText(): Promise<string>;
}
/**
* Harness for interacting with a text expand component in tests.
*/
declare class SkyTextExpandHarness extends SkyComponentHarness {
#private;
/**
* @internal
*/
static hostSelector: string;
/**
* Gets a `HarnessPredicate` that can be used to search for a
* `SkyTextExpandHarness` that meets certain criteria.
*/
static with(filters: SkyTextExpandHarnessFilters): HarnessPredicate<SkyTextExpandHarness>;
/**
* Clicks the button element that expands or collapses text.
*/
clickExpandCollapseButton(): Promise<void>;
/**
* Gets the harness to interact with the modal expanded view.
*/
getExpandedViewModal(): Promise<SkyTextExpandModalHarness>;
/**
* Gets the text content of the text expand.
*/
getText(): Promise<string>;
/**
* Whether the text will expand to a modal.
*/
textExpandsToModal(): Promise<boolean>;
/**
* Whether the text is expanded.
*/
isExpanded(): Promise<boolean>;
}
/**
* A set of criteria that can be used to filter a list of `SkyTextExpandRepeaterHarness` instances.
*/
interface SkyTextExpandRepeaterHarnessFilters extends SkyHarnessFilters {
}
/**
* Harness for interacting with a text expand repeater items in tests.
*/
declare class SkyTextExpandRepeaterItemHarness extends SkyQueryableComponentHarness {
/**
* @internal
*/
static hostSelector: string;
}
/**
* Harness for interacting with a text expand repeater component in tests.
*/
declare class SkyTextExpandRepeaterHarness extends SkyComponentHarness {
#private;
/**
* @internal
*/
static hostSelector: string;
/**
* Gets a `HarnessPredicate` that can be used to search for a
* `SkyTextExpandRepeaterHarness` that meets certain criteria.
*/
static with(filters: SkyTextExpandRepeaterHarnessFilters): HarnessPredicate<SkyTextExpandRepeaterHarness>;
/**
* Clicks the button element that expands or collapses text.
*/
clickExpandCollapseButton(): Promise<void>;
/**
* Gets an array of container harnesses for the repeater items.
*/
getItems(): Promise<SkyTextExpandRepeaterItemHarness[]>;
/**
* Gets the list style.
*/
getListStyle(): Promise<SkyTextExpandRepeaterListStyleType>;
/**
* Whether the text is expanded.
*/
isExpanded(): Promise<boolean>;
}
/**
* A set of criteria that can be used to filter a list of `SkyToolbarHarness` instances.
*/
interface SkyToolbarHarnessFilters extends SkyHarnessFilters {
}
/**
* A set of criteria that can be used to filter a list of `SkyToolbarItemHarness` instances.
*/
interface SkyToolbarItemHarnessFilters extends SkyHarnessFilters {
}
/**
* Harness to interact with a toolbar item component in tests.
*/
declare class SkyToolbarItemHarness extends SkyQueryableComponentHarness {
/**
* @internal
*/
static hostSelector: string;
/**
* Gets a `HarnessPredicate` that can be used to search for a
* `SkyToolbarItemHarness` that meets certain criteria.
*/
static with(filters: SkyToolbarItemHarnessFilters): HarnessPredicate<SkyToolbarItemHarness>;
}
/**
* A set of criteria that can be used to filter a list of `SkyToolbarSectionHarness` instances.
*/
interface SkyToolbarSectionHarnessFilters extends SkyHarnessFilters {
}
/**
* Harness to interact with a toolbar view actions component in tests.
*/
declare class SkyToolbarViewActionsHarness extends SkyQueryableComponentHarness {
/**
* @internal
*/
static hostSelector: string;
}
/**
* Harness to interact with a toolbar section component in tests.
*/
declare class SkyToolbarSectionHarness extends SkyComponentHarness {
#private;
/**
* @internal
*/
static hostSelector: string;
/**
* Gets a `HarnessPredicate` that can be used to search for a
* `SkyToolbarSectionHarness` that meets certain criteria.
*/
static with(filters: SkyToolbarSectionHarnessFilters): HarnessPredicate<SkyToolbarSectionHarness>;
/**
* Gets a specific toolbar item based on the filter criteria.
* @param filter The filter criteria.
*/
getItem(filter: SkyToolbarItemHarnessFilters): Promise<SkyToolbarItemHarness>;
/**
* Gets an array of toolbar items based on the filter criteria.
* If no filter is provided, returns all toolbar items.
* @param filters The optional filter criteria.
*/
getItems(filters?: SkyToolbarItemHarnessFilters): Promise<SkyToolbarItemHarness[]>;
/**
* Gets the harness to interact with the toolbar's view actions.
*/
getViewActions(): Promise<SkyToolbarViewActionsHarness>;
}
/**
* Harness for interacting with a toolbar component in tests.
*/
declare class SkyToolbarHarness extends SkyComponentHarness {
#private;
/**
* @internal
*/
static hostSelector: string;
/**
* Gets a `HarnessPredicate` that can be used to search for a
* `SkyToolbarHarness` that meets certain criteria.
*/
static with(filters: SkyToolbarHarnessFilters): HarnessPredicate<SkyToolbarHarness>;
/**
* Gets a specific toolbar item based on the filter criteria.
* @param filter The filter criteria.
*/
getItem(filter: SkyToolbarItemHarnessFilters): Promise<SkyToolbarItemHarness>;
/**
* Gets an array of toolbar items based on the filter criteria.
* If no filter is provided, returns all toolbar items.
* @param filters The optional filter criteria.
*/
getItems(filters?: SkyToolbarItemHarnessFilters): Promise<SkyToolbarItemHarness[]>;
/**
* Gets a specific toolbar section based on the filter criteria.
* @param filter The filter criteria.
*/
getSection(filter: SkyToolbarSectionHarnessFilters): Promise<SkyToolbarSectionHarness>;
/**
* Gets an array of toolbar sections based on the filter criteria.
* If no filter is provided, returns all toolbar sections.
* @param filters The optional filter criteria.
*/
getSections(filters?: SkyToolbarSectionHarnessFilters): Promise<SkyToolbarSectionHarness[]>;
/**
* Gets the harness to interact with the toolbar's view actions.
*/
getViewActions(): Promise<SkyToolbarViewActionsHarness>;
}
/**
* A set of criteria that can be used to filter a list of `SkyActionButtonContainerHarness` instances.
*/
interface SkyActionButtonContainerHarnessFilters extends SkyHarnessFilters {
}
/**
* A set of criteria that can be used to filter a list of `SkyActionButtonHarness` instances.
*/
interface SkyActionButtonHarnessFilters extends SkyHarnessFilters {
/**
* Finds action buttons whose header matches given value.
*/
header?: string;
}
/**
* Harness for interacting with a action button component in tests.
*/
declare class SkyActionButtonHarness extends SkyComponentHarness {
#private;
/**
* @internal
*/
static hostSelector: string;
/**
* Gets a `HarnessPredicate` that can be used to search for a
* `SkyActionButtonHarness` that meets certain criteria.
*/
static with(filters: SkyActionButtonHarnessFilters): HarnessPredicate<SkyActionButtonHarness>;
/**
* Clicks the action button.
*/
click(): Promise<void>;
/**
* Gets the action button details text.
*/
getDetailsText(): Promise<string | null>;
/**
* Gets the action button header text.
*/
getHeaderText(): Promise<string | null>;
/**
* Gets the action button icon type.
*/
getIconType(): Promise<string | undefined>;
/**
* Gets the action button link.
*/
getLink(): Promise<string | undefined>;
}
/**
* Harness for interacting with a action button container component in tests.
*/
declare class SkyActionButtonContainerHarness extends SkyComponentHarness {
/**
* @internal
*/
static hostSelector: string;
/**
* Gets a `HarnessPredicate` that can be used to search for a
* `SkyActionButtonContainerHarness` that meets certain criteria.
*/
static with(filters: SkyActionButtonContainerHarnessFilters): HarnessPredicate<SkyActionButtonContainerHarness>;
/**
* Gets a specific action button based on the filter criteria.
* @param filter The filter criteria.
*/
getActionButton(filter: SkyActionButtonHarnessFilters): Promise<SkyActionButtonHarness>;
/**
* Gets an array of action buttons based on the filter criteria.
* If no filter is provided, returns all action buttons.
* @param filters The optional filter criteria.
*/
getActionButtons(filters?: SkyActionButtonHarnessFilters): Promise<SkyActionButtonHarness[]>;
/**
* Gets the alignment of the buttons inside the container.
*/
getAlignment(): Promise<SkyActionButtonContainerAlignItemsType>;
}
/**
* A set of criteria that can be used to filter a list of `SkyInlineDeleteHarness` instances.
*/
interface SkyInlineDeleteHarnessFilters extends SkyHarnessFilters {
}
/**
* Harness for interacting with an inline delete component in tests.
*/
declare class SkyInlineDeleteHarness extends SkyComponentHarness {
#private;
/**
* @internal
*/
static hostSelector: string;
/**
* Gets a `HarnessPredicate` that can be used to search for a
* `SkyInlineDeleteHarness` that meets certain criteria.
*/
static with(filters: SkyInlineDeleteHarnessFilters): HarnessPredicate<SkyInlineDeleteHarness>;
/**
* Clicks the delete button.
*/
clickDeleteButton(): Promise<void>;
/**
* Clicks the cancel button.
*/
clickCancelButton(): Promise<void>;
/**
* Whether the inline delete is pending.
*/
isPending(): Promise<boolean>;
}
export { SkyActionButtonContainerHarness, SkyActionButtonFixture, SkyActionButtonHarness, SkyBackToTopHarness, SkyBoxHarness, SkyCardFixture, SkyColumnHarness, SkyDescriptionListContentHarness, SkyDescriptionListHarness, SkyFluidGridHarness, SkyInlineDeleteHarness, SkyPageSummaryFixture, SkyRowHarness, SkyTextExpandHarness, SkyTextExpandModalHarness, SkyTextExpandRepeaterHarness, SkyTextExpandRepeaterItemHarness, SkyToolbarHarness, SkyToolbarItemHarness, SkyToolbarSectionHarness, SkyToolbarViewActionsHarness };
export type { SkyActionButtonContainerHarnessFilters, SkyActionButtonHarnessFilters, SkyBoxHarnessFilters, SkyColumnHarnessFilters, SkyDescriptionListHarnessFilters, SkyFluidGridHarnessFilters, SkyInlineDeleteHarnessFilters, SkyRowHarnessFilters, SkyTextExpandHarnessFilters, SkyTextExpandRepeaterHarnessFilters, SkyToolbarHarnessFilters, SkyToolbarItemHarnessFilters, SkyToolbarSectionHarnessFilters };