/
githubmirror
/
components
Обзор
Документация
Войти
/
githubmirror
/
components
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/material/tabs/testing/tab-nav-panel-harness.ts
38 строк
1 KB
Naji
docs: replace angular.io links with angular.dev (#29734)
19 сен 2024, 13:57
Не верифицирован
19 сен 2024, 13:57
5782834
Код
Авторство
О чём код?
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import { ComponentHarnessConstructor, ContentContainerComponentHarness, HarnessPredicate, } from '@angular/cdk/testing'; import {TabNavPanelHarnessFilters} from './tab-harness-filters'; /** Harness for interacting with a standard mat-tab-nav-panel in tests. */ export class MatTabNavPanelHarness extends ContentContainerComponentHarness { /** The selector for the host element of a `MatTabNavPanel` instance. */ static hostSelector = '.mat-mdc-tab-nav-panel'; /** * Gets a `HarnessPredicate` that can be used to search for a tab nav panel with specific * attributes. * @param options Options for filtering which tab nav panel instances are considered a match. * @return a `HarnessPredicate` configured with the given options. */ static with<T extends MatTabNavPanelHarness>( this: ComponentHarnessConstructor<T>, options: TabNavPanelHarnessFilters = {}, ): HarnessPredicate<T> { return new HarnessPredicate(this, options); } /** Gets the tab panel text content. */ async getTextContent(): Promise<string> { return (await this.host()).text(); } }