mapActionType function

Last updated: 2026-03-05T10:53:28.863Z

Metrics

LOC: 23 Complexity: 2 Params: 2

Signature

mapActionType( recordedType: RecordedStep["type"], ): : FlowActionType | null

Summary

Map recorded step type → FlowActionType (drop unsupported)

Source Code

function mapActionType(
  recordedType: RecordedStep["type"],
): FlowActionType | null {
  const map: Record<string, FlowActionType> = {
    navigate: "navigate",
    fill: "fill",
    click: "click",
    select: "select",
    check: "check",
    uncheck: "uncheck",
    clear: "clear",
    "press-key": "press-key",
    scroll: "scroll",
    assert: "assert",
    submit: "click",
    hover: "click",
    "wait-for-element": "wait",
    "wait-for-hidden": "wait",
    "wait-for-url": "wait",
    "wait-for-network-idle": "wait",
  };
  return map[recordedType] ?? null;
}

No outgoing dependencies.

Impact (Incoming)

graph LR mapActionType["mapActionType"] convertSteps["convertSteps"] convertSteps -->|calls| mapActionType style mapActionType fill:#dbeafe,stroke:#2563eb,stroke-width:2px click mapActionType "13e0c919e8b27254.html" click convertSteps "9420198414a645f6.html"
SourceType
convertSteps calls