Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...

    Function waitForSpatialQuery

    • Wait for spatial index query to complete.

      Silent only on the tolerated case. The give-up is now split in two (#1726):

      • A probe ANSWERED but the query never settled within timeout — the case the old "timeout not an error" comment was really about: returns normally, after one console.warn saying the condition was never observed.
      • Every probe FAILED, so none ever answered — the helper read no viewer state at all and the caller's next assertions would read state nothing has confirmed. It THROWS, with the last probe failure carried into the message. Reachable today through a rejecting probe: no __luxarDebug, or a destroyed execution context.

      A NON-POSITIVE timeout never enters the loop, so it probes zero times and the report says so.

      See waitForNavigationComplete for what the split buys, and waitForPointsLoaded for why the probes are not clamped to this loop's budget — which is why both reports state the measured elapsed time and the probe counts next to the nominal budget (see composeGiveUpReports above — a plain code reference, not an @link, because it is module-private and TypeDoc warns on a link it resolves but cannot document).

      Use when the query completing fast is a bonus, not a precondition. For tests that genuinely depend on the query having finished, use waitForSpatialQueryOrThrow instead.

      Unit-tested in src/tests/unit/tests/e2e-helpers-silent-waits.test.ts.

      Parameters

      • page: Page
      • timeout: number = 8000

      Returns Promise<void>