buildStep function presentation ✓ 88.9%

Last updated: 2026-03-05T11:49:57.418Z

Metrics

LOC: 19 Complexity: 3 Params: 4 Coverage: 88.9% (8/9 lines, 0x executed)

Signature

buildStep( type: RecordedStepType, el: Element | null, extra: Partial<RecordedStep> = {}, ): : RecordedStep

Source Code

function buildStep(
  type: RecordedStepType,
  el: Element | null,
  extra: Partial<RecordedStep> = {},
): RecordedStep {
  const step: RecordedStep = {
    type,
    timestamp: now(),
    ...extra,
  };

  if (el) {
    step.selector = buildQuickSelector(el);
    step.smartSelectors = safeExtractSelectors(el);
    step.label = extra.label ?? resolveLabel(el);
  }

  return step;
}

Dependencies (Outgoing)

graph LR buildStep["buildStep"] now["now"] buildQuickSelector["buildQuickSelector"] safeExtractSelectors["safeExtractSelectors"] resolveLabel["resolveLabel"] buildStep -->|calls| now buildStep -->|calls| buildQuickSelector buildStep -->|calls| safeExtractSelectors buildStep -->|calls| resolveLabel style buildStep fill:#dbeafe,stroke:#2563eb,stroke-width:2px click buildStep "6d1088fe63d8f4bc.html" click now "b0f01bcc017e0081.html" click buildQuickSelector "077a2e134af1a6be.html" click safeExtractSelectors "e81dd9e32ca3b96e.html" click resolveLabel "12990407e73ce2fe.html"
TargetType
now calls
buildQuickSelector calls
safeExtractSelectors calls
resolveLabel calls

Impact (Incoming)

graph LR buildStep["buildStep"] onInput["onInput"] onChange["onChange"] onClick["onClick"] captureUnrecordedFormFields["captureUnrecordedFormFields"] onSubmit["onSubmit"] onKeyDown["onKeyDown"] processMutations["processMutations"] onInput -->|calls| buildStep onChange -->|calls| buildStep onClick -->|calls| buildStep captureUnrecordedFormFields -->|calls| buildStep onSubmit -->|calls| buildStep onKeyDown -->|calls| buildStep processMutations -->|calls| buildStep style buildStep fill:#dbeafe,stroke:#2563eb,stroke-width:2px click buildStep "6d1088fe63d8f4bc.html" click onInput "578e68a59cf9ed07.html" click onChange "63739279f8aaa1aa.html" click onClick "d103b771aa1affc5.html" click captureUnrecordedFormFields "5a9cd35f60b34b67.html" click onSubmit "8be45aca6a1f4353.html" click onKeyDown "73ba995fd6e6330e.html" click processMutations "1402c8dfccd81bea.html"
SourceType
onInput calls
onChange calls
onClick calls
captureUnrecordedFormFields calls
onSubmit calls
onKeyDown calls
processMutations calls