Fix Linux route probe contract and expose K1 verification after Wi-Fi apply

This commit is contained in:
DCCONSTRUCTIONS
2026-09-07 13:46:01 +03:00
parent 06d216ac4a
commit e6521e855a
9 changed files with 135 additions and 11 deletions
@@ -88,6 +88,17 @@ test('Bluetooth failure before dispatch asks for discovery without blaming Wi-Fi
assert.equal(api.enrollmentBluetoothFailure(unknown),false);
assert.doesNotMatch(api.enrollmentNotice(unknown),/не были отправлены/);
});
test('applied and restored network states admit read-only verification without credentials',async()=>{
const f=fixture();
const applied={...initial,allowed_actions:['observe-configured-device-network'],connection_attempt:{schema_version:'missioncore.xgrids-k1-connection-attempt/v1',attempt_id:'previous',status:'failed',stage:'control-bootstrap-failed',phase:'network_applied',side_effect_status:'applied',public_error_code:'TypeError'}};
assert.equal(api.enrollmentAllowed(applied,'verify'),true);
assert.match(api.enrollmentNotice(applied),/Проверить состояние K1/);
assert.equal(api.enrollmentAllowed({...applied,connection_attempt:null},'verify'),true);
await api.enroll(f.transport,applied,'verify',{device_id:'synthetic-ble'},f.observer);
assert.equal(f.request().action,'verify');
assert.deepEqual(f.request().parameters,{device_id:'synthetic-ble'});
assert.equal(f.counts().posts,1);
});
test('new workflow content scrolls only the containing viewport without stealing focus',()=>{
const original={document:globalThis.document,window:globalThis.window,getComputedStyle:globalThis.getComputedStyle};
const calls=[];let reduced=false;