feat: finalize corrected-route planning and Rerun recording review
This commit is contained in:
@@ -150,14 +150,15 @@ test("follow toggles retain the current recorded camera journal", () => {
|
||||
assert.notEqual(afterReset, before);
|
||||
});
|
||||
|
||||
test("observation camera windows tile from the bottom-right above the live timeline", () => {
|
||||
test("observation camera windows tile from the bottom-left above the live timeline", () => {
|
||||
const bounds = { width: 1280, height: 720 };
|
||||
const left = initialObservationWindowRect(0, 2, bounds);
|
||||
const right = initialObservationWindowRect(1, 2, bounds);
|
||||
|
||||
assert.equal(left.y, right.y);
|
||||
assert.ok(left.x + left.width < right.x);
|
||||
assert.equal(right.x + right.width, bounds.width - 18);
|
||||
assert.equal(left.x, 18);
|
||||
assert.ok(right.x + right.width <= bounds.width - 18);
|
||||
assert.ok(right.y + right.height <= bounds.height - 64);
|
||||
});
|
||||
|
||||
@@ -323,10 +324,14 @@ test("recorded observation timeline rejects empty and non-finite ranges", () =>
|
||||
test("accumulation control normalizes UI values and distinguishes a single frame", () => {
|
||||
assert.equal(normalizeAccumulationSeconds(-3), 0);
|
||||
assert.equal(normalizeAccumulationSeconds(12.6), 13);
|
||||
assert.equal(normalizeAccumulationSeconds(999), 120);
|
||||
assert.equal(normalizeAccumulationSeconds(999), 999);
|
||||
assert.equal(normalizeAccumulationSeconds(1800), 1800);
|
||||
assert.equal(normalizeAccumulationSeconds(9999), 9999);
|
||||
assert.equal(normalizeAccumulationSeconds(Number.NaN), 0);
|
||||
assert.equal(formatAccumulationDuration(0), "Кадр");
|
||||
assert.equal(formatAccumulationDuration(12), "12 с");
|
||||
assert.equal(formatAccumulationDuration(1800), "30 мин");
|
||||
assert.equal(formatAccumulationDuration(125), "2 мин 5 с");
|
||||
});
|
||||
|
||||
test("spatial timeline renders synchronized accumulation and playback controls", () => {
|
||||
@@ -606,6 +611,32 @@ test("recorded blueprint fetch is bounded, strict and sends only display setting
|
||||
);
|
||||
});
|
||||
|
||||
test("recorded tracking quantizes the native fractional-nanosecond cursor without accepting invalid times", async () => {
|
||||
const bodies = [];
|
||||
const request = currentTimeNs => fetchRecordedBlueprintRrd(
|
||||
"/api/v1/observation-sessions/session-1/blueprint.rrd",
|
||||
{accumulationSeconds: 10, showGrid: true, showPoints: true,
|
||||
showTrajectory: true, pointSize: 0.5, colorMode: "intensity",
|
||||
palette: "turbo", customColor: "#ffffff"},
|
||||
{applicationId: "nodedc_mission_core_recorded", recordingId: "recording-001"},
|
||||
{origin: "http://127.0.0.1:8000", blueprintSessionId: "a".repeat(32),
|
||||
cameraEye: {position: [3, 4, 5], lookTarget: [1, 2, 0], eyeUp: [0, 0, 1]},
|
||||
eyeRelativeToTracking: true, currentTimeNs,
|
||||
fetcher: async (_input, init) => {
|
||||
bodies.push(JSON.parse(init.body));
|
||||
return new Response(new Uint8Array([0x52, 0x52, 0x46, 0x32]), {
|
||||
headers: {"Content-Type": "application/vnd.rerun.rrd"},
|
||||
});
|
||||
}},
|
||||
);
|
||||
await request(536_460_021_972.65625);
|
||||
assert.equal(bodies[0].current_time_ns, 536_460_021_973);
|
||||
for (const invalid of [-0.1, NaN, Infinity, Number.MAX_SAFE_INTEGER + 1]) {
|
||||
await assert.rejects(request(invalid), /Unsafe recorded blueprint request/);
|
||||
}
|
||||
assert.equal(bodies.length, 1);
|
||||
});
|
||||
|
||||
test("recorded point colors use one strict same-origin component overlay", async () => {
|
||||
const endpoint = resolveRecordedPointColorsUrl(
|
||||
"/api/v1/observation-sessions/session-1/recording.rrd",
|
||||
|
||||
Reference in New Issue
Block a user