feat(dev): 新增组件样式与表单辅助 Skill
This commit is contained in:
@@ -71,6 +71,9 @@ class GuidanceInitTest(unittest.TestCase):
|
||||
self.assertEqual(1, payload["schemaVersion"])
|
||||
self.assertIn(payload["initialization"]["mode"], {"existing", "new"})
|
||||
self.assertEqual([], payload["dependencies"]["internal"])
|
||||
self.assertEqual([], payload["frontend"]["componentLibraries"])
|
||||
self.assertEqual([], payload["frontend"]["componentRoots"])
|
||||
self.assertEqual([], payload["frontend"]["documentation"])
|
||||
self.assertEqual(
|
||||
".craftkit/standards/index.md",
|
||||
payload["guidance"]["standardsIndex"],
|
||||
@@ -78,6 +81,23 @@ class GuidanceInitTest(unittest.TestCase):
|
||||
serialized = json.dumps(payload, ensure_ascii=False)
|
||||
self.assertNotIn(":\\", serialized)
|
||||
|
||||
def test_init_collects_frontend_component_metadata(self) -> None:
|
||||
"""初始化应记录组件库证据和入口,但不能默认选择组件库。"""
|
||||
|
||||
content = "\n".join(
|
||||
path.read_text(encoding="utf-8")
|
||||
for path in (
|
||||
INIT / "SKILL.md",
|
||||
INIT / "references" / "project-config.md",
|
||||
INIT / "references" / "existing.md",
|
||||
INIT / "references" / "new.md",
|
||||
)
|
||||
)
|
||||
self.assertIn("componentLibraries", content)
|
||||
self.assertIn("组件根", content)
|
||||
self.assertIn("不默认选择流行方案", content)
|
||||
self.assertTrue((INIT / "assets" / "frontend-components.md").is_file())
|
||||
|
||||
def test_local_directories_are_the_only_nested_ignores(self) -> None:
|
||||
"""初始化模板只排除本地状态和缓存,不得排除共享资料。"""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user