feat(plugins): isolate device integrations
This commit is contained in:
@@ -7,7 +7,7 @@ def test_mission_core_frontend_has_single_plugin_composition_root() -> None:
|
||||
repository_root = Path(__file__).resolve().parents[1]
|
||||
source_root = repository_root / "apps" / "control-station" / "src"
|
||||
composition = source_root / "composition" / "devicePlugins.ts"
|
||||
forbidden_import = "device-plugins/xgrids-k1"
|
||||
forbidden_import = "@xgrids-k1/frontend"
|
||||
|
||||
imports = [
|
||||
path.relative_to(source_root).as_posix()
|
||||
@@ -50,9 +50,7 @@ def test_mission_core_shell_does_not_know_xgrids_wire_fields() -> None:
|
||||
|
||||
def test_xgrids_client_uses_manifest_identity_and_plugin_scoped_events() -> None:
|
||||
repository_root = Path(__file__).resolve().parents[1]
|
||||
plugin_root = (
|
||||
repository_root / "apps" / "control-station" / "src" / "device-plugins" / "xgrids-k1"
|
||||
)
|
||||
plugin_root = repository_root / "plugins" / "xgrids-k1" / "frontend" / "src"
|
||||
api_source = (plugin_root / "api.ts").read_text("utf-8")
|
||||
manifest_source = (plugin_root / "manifest.ts").read_text("utf-8")
|
||||
|
||||
@@ -74,12 +72,11 @@ def test_backend_host_has_no_concrete_xgrids_imports() -> None:
|
||||
def test_model_switch_is_guarded_by_plugin_deactivation() -> None:
|
||||
repository_root = Path(__file__).resolve().parents[1]
|
||||
frontend_root = repository_root / "apps" / "control-station" / "src"
|
||||
plugin_root = repository_root / "plugins" / "xgrids-k1" / "frontend" / "src"
|
||||
host_source = (frontend_root / "core" / "device-plugins" / "DevicePluginHost.tsx").read_text(
|
||||
"utf-8"
|
||||
)
|
||||
xgrids_runtime = (
|
||||
frontend_root / "device-plugins" / "xgrids-k1" / "runtimeContext.tsx"
|
||||
).read_text("utf-8")
|
||||
xgrids_runtime = (plugin_root / "runtimeContext.tsx").read_text("utf-8")
|
||||
|
||||
deactivation_guard = "if (!(await deactivate()))"
|
||||
assert "if (current && !deactivate)" in host_source
|
||||
@@ -94,9 +91,7 @@ def test_model_switch_is_guarded_by_plugin_deactivation() -> None:
|
||||
|
||||
def test_xgrids_frontend_uses_semantic_acquisition_actions_and_stable_identity() -> None:
|
||||
repository_root = Path(__file__).resolve().parents[1]
|
||||
plugin_root = (
|
||||
repository_root / "apps" / "control-station" / "src" / "device-plugins" / "xgrids-k1"
|
||||
)
|
||||
plugin_root = repository_root / "plugins" / "xgrids-k1" / "frontend" / "src"
|
||||
manifest_source = (plugin_root / "manifest.ts").read_text("utf-8")
|
||||
api_source = (plugin_root / "api.ts").read_text("utf-8")
|
||||
hook_source = (plugin_root / "useXgridsK1Runtime.ts").read_text("utf-8")
|
||||
@@ -121,12 +116,12 @@ def test_xgrids_live_copy_does_not_claim_software_controls_the_physical_scanner(
|
||||
repository_root = Path(__file__).resolve().parents[1]
|
||||
connection_source = (
|
||||
repository_root
|
||||
/ "apps"
|
||||
/ "control-station"
|
||||
/ "src"
|
||||
/ "device-plugins"
|
||||
/ "plugins"
|
||||
/ "xgrids-k1"
|
||||
/ "XgridsK1Connection.tsx"
|
||||
/ "frontend"
|
||||
/ "src"
|
||||
/ "components"
|
||||
/ "K1AcquisitionPipeline.tsx"
|
||||
).read_text("utf-8")
|
||||
|
||||
assert "Подготовить приём данных" in connection_source
|
||||
|
||||
Reference in New Issue
Block a user