import { ComponentHarness, BaseHarnessFilters, HarnessPredicate } from '@angular/cdk/testing';
/** Harness filters for ComTableCellHarness. */
interface ComTableCellHarnessFilters extends BaseHarnessFilters {
/** Filter by the cell's text content. */
text?: string | RegExp;
}
/** Harness filters for ComTableRowHarness. */
type ComTableRowHarnessFilters = BaseHarnessFilters;
/** Harness filters for ComTableHeaderRowHarness. */
type ComTableHeaderRowHarnessFilters = BaseHarnessFilters;
/** Harness filters for ComTableFooterRowHarness. */
type ComTableFooterRowHarnessFilters = BaseHarnessFilters;
/** Harness filters for ComTableHarness. */
interface ComTableHarnessFilters extends BaseHarnessFilters {
/** Filter by the table's aria-label. */
ariaLabel?: string | RegExp;
}
/**
* Harness for interacting with a table cell (`
` or ` | `) in tests.
*/
declare class ComTableCellHarness extends ComponentHarness {
static hostSelector: string;
/**
* Gets a HarnessPredicate for matching table cells.
* @param options Filter options.
*/
static with(options?: ComTableCellHarnessFilters): HarnessPredicate;
/** Gets the cell's text content. */
getText(): Promise;
}
/**
* Harness for interacting with a table header row (` `) in tests.
*/
declare class ComTableHeaderRowHarness extends ComponentHarness {
static hostSelector: string;
/**
* Gets a HarnessPredicate for matching header rows.
* @param options Filter options.
*/
static with(options?: ComTableHeaderRowHarnessFilters): HarnessPredicate;
/** Gets all header cells in this row, optionally filtered. */
getCells(filters?: ComTableCellHarnessFilters): Promise;
/** Gets the text content of all header cells. */
getCellTexts(): Promise;
}
/**
* Harness for interacting with a table body row (` `) in tests.
*/
declare class ComTableRowHarness extends ComponentHarness {
static hostSelector: string;
/**
* Gets a HarnessPredicate for matching body rows.
* @param options Filter options.
*/
static with(options?: ComTableRowHarnessFilters): HarnessPredicate;
/** Gets all cells in this row, optionally filtered. */
getCells(filters?: ComTableCellHarnessFilters): Promise;
/** Gets the text content of all cells in this row. */
getCellTexts(): Promise;
/** Clicks the row. Useful for tables with clickable rows. */
click(): Promise;
/** Whether the row is clickable (has tabindex="0"). */
isClickable(): Promise;
}
/**
* Harness for interacting with a table footer row (` `) in tests.
*/
declare class ComTableFooterRowHarness extends ComponentHarness {
static hostSelector: string;
/**
* Gets a HarnessPredicate for matching footer rows.
* @param options Filter options.
*/
static with(options?: ComTableFooterRowHarnessFilters): HarnessPredicate;
/** Gets all cells in this footer row, optionally filtered. */
getCells(filters?: ComTableCellHarnessFilters): Promise;
/** Gets the text content of all cells in this footer row. */
getCellTexts(): Promise;
}
/**
* Harness for interacting with a ComTable in tests.
*/
declare class ComTableHarness extends ComponentHarness {
static hostSelector: string;
private readonly tableElement;
/**
* Gets a HarnessPredicate for matching tables.
* @param options Filter options.
*/
static with(options?: ComTableHarnessFilters): HarnessPredicate;
/** Gets the table's aria-label. */
getAriaLabel(): Promise;
/** Whether the table is currently loading (aria-busy="true"). */
isLoading(): Promise;
/** Gets all header rows. */
getHeaderRows(): Promise;
/** Gets the text content of all header cells from the first header row. */
getHeaderCellTexts(): Promise;
/** Gets all body rows, optionally filtered. */
getRows(filters?: ComTableRowHarnessFilters): Promise;
/** Gets the number of body rows. */
getRowCount(): Promise;
/**
* Gets the text content of all body cells as a 2D array.
* Each inner array contains the cell texts for a single row.
*/
getCellTexts(): Promise;
/** Gets all footer rows. */
getFooterRows(): Promise;
/** Gets the text content of all footer cells from the first footer row. */
getFooterCellTexts(): Promise;
/** Whether the table is disabled (aria-disabled). */
isDisabled(): Promise;
/** Whether the table host is focused. */
isFocused(): Promise;
/** Focuses the table host element. */
focus(): Promise;
/** Blurs the table host element. */
blur(): Promise;
}
export { ComTableCellHarness, ComTableFooterRowHarness, ComTableHarness, ComTableHeaderRowHarness, ComTableRowHarness };
export type { ComTableCellHarnessFilters, ComTableFooterRowHarnessFilters, ComTableHarnessFilters, ComTableHeaderRowHarnessFilters, ComTableRowHarnessFilters };
|