fill method infrastructure ✓ 100.0%

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

Metrics

LOC: 24 Complexity: 3 Params: 2 Coverage: 100.0% (10/10 lines, 0x executed)

Signature

fill(wrapper: HTMLElement, _value: string): : Promise<boolean>

Source Code

  async fill(wrapper: HTMLElement, _value: string): Promise<boolean> {
    // Open the cascader dropdown
    const selector = wrapper.querySelector<HTMLElement>(".ant-select-selector");
    if (!selector) {
      log.warn(
        `Seletor .ant-select-selector não encontrado em: ${getUniqueSelector(wrapper)}`,
      );
      return false;
    }

    simulateClick(selector);

    // Wait for dropdown to appear
    const dropdown = await waitForElement(".ant-cascader-dropdown", 500);
    if (!dropdown) {
      log.warn(
        `Dropdown .ant-cascader-dropdown não apareceu (timeout 500ms) para: ${getUniqueSelector(wrapper)}`,
      );
      return false;
    }

    // Navigate through cascader levels
    return selectCascaderLevels(dropdown);
  },

Dependencies (Outgoing)

graph LR fill["fill"] simulateClick["simulateClick"] waitForElement["waitForElement"] selectCascaderLevels["selectCascaderLevels"] fill -->|calls| simulateClick fill -->|calls| waitForElement fill -->|calls| selectCascaderLevels style fill fill:#dbeafe,stroke:#2563eb,stroke-width:2px click fill "7a85157abe4e6b0a.html" click simulateClick "7c6c21320aaee4c4.html" click waitForElement "230bbf0882ca7c81.html" click selectCascaderLevels "73af9106411d222c.html"
TargetType
simulateClick calls
waitForElement calls
selectCascaderLevels calls

No incoming dependencies.