Open the cockpit on a tracked Navara aircraft

This commit is contained in:
German Khokhlov committed 2026-11-02 22:04:23 +04:00
1 parent 8b179a7e01
commit 2087b55b47
19 files changed
+142 -65

No files matched your search

+18 -1
View File
@@ -94,7 +94,6 @@ test('the viewer-only actions are one exported list of real tools', () => {
'clear_annotations',
'fly_route',
'move_camera',
'control_cockpit',
'set_context_mode',
'control_radio',
'control_cctv',
@@ -105,6 +104,24 @@ test('the viewer-only actions are one exported list of real tools', () => {
assert.ok(tools.has(name), `${name} is a voice tool`);
});
test('Navara enters cockpit on the tracked aircraft without starting Contacts', async () => {
const engine = engineOverAustin({ kind: 'navara' });
const runner = runnerOn(engine, {
styleManager: {
getAircraftTrackingTarget: () => ({ layerId: 'flights', id: '507c84' }),
setContextMode: () => assert.fail('the selected flight already owns the camera'),
controlCockpit: (action, { rollbackTarget }) => {
assert.equal(action, 'enter');
assert.equal(rollbackTarget.id, '507c84');
return { ok: true, state: { active: true } };
},
},
});
const result = await runner('control_cockpit', { action: 'enter' });
assert.equal(result.ok, true);
assert.equal(result.state.active, true);
});
test('without a viewer the viewer-only actions refuse with a structured result', async () => {
const engine = engineOverAustin({ kind: 'navara' });
const touched = [];