fix(k1): harden BLE discovery and bridge recovery
This commit is contained in:
@@ -162,6 +162,30 @@ test("XGRIDS frontend is physically plugin-owned and split by operator pipeline"
|
||||
assert.match(spatialControls, /Повторить остановку/);
|
||||
});
|
||||
|
||||
test("K1 Bridge adoption remains one explicit read-only plugin action", () => {
|
||||
const provisioning = readFileSync(
|
||||
join(pluginFrontendRoot, "components/K1ProvisioningPipeline.tsx"),
|
||||
"utf8",
|
||||
);
|
||||
const selectionEffectStart = provisioning.indexOf("useEffect(() => {");
|
||||
const selectionEffectEnd = provisioning.indexOf(
|
||||
"useEffect(() => {",
|
||||
selectionEffectStart + 1,
|
||||
);
|
||||
const selectionEffect = provisioning.slice(selectionEffectStart, selectionEffectEnd);
|
||||
assert.match(provisioning, /connectionMode === "bridge"/);
|
||||
assert.match(provisioning, /Подхватить существующее подключение/);
|
||||
assert.match(provisioning, /pendingAction === "verify"/);
|
||||
assert.match(
|
||||
provisioning,
|
||||
/compatibility_attestation: profileSelectionForConnectionMode\("bridge"\)/,
|
||||
);
|
||||
assert.match(provisioning, /без изменения настроек Wi‑Fi/);
|
||||
assert.match(provisioning, /deviceSummary !== undefined/);
|
||||
assert.match(selectionEffect, /!state\.devices\.some/);
|
||||
assert.match(selectionEffect, /setSelectedDeviceId\(""\)/);
|
||||
});
|
||||
|
||||
test("generic Control Station has one composition import and no K1 implementation knowledge", () => {
|
||||
const compositionPath = join(coreSourceRoot, "composition/devicePlugins.ts");
|
||||
const composition = readFileSync(compositionPath, "utf8");
|
||||
|
||||
Reference in New Issue
Block a user