File size: 852 Bytes
f4f1610 cc826a1 f4f1610 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | 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()
|