feat: add managed database capture and operator restore
PostgreSQL and MySQL backups run through paired outposts, with operator sign-in, off-site copies, and legacy import. Retention stays on each orbit, so the unused retention console is removed. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import assert from "node:assert/strict";
|
||||
import test from "node:test";
|
||||
import { assignOrbitSlots, orbitPose, groupSnapshots, moonPoses } from "../src/lib/galaxyLayout.ts";
|
||||
import { capturePhases, assignOrbitSlots, orbitPose, groupSnapshots, moonPoses } from "../src/lib/galaxyLayout.ts";
|
||||
import { placeLabels } from "../src/lib/galaxyLabelLayout.ts";
|
||||
|
||||
test("slot identities survive reordering, insertion and removal", () => {
|
||||
@@ -62,3 +62,25 @@ test("labels respect screen bounds and preserve priority in a crowded scene", ()
|
||||
assert.deepEqual(labels.map((l) => l.id), ["focused"]);
|
||||
assert.ok(labels[0].x >= 0 && labels[0].x + 72 <= 140);
|
||||
});
|
||||
|
||||
test("capture flares before flight, then absorbs and highlights the snapshot", () => {
|
||||
const flare = capturePhases(0.06);
|
||||
assert.equal(flare.flare, 1);
|
||||
assert.equal(flare.flight, 0);
|
||||
assert.equal(flare.highlight, 0);
|
||||
const arrival = capturePhases(0.84);
|
||||
assert.equal(arrival.flight, 1);
|
||||
assert.equal(arrival.absorption, 1);
|
||||
assert.equal(arrival.highlight, 0);
|
||||
assert.equal(capturePhases(0.94).absorption, 0);
|
||||
assert.equal(capturePhases(0.94).highlight, 0);
|
||||
assert.equal(capturePhases(0.97).highlight, 1);
|
||||
assert.deepEqual(capturePhases(1), { flare: 0, flight: 1, absorption: 0, highlight: 0, failure: 0 });
|
||||
});
|
||||
|
||||
test("the selected label searches farther when nearby orbit markers crowd it out", () => {
|
||||
const selected = { id: "focused", x: 140, y: 140, width: 60 };
|
||||
const cluster = { x: 61, y: 61, width: 158, height: 158 };
|
||||
assert.deepEqual(placeLabels([selected], 300, 300, [cluster]), []);
|
||||
assert.equal(placeLabels([selected], 300, 300, [cluster], selected.id)[0]?.id, selected.id);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user