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

Function getVisibleTreeItems

src/aria/combobox/combobox.spec.ts:717–729  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

715 }
716
717 function getVisibleTreeItems(): HTMLElement[] {
718 return fixture.debugElement
719 .queryAll(By.directive(TreeItem))
720 .map((debugEl: DebugElement) => debugEl.nativeElement as HTMLElement)
721 .filter(el => {
722 if (el.parentElement?.role === 'group') {
723 return (
724 el.parentElement.previousElementSibling?.getAttribute('aria-expanded') === 'true'
725 );
726 }
727 return true;
728 });
729 }
730
731 afterEach(async () => {
732 await runAccessibilityChecks(fixture.nativeElement);

Callers 1

combobox.spec.tsFile · 0.85

Calls 2

getAttributeMethod · 0.65
filterMethod · 0.45

Tested by

no test coverage detected