HarnessLoader
Interface used to load ComponentHarness objects. This interface is used by test authors to
instantiate ComponentHarnesses.
getChildLoader
Promise<HarnessLoader>Searches for an element with the given selector under the current instances's root element,
and returns a HarnessLoader rooted at the matching element. If multiple elements match the
selector, the first is used. If no elements match, an error is thrown.
Promise<HarnessLoader>getAllChildLoaders
Promise<HarnessLoader[]>Searches for all elements with the given selector under the current instances's root element,
and returns an array of HarnessLoaders, one for each matching element, rooted at that
element.
Promise<HarnessLoader[]>getHarness
Promise<T>Searches for an instance of the component corresponding to the given harness type under the
HarnessLoader's root element, and returns a ComponentHarness for that instance. If multiple
matching components are found, a harness for the first one is returned. If no matching
component is found, an error is thrown.
Promise<T>getHarnessOrNull
Promise<T | null>Searches for an instance of the component corresponding to the given harness type under the
HarnessLoader's root element, and returns a ComponentHarness for that instance. If multiple
matching components are found, a harness for the first one is returned. If no matching
component is found, null is returned.
Promise<T | null>getAllHarnesses
Promise<T[]>Searches for all instances of the component corresponding to the given harness type under the
HarnessLoader's root element, and returns a list ComponentHarness for each instance.
Promise<T[]>hasHarness
Promise<boolean>Searches for an instance of the component corresponding to the given harness type under the
HarnessLoader's root element, and returns a boolean indicating if any were found.
Promise<boolean>