* Gets a `HarnessPredicate` that can be used to search for a `MatInputHarness` that meets * certain criteria. * @param options Options for filtering which input instances are considered a match. * @return a `HarnessPredicate` configured with the given options.
(options: InputHarnessFilters = {})
| 25 | * @return a `HarnessPredicate` configured with the given options. |
| 26 | */ |
| 27 | static with(options: InputHarnessFilters = {}): HarnessPredicate<MatInputHarness> { |
| 28 | return new HarnessPredicate(MatInputHarness, options) |
| 29 | .addOption('value', options.value, (harness, value) => { |
| 30 | return HarnessPredicate.stringMatches(harness.getValue(), value); |
| 31 | }) |
| 32 | .addOption('placeholder', options.placeholder, (harness, placeholder) => { |
| 33 | return HarnessPredicate.stringMatches(harness.getPlaceholder(), placeholder); |
| 34 | }) |
| 35 | .addOption('label', options.label, (harness, label) => { |
| 36 | return HarnessPredicate.stringMatches(harness.getLabel(), label); |
| 37 | }); |
| 38 | } |
| 39 | |
| 40 | /** Whether the input is disabled. */ |
| 41 | async isDisabled(): Promise<boolean> { |
no test coverage detected