test(cockpit): the real vessel layer keeps the ridden ship on a water click

The bridge tests drive a hand-written layer, so nothing exercised the
vessel layer's own scene-click gate. A wire test now clicks open water with
the bridge holding the ship, then again after release.

The Contacts test that adopts Live AIS Vessels directly is renamed to say
so: it never rides a bridge.
This commit is contained in:
Sameh Khamis committed 2026-11-08 14:09:17 -08:00
1 parent 9abc105266
commit 0ba7ba6512
2 files changed
+17 -1

No files matched your search

+16
View File
@@ -989,6 +989,22 @@ test('vessel interaction wire: trail pick does not deselect', () => {
}
});
test('vessel interaction wire: a click on open water keeps the ship the bridge rides', () => {
const harness = installWireHarness({ id: 'gev-trailing-contact' });
try {
aisLiveVesselsLayer.setCockpitSubject(harness.record.mmsi);
harness.handler.click({ position: { x: 10, y: 20 } });
assert.equal(aisLiveVesselsLayer.getSelectedInfo()?.mmsi, harness.record.mmsi);
assert.equal(harness.trail.clearCalls, 0);
// Released, the same click deselects as it always has.
aisLiveVesselsLayer.setCockpitSubject(null);
harness.handler.click({ position: { x: 10, y: 20 } });
assert.equal(aisLiveVesselsLayer.getSelectedInfo(), null);
} finally {
harness.cleanup();
}
});
test('vessel interaction wire: only the gev-trail: namespace receives the trail no-op', () => {
const harness = installWireHarness({ id: 'gev-trailing-contact' });
try {
+1 -1
View File
@@ -462,7 +462,7 @@ test('a ride handed to an aircraft on a layer Contacts turned on keeps that laye
assert.deepEqual(on(manager), ['flights', 'military']);
});
test('a bridge ride keeps Live AIS Vessels when Contacts had turned it on', async (t) => {
test('Live AIS Vessels, once adopted as the ridden layer, outlives Contacts', async (t) => {
const live = await liveFixture(t, {
tracked: { layerId: 'flights', info: CIVIL },
});