extractValue method infrastructure ✓ 100.0%
Last updated: 2026-03-04T23:21:38.386Z
Metrics
LOC: 19
Complexity: 4
Params: 1
Coverage: 100.0% (6/6 lines, 0x executed)
Signature
extractValue(wrapper: HTMLElement): : string | null
Source Code
extractValue(wrapper: HTMLElement): string | null {
// prefer displayed selection(s)
const items = wrapper.querySelectorAll<HTMLElement>(
".ant-select-selection-item, .ant-select-selection-item-content",
);
if (items.length > 0) {
return Array.from(items)
.map((i) => i.textContent?.trim() ?? "")
.filter((t) => t)
.join(",");
}
// fall back to combobox input value
const input = wrapper.querySelector<HTMLInputElement>(
"input[role='combobox'], .ant-select-selection-search-input, .ant-select-input",
);
if (input) return input.value;
return null;
},
No outgoing dependencies.
No incoming dependencies.