MCPcopy Index your code
hub / github.com/angular/components / with

Method with

src/material/chips/testing/chip-grid-harness.ts:31–42  ·  view source on GitHub ↗

* 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 = {},
  )

Source from the content-addressed store, hash-verified

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> {

Callers 2

getRowsMethod · 0.45
getInputMethod · 0.45

Calls 2

addOptionMethod · 0.80
isDisabledMethod · 0.45

Tested by

no test coverage detected