Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion frontend/e2e/nodes.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,8 @@ describeUnlessProd("Node registration — main integration suite", () => {
// would otherwise surface four times as an undefined property rather
// than once as the status that actually explains it.
expect(placedStatus).toBe(200);
expect(typeof placedBody).toBe("object");
expect(placedBody).not.toBeNull();
});

test("detection_area block is present with all expected geometry keys", () => {
Expand Down Expand Up @@ -629,12 +631,17 @@ describeUnlessProd("Node registration — main integration suite", () => {
expect((da.furthest_detections as unknown[]).length).toBe(0);
});

test("an unconfigured legacy node is given no detection_area", () => {
test("an unconfigured node is given no detection_area", () => {
// The other half of the pair above, and the reason this block reads two
// nodes. POST /api/radar/detections registers without coordinates, and
// canonical_config leaves them null rather than the (0, 0) it once
// coerced them to. No detection area is what keeps such a node off the
// map, so its absence here is the contract, not a gap in the payload.
//
// Gated on the status: an absence assertion passes against an error body
// too, so without this the test could go green on a failed request. The
// metrics/trust assertions below would also catch that, but this names it.
expect(analyticsStatus).toBe(200);
expect(analyticsBody).not.toHaveProperty("detection_area");
// Still counted and still described: only the footprint is withheld.
expect(analyticsBody.metrics).toBeDefined();
Expand Down
Loading