Augeo AI Docs
SDKsSearch SDK

Validation

Validate presentation timing, measurement, and live versus controlled evidence.

A standalone host can validate the published browser bundle before a full application integration. Use fixture tests for deterministic UI checks and authenticated API tests for live data and persistence.

Prerequisites

  • Mount the widget with Quick start.
  • Record the loaded bundle version and configured API environment without recording member credentials.
  • Prepare a test member with catalog access and at least one identified recent search.
  • Provide test product routes and a chat assistant for callback acceptance.

Standalone host checks

Run panel mode first, then recreate the widget with onSearchSubmit for host mode. Use browser request inspection and host callback counters to distinguish the two modes.

CheckExpected result
Click or focus the fieldOne open request; the panel opens after the host applies state
Open with a blank queryRecents and recommendations load from the pre-search endpoint
Type, then replace the query quicklySuggestions appear after the pause; stale results never replace the latest query
Submit in panel modeCatalog request, visible products, and one schema-valid event after commit
Submit a successful zero-result queryEmpty state, count 0, and outcome empty
Submit in host modeOne callback and closure. One event only after that host calls presented
Select a recommended or catalog productOne typed product callback and closure
Select a THEO prompt or Ask AIOne seed callback and launcher activation; chat opens once when wired
Clear the inputPre-search returns without deleting persisted recents
Remove an identified recentDismissal request and refresh; the item remains absent after reload
Resize 768 → 767 → 768 pixelsOverlay → sheet → overlay with automatic presentation
Force either presentationResizing keeps the explicitly chosen presentation
Destroy during an outstanding requestNo stale UI or completion callback after destruction

Authentication and failure checks

CaseExpected result
Blank tokenLocal auth failure; no API request
Invalid tokenAt most one 401 retry with a newly read token; one auth error notification
Repeated failuresNo repeated auth notification until a request succeeds
Restore a valid session and retryThe failed section recovers
One pre-search section unavailableThat section shows recovery while the other remains usable
Catalog unavailableFailure state with recovery, rather than a successful empty result
Dismissal write failsRecents recovery; retry does not submit a query or open chat
Inspect emitted eventsNo bearer or raw query. Performed keyword is sanitized and at most 200

Search measurement

Count an event only after the matching products or empty state are visible. Fetch completion, router completion, and loading placeholders are not enough. Retained cards from the previous query are not the new result. Validate each envelope with the locked official events package. See Concrete outcomes.

CheckExpected result
Typed submit with productsOne schema-valid event after the page commits
535 matches, 15 shownresultCount 15, not 535; outcome success
Suggestion selectionKeyword is the selected term, not the prefix
Committed empty stateCount 0 and outcome empty
Failed requestError or retry UI, and no performed event
Recoverable retry commitsOne event on the same execution
Cancel, then submit againOld handle inert; new execution may emit
Repeat the same queryDistinct execution; a second event is allowed
Supersede with another queryOld navigation, fetch, and commit are ignored
Close panel during host loadMeasurement remains eligible
Leave the results routeCaptured execution is cancelled
Duplicate commit or page 2No extra performed event
201-character queryEvent keyword is canonical and at most 200
Fully redacted queryNo performed event; the raw query is unchanged
Invalid page or countTypeError; a corrected report can still emit

In-memory handles require the shell and SDK to survive navigation. A full document load cannot keep the handle. Do not accept a host that unloads the SDK unless a transfer is implemented and evidenced.

Evidence labels

Label every additional run authenticated-live or controlled. Live means the deployed host and published bundle, with a real member session. Controlled means fixtures, a local bundle, or an injected catalog. A controlled pass does not prove staging delivery. Record source revision, loaded bundle identity, route, execution id, displayed count, event count, and schema result. Record empty, repeat, cancellation, retry, and long or redacted cases with that label. Do not record member credentials. The sanitized keyword may be recorded as the analytics field. The raw query and bearer must not.

A member with no recents can validate the empty state but cannot prove persisted dismissal. Use a seeded member and reload against the same live service to prove persistence. Fixture products and mock callbacks do not prove live catalog access, host routing, or chat integration.

Contributor harness

SDK contributors can run the bundled harness from a source checkout with Bun 1.4 installed. It builds the production IIFE before serving the host page.

cd packages/search-sdk
cp harness/.env.example harness/.env.local
npm run harness

Open http://127.0.0.1:5179. Restart the harness after source changes so it rebuilds the browser bundle. Default mode uses in-process API fixtures and a mock bearer; it does not call a deployed API.

Harness query switchTest behavior
presentation=auto, overlay, or sheetResponsive default or a forced presentation
results=panel or results=hostPanel results, or a host callback that is not itself presentation
askAi=offLauncher event and closure without a seed callback
token=Blank-token failure without a network request
scenario=emptySuccessful zero-row fixture responses
scenario=catalog-unavailableCatalog-only fixture failure
scenario=typeahead-unavailableTypeahead-only fixture failure

Use the standalone host from Quick start for authenticated live testing. Supply its member bearer through auth.getToken and your host session accessor. Keep real member credentials out of query strings, saved URLs, and diagnostics. The scenario switches affect fixtures only; they are not Search SDK or live API options. The harness is controlled evidence. It does not prove a deployed host.

Browser automation exercises the same built IIFE in desktop Chromium, mobile Chromium, and mobile Safari. From the Search SDK package folder:

npm run test
npm run test:e2e

Install the required browsers before the first automated run:

npm exec playwright install chromium webkit

Acceptance evidence

Record version, environment, results ownership mode, viewport, callback counts, and pass/fail outcomes. Label that record live or controlled, as defined above. Capture sanitized request paths and screenshots for visual failures. Validate live product data, recent dismissal persistence, and chat handoff separately from fixture coverage. Complete the host route checks before handing integration responsibility to another team.