API reference for Angular Material grid-list-testing

import {MatGridTileHarness} from '@angular/material/grid-list/testing';

Harness for interacting with a standard MatGridTitle in tests.

Methods
async
getColspan

Gets the amount of columns that the grid-tile takes up.

Returns
Promise<number>

async
getFooterText

Gets the text of the footer if present.

Returns
Promise<string | null>

async
getHeaderText

Gets the text of the header if present.

Returns
Promise<string | null>

async
getRowspan

Gets the amount of rows that the grid-tile takes up.

Returns
Promise<number>

async
hasAvatar

Whether the grid-tile has an avatar.

Returns
Promise<boolean>

async
hasFooter

Whether the grid-tile has a footer.

Returns
Promise<boolean>

async
hasHeader

Whether the grid-tile has a header.

Returns
Promise<boolean>

async
host

Gets a Promise for the TestElement representing the host element of the component.

Returns
Promise<TestElement>

Harness for interacting with a standard MatGridList in tests.

Methods
async
getColumns

Gets the amount of columns of the grid-list.

Returns
Promise<number>

async
getTileAtPosition

Gets a tile of the grid-list that is located at the given location.

Parameters

row

Zero-based row index.

column

Zero-based column index.

__0

{ row

Returns
Promise<MatGridTileHarness>

async
getTiles

Gets all tiles of the grid-list.

Parameters

filters

GridTileHarnessFilters = {}

Returns
Promise<MatGridTileHarness[]>

async
host

Gets a Promise for the TestElement representing the host element of the component.

Returns
Promise<TestElement>

A set of criteria that can be used to filter a list of MatGridListHarness instances.

A set of criteria that can be used to filter a list of MatTileHarness instances.

Properties
Name Description

footerText: string | RegExp

Text the grid-tile footer should match.

headerText: string | RegExp

Text the grid-tile header should match.