executeNavigateStep function test

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

Metrics

LOC: 14 Complexity: 3 Params: 1

Signature

executeNavigateStep(step: FlowStep): : Promise<StepResult>

Source Code

  async function executeNavigateStep(step: FlowStep): Promise<StepResult> {
    if (!step.url) {
      return { status: "failed", error: "Navigate step missing url" };
    }

    const loaded = await navigateAndWait(tabId, step.url);
    if (!loaded) {
      return { status: "failed", error: `Navigation to ${step.url} timed out` };
    }

    // Re-inject content script after navigation
    await injectContentScript(tabId);
    return { status: "success" };
  }

Dependencies (Outgoing)

graph LR executeNavigateStep["executeNavigateStep"] navigateAndWait["navigateAndWait"] injectContentScript["injectContentScript"] executeNavigateStep -->|calls| navigateAndWait executeNavigateStep -->|calls| injectContentScript style executeNavigateStep fill:#dbeafe,stroke:#2563eb,stroke-width:2px click executeNavigateStep "b662d9614e361217.html" click navigateAndWait "915565f33bfb5777.html" click injectContentScript "8371aca98c2d1d41.html"
TargetType
navigateAndWait calls
injectContentScript calls

Impact (Incoming)

graph LR executeNavigateStep["executeNavigateStep"] runLoop["runLoop"] runLoop -->|calls| executeNavigateStep style executeNavigateStep fill:#dbeafe,stroke:#2563eb,stroke-width:2px click executeNavigateStep "b662d9614e361217.html" click runLoop "c94a70bb97b4ccad.html"
SourceType
runLoop calls