The test page as live probe

test/index.html is a framework-free page that loads the built library and renders a transcript of a fixed scenario suite: environment, client version, raw payload, observed value, expectation, and PASS/FAIL per scenario. It is the same page in the simulators and in a real client — the hosts differ only in how they embed it. That makes it a live probe: register the URL in a real enaio installation and compare the live transcript with the simulator transcript.

1. 1. Build and serve

npm run build

Then serve test/ (and the built dist/ the page loads from dist/esm/index.js) from any origin the enaio server can load — for example a plain HTTP server on your network:

# any static server works; the e2e suite uses ports 4599 (simulator)
# and 4600 (foreign origin) via `npm run test:e2e`
npx http-server -p 8080 --cors .

The page’s query parameters (read from location.search):

Parameter Effect

origin

Expected webclient origin (e.g. origin=https://enaio.example.com — scheme + host + port). Omit to probe the learning path. "*" is refused by the page itself. Ignored in the rich client.

mode

webclient / richclient / standalone — asserts which host/fixture you are probing (default: auto-detect)

selection

Fixture selection: normal / typeless / empty

detectionTimeoutMs, timeoutMs

Override the detection cap and the response timeout (defaults 5000/5000)

2. 2. Register the probe

Webclient: register the dashlet with the URI http://<your-host>:<port>/test/index.html?origin=https://enaio.example.com where origin is the exact enaio webclient origin. Omit the origin parameter to probe the learning path (the page learns the webclient origin from the first onInit — see Origin configuration).

Rich client: register the same URL (the origin parameter is ignored in the rich client); the bridge is injected by the host, and the page self-initializes from it.

3. 3. Read the transcript

Select a document (or change the selection) and watch the transcript:

  • detected environment (webclient / richClient / standalone);

  • client version and language;

  • the raw payload of every event and call, next to the observed value, the expectation, and the PASS/FAIL marker;

  • the typeless marker for tray documents (rich raw 13107200 / 19660800 and webclient "-1" all normalize to objectTypeId: -1).

The same scenario set runs in all four hosts (webclient, rich client, standalone, desktop-app), so a PASS in the simulator and a FAIL in the live host — or a different raw payload — is directly visible on one screen. That is the discrepancy workflow: same page, same scenarios, different host; diff the transcripts and you have the simulator-vs-real difference isolated.

4. Where to go next