File tree Expand file tree Collapse file tree
src/aria/accordion/testing Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ /**
2+ * @license
3+ * Copyright Google LLC All Rights Reserved.
4+ *
5+ * Use of this source code is governed by an MIT-style license that can be
6+ * found in the LICENSE file at https://angular.dev/license
7+ */
8+
9+ import { BaseHarnessFilters } from '@angular/cdk/testing' ;
10+
11+ /** Filters for locating an `AccordionHarness`. */
12+ export interface AccordionHarnessFilters extends BaseHarnessFilters {
13+ /** Only find instances whose title text matches the given value. */
14+ title ?: string | RegExp ;
15+ /** Only find instances whose expanded state matches the given value. */
16+ expanded ?: boolean ;
17+ /** Only find instances whose disabled state matches the given value. */
18+ disabled ?: boolean ;
19+ }
20+
21+ /** Filters for locating an `AccordionGroupHarness`. */
22+ export interface AccordionGroupHarnessFilters extends BaseHarnessFilters { }
Original file line number Diff line number Diff line change @@ -10,28 +10,15 @@ import {
1010 ComponentHarness ,
1111 ContentContainerComponentHarness ,
1212 HarnessPredicate ,
13- BaseHarnessFilters ,
1413} from '@angular/cdk/testing' ;
14+ import { AccordionHarnessFilters , AccordionGroupHarnessFilters } from './accordion-harness-filters' ;
1515
1616/** Selectors for the sections that may contain user content. */
1717export enum AccordionSection {
1818 TRIGGER = '[ngAccordionTrigger]' ,
1919 PANEL = '[ngAccordionPanel]' ,
2020}
2121
22- /** Filters for locating an `AccordionHarness`. */
23- export interface AccordionHarnessFilters extends BaseHarnessFilters {
24- /** Only find instances whose title text matches the given value. */
25- title ?: string | RegExp ;
26- /** Only find instances whose expanded state matches the given value. */
27- expanded ?: boolean ;
28- /** Only find instances whose disabled state matches the given value. */
29- disabled ?: boolean ;
30- }
31-
32- /** Filters for locating an `AccordionGroupHarness`. */
33- export interface AccordionGroupHarnessFilters extends BaseHarnessFilters { }
34-
3522/** Harness for interacting with a standard ngAccordion item in tests. */
3623export class AccordionHarness extends ContentContainerComponentHarness < AccordionSection > {
3724 static hostSelector = '[ngAccordionTrigger]' ;
Original file line number Diff line number Diff line change 77 */
88
99export * from './accordion-harness' ;
10+ export * from './accordion-harness-filters' ;
You can’t perform that action at this time.
0 commit comments