* Gets a `HarnessPredicate` that can be used to search for a chip grid with specific attributes. * @param options Options for filtering which chip grid instances are considered a match. * @return a `HarnessPredicate` configured with the given options.
(
this: ComponentHarnessConstructor<T>,
options: ChipGridHarnessFilters = {},
)
| 29 | * @return a `HarnessPredicate` configured with the given options. |
| 30 | */ |
| 31 | static with<T extends MatChipGridHarness>( |
| 32 | this: ComponentHarnessConstructor<T>, |
| 33 | options: ChipGridHarnessFilters = {}, |
| 34 | ): HarnessPredicate<T> { |
| 35 | return new HarnessPredicate(this, options).addOption( |
| 36 | 'disabled', |
| 37 | options.disabled, |
| 38 | async (harness, disabled) => { |
| 39 | return (await harness.isDisabled()) === disabled; |
| 40 | }, |
| 41 | ); |
| 42 | } |
| 43 | |
| 44 | /** Gets whether the chip grid is disabled. */ |
| 45 | async isDisabled(): Promise<boolean> { |
no test coverage detected