* Gets a `HarnessPredicate` that can be used to search for a `MatIconHarness` that meets * certain criteria. * @param options Options for filtering which icon instances are considered a match. * @return a `HarnessPredicate` configured with the given options.
(options: IconHarnessFilters = {})
| 21 | * @return a `HarnessPredicate` configured with the given options. |
| 22 | */ |
| 23 | static with(options: IconHarnessFilters = {}): HarnessPredicate<MatIconHarness> { |
| 24 | return new HarnessPredicate(MatIconHarness, options) |
| 25 | .addOption('type', options.type, async (harness, type) => (await harness.getType()) === type) |
| 26 | .addOption('name', options.name, (harness, text) => |
| 27 | HarnessPredicate.stringMatches(harness.getName(), text), |
| 28 | ) |
| 29 | .addOption('namespace', options.namespace, (harness, text) => |
| 30 | HarnessPredicate.stringMatches(harness.getNamespace(), text), |
| 31 | ); |
| 32 | } |
| 33 | |
| 34 | /** Gets the type of the icon. */ |
| 35 | async getType(): Promise<IconType> { |
no test coverage detected