MCPcopy Create free account
hub / github.com/angular/components / locatorFor

Function locatorFor

src/cdk/testing/component-harness.ts:371–375  ·  view source on GitHub ↗

* Creates an asynchronous locator function that can be used to find a `ComponentHarness` instance * or element under the host element of this `ComponentHarness`. * * For example, given the following DOM and assuming `DivHarness.hostSelector` is `'div'` * * ```html * </

(
    ...queries: T
  )

Source from the content-addressed store, hash-verified

369 * each query.
370 */
371 protected locatorFor<T extends (HarnessQuery<any> | string)[]>(
372 ...queries: T
373 ): () => Promise<LocatorFnResult<T>> {
374 return this.locatorFactory.locatorFor(...queries);
375 }
376
377 /**
378 * Creates an asynchronous locator function that can be used to find a `ComponentHarness` instance

Callers

nothing calls this directly

Calls 1

locatorForMethod · 0.80

Tested by

no test coverage detected