findAntLabel function infrastructure exported ✓ 100.0%

Last updated: 2026-03-04T23:21:38.390Z

Metrics

LOC: 14 Complexity: 3 Params: 1 Coverage: 100.0% (7/7 lines, 61x executed)

Signature

findAntLabel(wrapper: HTMLElement): : string | undefined

Summary

Extracts the label text from the nearest .ant-form-item wrapper. Falls back to the standard label extractor.

Source Code

export function findAntLabel(wrapper: HTMLElement): string | undefined {
  const formItem = wrapper.closest(".ant-form-item");
  if (formItem) {
    const labelEl = formItem.querySelector<HTMLElement>(
      ".ant-form-item-label label",
    );
    if (labelEl?.textContent?.trim()) {
      return labelEl.textContent.trim();
    }
  }
  // Fallback to standard label extraction
  const result = findLabelWithStrategy(wrapper);
  return result?.text;
}

Dependencies (Outgoing)

graph LR findAntLabel["findAntLabel"] getUniqueSelector["getUniqueSelector"] findLabelWithStrategy["findLabelWithStrategy"] findAntLabel -->|uses| getUniqueSelector findAntLabel -->|uses| findLabelWithStrategy style findAntLabel fill:#dbeafe,stroke:#2563eb,stroke-width:2px click findAntLabel "4446526a4a01afd7.html" click getUniqueSelector "7276f3807435c3b4.html" click findLabelWithStrategy "8f614323e886c07b.html"

Impact (Incoming)

graph LR findAntLabel["findAntLabel"] matches["matches"] buildField["buildField"] matches -->|uses| findAntLabel buildField -->|calls| findAntLabel matches -->|uses| findAntLabel buildField -->|calls| findAntLabel matches -->|uses| findAntLabel buildField -->|calls| findAntLabel matches -->|uses| findAntLabel buildField -->|calls| findAntLabel matches -->|uses| findAntLabel buildField -->|calls| findAntLabel matches -->|uses| findAntLabel buildField -->|calls| findAntLabel matches -->|uses| findAntLabel buildField -->|calls| findAntLabel matches -->|uses| findAntLabel buildField -->|calls| findAntLabel matches -->|uses| findAntLabel buildField -->|calls| findAntLabel matches -->|uses| findAntLabel buildField -->|calls| findAntLabel matches -->|uses| findAntLabel buildField -->|calls| findAntLabel matches -->|uses| findAntLabel buildField -->|calls| findAntLabel style findAntLabel fill:#dbeafe,stroke:#2563eb,stroke-width:2px click findAntLabel "4446526a4a01afd7.html" click matches "697a9d97bb027c9d.html" click buildField "04978f0607436868.html"
SourceType
matches uses
buildField calls
matches uses
buildField calls
matches uses
buildField calls
matches uses
buildField calls
matches uses
buildField calls
matches uses
buildField calls
matches uses
buildField calls
matches uses
buildField calls
matches uses
buildField calls
matches uses
buildField calls
matches uses
buildField calls
matches uses
buildField calls