feat: take over host delete so profile dirs are removed
All checks were successful
技能自动化发布 / release (push) Successful in 7s

This commit is contained in:
2026-10-01 09:56:55 +08:00
parent 1ba7a0f4a1
commit 7d0ec94210
7 changed files with 129 additions and 17 deletions

View File

@@ -72,6 +72,26 @@ class TestRowOpenActions(unittest.TestCase):
self.assertIn("enum", props["login_id_type"])
self.assertIn("enum", props["status"])
def test_delete_takes_over_host_delete(self) -> None:
delete = _by_id(_load_actions(), "account-delete")
self.assertEqual(delete.get("replaces"), "delete")
self.assertEqual(delete.get("placements") or [], [])
self.assertEqual(delete.get("interaction"), "confirm")
self.assertEqual(delete.get("label"), "删除账号")
bind = delete.get("bind") or {}
self.assertEqual(bind.get("tables"), ["accounts"])
self.assertEqual(bind.get("inputMapping"), {"accountId": "$row.$pk"})
self.assertEqual(
(delete.get("entrypoint") or {}).get("command"),
"delete",
)
self.assertEqual(
(delete.get("entrypoint") or {}).get("args"),
["id", "{{accountId}}"],
)
steps = delete.get("steps") or []
self.assertTrue(any(s.get("do") == "reloadTable" for s in steps))
def test_copy_is_direct_row_action(self) -> None:
copy = _by_id(_load_actions(), "account-copy")
self.assertEqual(copy.get("label"), "复制")