fix(viewer): gate recorded perception readiness
This commit is contained in:
@@ -375,11 +375,15 @@ test("recorded perception fetch admits one complete same-origin RRD or no layer"
|
||||
"http://127.0.0.1:5174/api/v1/observation-sessions/session-1/perception.rrd",
|
||||
);
|
||||
const payload = Uint8Array.from([0x52, 0x52, 0x46, 0x32, 0x01]);
|
||||
const progress = [];
|
||||
const result = await fetchRecordedPerceptionRrd(
|
||||
endpoint,
|
||||
{ applicationId: "nodedc_mission_core_recorded", recordingId: "recording-001" },
|
||||
{
|
||||
origin: "http://127.0.0.1:5174",
|
||||
onProgress: (receivedBytes, totalBytes) => {
|
||||
progress.push([receivedBytes, totalBytes]);
|
||||
},
|
||||
fetcher: async (_input, init) => {
|
||||
assert.deepEqual(JSON.parse(String(init.body)), {
|
||||
application_id: "nodedc_mission_core_recorded",
|
||||
@@ -396,6 +400,8 @@ test("recorded perception fetch admits one complete same-origin RRD or no layer"
|
||||
},
|
||||
);
|
||||
assert.deepEqual([...result], [...payload]);
|
||||
assert.deepEqual(progress[0], [0, payload.byteLength]);
|
||||
assert.deepEqual(progress.at(-1), [payload.byteLength, payload.byteLength]);
|
||||
|
||||
const absent = await fetchRecordedPerceptionRrd(
|
||||
endpoint,
|
||||
|
||||
Reference in New Issue
Block a user