MCPcopy
hub / github.com/angular/angular / panelByText

Function panelByText

packages/core/test/acceptance/animation_spec.ts:2679–2682  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

2677
2678 const panels = () => Array.from(fixture.nativeElement.querySelectorAll('.panel'));
2679 const panelByText = (text: string) =>
2680 panels().find((el) => (el as HTMLElement).textContent?.includes(text)) as
2681 | HTMLElement
2682 | undefined;
2683
2684 expect(panels().length).toBe(1);
2685 expect(panelByText('Panel A')).toBeTruthy();

Callers 1

animation_spec.tsFile · 0.85

Calls 2

panelsFunction · 0.85
findMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…