* Gets a `HarnessPredicate` that can be used to search for a option group with specific * attributes. * @param options Options for filtering which option instances are considered a match. * @return a `HarnessPredicate` configured with the given options.
(
this: ComponentHarnessConstructor<T>,
options: OptgroupHarnessFilters = {},
)
| 28 | * @return a `HarnessPredicate` configured with the given options. |
| 29 | */ |
| 30 | static with<T extends MatOptgroupHarness>( |
| 31 | this: ComponentHarnessConstructor<T>, |
| 32 | options: OptgroupHarnessFilters = {}, |
| 33 | ): HarnessPredicate<T> { |
| 34 | return new HarnessPredicate(this, options).addOption( |
| 35 | 'labelText', |
| 36 | options.labelText, |
| 37 | async (harness, title) => HarnessPredicate.stringMatches(await harness.getLabelText(), title), |
| 38 | ); |
| 39 | } |
| 40 | |
| 41 | /** Gets the option group's label text. */ |
| 42 | async getLabelText(): Promise<string> { |
no test coverage detected