| import json | |
| from pathlib import Path | |
| CURRENT_PLUGINS = { | |
| "browser", | |
| "audio", | |
| "content", | |
| "doc", | |
| "cache", | |
| "image", | |
| "json", | |
| "ocr", | |
| "sandbox", | |
| "text", | |
| "video", | |
| "welcome", | |
| } | |
| def test_current_plugins_have_static_html_ui(): | |
| plugins_dir = Path("plugins") | |
| for plugin_name in CURRENT_PLUGINS: | |
| plugin_dir = plugins_dir / plugin_name | |
| metadata = json.loads((plugin_dir / "plugin.json").read_text(encoding="utf-8")) | |
| assert metadata["ui"]["type"] == "static" | |
| assert (plugin_dir / "frontend" / "index.html").exists() | |
| def test_plugin_frontend_no_longer_uses_vite_tsx_entrypoints(): | |
| plugins_dir = Path("plugins") | |
| for plugin_name in CURRENT_PLUGINS: | |
| plugin_dir = plugins_dir / plugin_name | |
| assert not (plugin_dir / "frontend" / "index.tsx").exists() | |